Perfmon Profiling of CMSSW - HOWTO

0) install perfmon

if not already installed (check for the existence of pfmon) follow the instruction provided by openlab here

1) cd to the "src" directory of your CMSSW area, checkout and install the pfmlib tool:

cvs co PerfTools/PerfMon
scram setup PerfTools/PerfMon/test/libpfm.xml

2) compile the new Perfmon Service:

scram b -r

3) Create the configuration files (to be used by the Perfmon Service) starting from your python configuration file:

  • copy either PerfTools/PerfMon/test/pfm_config_nehalem.xml or PerfTools/PerfMon/test/pfm_config_core.xml in a local directory
  • edit it changing the content of the PROPERTIES with the name of your config and the name fo the directory that shall contain the results of the analysis
    • you can also specify the event at which the service should start monitoring and and if you wish to run jobs in parallel (0 for serial, 1 for parallel monitoring)

$CMSSW_BASE/bin/$SCRAM_ARCH/create_config_files_from_xml pfm_config_file.xml
mkdir results reco -s RAW2DIGI,L1Reco,RECO,VALIDATION,DQM --eventcontent RECO --datatier RECO \
--conditions auto:mc -n 250 --no_exec --mc \
--dbs "find file,file.parent where dataset = /RelValSingleElectronPt10/CMSSW_4_2_0_pre7-MC_42_V6-v1/GEN-SIM-RECO" \
--no_exec --process RERECO
cp $CMSSW_BASE/PerfTools/PerfMon/test/pfm_config_nehalem.xml pfm_config.xml
sed -i 's/' pfm_config.xml
$CMSSW_BASE/bin/$SCRAM_ARCH/create_config_files_from_xml  pfm_config.xml

4) Setup the runtime enviroment (if not done yet):


5) Start the runs, this will take the time of 42 runs if executed in serial mode (current recommended mode):

python (original_config_file_name_without_extension) &
EXAMPLE (using the python configuration generated above):

6) Analyse the results:

Usage: pfm_gen_analysis DIRECTORY [--caa] [--csv]
--caa: cycle accounting analysis - gives derived statistics instead of raw counter data
--csv: produces comma separted value file instead of HTML page
EXAMPLE (using "results/" as the directory containing results):
$CMSSW_BASE/bin/$SCRAM_ARCH/pfm_gen_analysis results --caa

7) Make your result tables sortable:

EXAMPLE (using "results/" as the directory containing results):
cp CMSSW_BASE/PerfTools/PerfMon/test/sorttable.js results/HTML/

8) Check out your results:

EXAMPLE (using "results/" as the directory containing results):
firefox results/HTML/index.html &


-- DanieleFrancescoKruse - 01-Feb-2010

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2012-07-30 - DanieleFrancescoKruse
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback