How to profile mapd_server?


Hi Mapd experts,

I try use NVIDIA Visual Profiler tool to profile mapd_server. To generate a profile report, the tool require explicitly quit the mapd_server program. But seems there is no way to gracefully shut down the mapd_server. I tried ‘kill’ the mapd_server process, the NVIDIA Visual Profiler only return an error to me like this:

Any help is appreciated.



Hi @mikedimsf, thanks for your question.

We had a branch that allowed shutdown of the server via a thrift call. As time allows we may try to resuscitate it to enable easy profiling.


Hi, did you finally achieve to profile MapD?

I’m also trying to profile some MapD jobs and I’m not sure which is the best way to do that.
Currently I have a bash script that starts MapD, performs a query and finally stops MapD Server. Something like this:
· systemctl start mapd_server
· systemctl start mapd_web_server
· cd $MAPD_PATH/bin
· eho “SELECT COUNT(*) FROM myTable;” | ./mapdql mapd -u $MAPD_USER p HyperInteractive
· systemctl stop mapd_web_server
· systemctl stop mapd_server

I run it like: nvprof bash
But it response that: No CUDA application was profiled.
Am I missing something? There is a better way to profile MapD?

Thanks in advance


If you know your queries are running as expected and you are building from source you will find a file MAPD_SOURCE_ROOT/build/Tests/RunQueryLoop. Which simply runs the query and exits out. It does not print the results but generates result sets and all that good stuff.

You can run nvprof against that and it will exit out after executing your query.

See file MAPD_SOURCE_ROOT/Tests/RunQueryLoop.cpp for details. It is dead simple main function.