I have installed perfsuite v1.1.2. I want to profile the whole database and measure PAPI events. As the database runs as a daemon process so I couldn't figure out how to use Perfsuite to profile the running database daemon until the daemon stops. I tried the following:
psrun -f -c papi_sandybridge.xml db_exec start
But in the above case, psrun returns the output as soon as database starts and goes into daemon mode. Any suggestions please?
Kind Regards, Ahmad
From: Rui Liu <ruiliu@il...> - 2013-04-22 20:05:12
Thanks a lot for your interest in using PerfSuite!
What you saw might be the expected behavior -- you might just have to wait for the database daemon process to stop, either a normal finish or being killed, for the XML file to be generated by psrun.
I tried a simple test to mimic the behavior you saw: a file "/tmp/do.sh", which contains just:
top -b -n30 > /tmp/top.txt &
The "&" character makes the "top" process to run in the background, similar to a daemon process.
After I ran "psrun -f /tmp/do.sh", psrun returned immediately, just as you said "psrun returns as soon as the database starts and goes into daemon mode". However, "top" kept running, and "psrun" kept measuring it. In the meanwhile, "top" was running the 30 iterations we asked for and no PerfSuite XML file was generated -- this seemed to be what you observed. . After "top" successfully finished, psrun generated a valid file with the count values.
In another test, a valid XML file was also generated when I used "kill" to stop the "top" process. I used "ps uf" to find the PID of the "top" process, then used "kill <pid>". If your db process is a long-running one (say it will take days for it to finish), or it never finishes by itself, you could try to kill it.
The reason for the behavior is that "psrun" installs an exit handler function for a process it monitors, and when the process exits (either by itself, or by receiving a signal such as the one "kill" sends to it), the exit handler is called and the exit handler writes out the XML file.
Could you please try to let your db daemon process exit normally or kill it (try the default signal "SIGTERM" first), check whether a PerfSuite XML file is generated and let us know the result? Please allow the process to run for some time, otherwise most counts could be zero.
current PerfSuite maintainer
On 04/22/2013 01:56 PM, Hassan, Ahmad wrote:
> Hi Team,
> I have installed perfsuite v1.1.2. I want to profile the whole database and measure PAPI events. As the database runs as a daemon process so I couldn’t figure out how to use Perfsuite to profile the running database daemon until the daemon stops. I tried the following:
> psrun -f -c papi_sandybridge.xml db_exec start
> But in the above case, psrun returns the output as soon as database starts and goes into daemon mode. Any suggestions please?
> Kind Regards, Ahmad
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> PerfSuite-users mailing list