Hi all, Please review this patch: http://gerrit.ovirt.org/26113
The short term goal of this patch is to allow debugging of this nasty bug: https://bugzilla.redhat.com/1074097 The long term goal is having an easy way to profile vdsm in the field and during development, initiative started by Francesco. Here are some docs to help you get started with the profiler. Installing yappi ---------------- To try this patch, you must install yappi: 1. wget http://yappi.googlecode.com/files/yappi-0.82.tar.gz 2. tar xzf yappi-0.82.tar.gz 3. cd yappi-0.82 4. sudo python setup.py install If you want to build an rpm, the quickest way is: 1. Fix MANIFEST.in so it looks like this: include *.h include ez_setup.py 2. Build rpm $ python setup.py bdist_rpm You rpm is located in dist. I built rpm packages for fedora and rhel (looking for a place to share them) Using the profiler ------------------ Enbale the profiler in vdsm.conf: [vars] profile_enable = False If the profiling is enabled, profiling stats early in vdsm startup, and stopped when vdsm receives a termination signal. The profile is saved to /tmp/vdsmd.prof. IMPORTANT: After you are done, disable profiling. To explore profile, open it in the pstat commnad shell: $ python -m pstats /tmp/vdsmd.prof To view top 30 expensive functions: % sort time % stats 30 To view top 30 functions including time spent in called functions: % sort cumulative % stats 30 To view callers (who is calling foo() 300,000 times?) % callers 30 Enjoy, Nir _______________________________________________ vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel