From: Marcin H. <mar...@op...> - 2013-03-28 16:37:04
|
Hi, I tried to profiling and optimalizing scstadmin by changes SCST.pm module (for sysfs). After profiling I noticed a few subroutines which are used lots of time during one scstadmin command. After optimalization time for one scstadmin command I noticed decrese usage SCST.pm module for about ~40% to ~50%, and subroutines calls decrese notably too. Results for one scstadmin command which remove iSCSI target: Executed 13254 statements in 119ms SCST::SCST::SCST_TARGETS_DIR() is called 772 times SCST::SCST::drivers() is called 82 times SCST::SCST::SCST_HANDLERS_DIR() is called 81 times SCST::SCST::new_sysfs_interface() is called 78 times SCST::SCST::targets() is called 28 times After optimalization this results for remove iSCSI target commands decrese. Executed 4854 statements in 64.2ms SCST::SCST::SCST_TARGETS_DIR() is called 1 time SCST::SCST::drivers() isi called 2 times SCST::SCST::SCST_HANDLERS_DIR() is called 1 time SCST::SCST::new_sysfs_interface() is called 1 time SCST::SCST::targets() is called 4 times To this message I attached result from profiling SCST.pm module by using 'NYTProf' profiler and Perl 5.8.8. Profiling raport is for REMOVING iSCSI TARGET. There are two graphs and HTML files from profiler both for version without optimalization and for version with optimalization. In attachment prepared patch is available too. In this case, need for optimalization SCST.pm module results from high availability service scripting. Best regards Marcin Haba |