Performance issue with Arrow formatted query output
Fetching large dataframe with .select_ipc_gpu and .select_ipc is currently slower than reading from disk with pandas.
I have prepared a notebook to demonstrate the issue: https://gist.github.com/sklam/4ae805c40abc3547b14719438f3c2846). A .select_ipc_gpu takes 3mins while pandas.readcsv takes 49s. The result is obtained on a Ubuntu16.04 with mapd 3.2.3dev. GPU is GTX 1080.
On a separate profiling run with nvprof, I notice a large gap between a device->host and a host->device transfer. It seems that the resultset is transferred back to the host for some processing and then copied back to the device. Please see profile result in query1 and query2 and their corresponding queries are in cell 3 & 5 of this notebok.
@andrewseidl @asuhan @m1mc Is this CPU reduction?
You mean conversion. Could be either that or the Python connector itself, I'll try to have a look this week.
If the former, likely to be CPU serialization perf issue in serialize_arrow_records again.
@asuhan It'd be useful to know in whose component something might be done, so they can take ownership to drive. Could be python connector, maybe MapD, maybe Arrow, thrift, who knows...
I'm close this issue, one because it's so old (i.e. much has changed since MapD 3.2.3 and whatever version of pymapd this was) and two because I can't reproduce:
pymapd 0.10 and OmniSci 4.7-dev on Ubuntu 18.04LTS with 1080ti:
- 13.3s for
select_ipc_gpu - 14s for
select_ipc - 53s for
execute - 10.6s for
pandas.read_csv
So this is something for us to keep an eye on, but at least right now, appears not to be an issue.