summaryrefslogtreecommitdiffstats
path: root/contrib/systemtap
Commit message (Collapse)AuthorAgeFilesLines
* CONTRIB: Add a systemstap script to measure nested group code performanceJakub Hrozek2016-06-101-0/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When all the dependencies are installed, run the script using systemtap: You'll see an output such as: # stap /usr/share/sssd/systemtap/nested_group_perf.stp ^CTime spent in group sssd_be searches: 600 Time spent in sdap_nested_group_send/recv: 65 ms (ratio: 10.83%) Time spent in zero-level sysdb transactions: 6813 ms (ratio: 1135.50%) Breakdown of sdap_nested_group req (total: 65 ms) sdap_nested_group_process req: 64 sdap_nested_group_process_split req: 22 sdap_nested_group_check_cache: 21 sdap_nested_group_sysdb_search_users: 10 sdap_nested_group_sysdb_search_groups: 9 ldap request breakdown of total 60 sdap_nested_group_deref req: 24 sdap_deref_search_send req 24 processing deref results: 0 sdap_nested_group_lookup_user req: 18 sdap_nested_group_lookup_group req: 0 Time spent refreshing unknown members: 18 Breakdown of results processing (total 6813) Time spent populating nested members: 10 Time spent searching ldb while populating nested members: 5 Time spent saving nested members: 110 Time spent writing to the ldb: 678 ms Please note that since the script is supposed to be used in scenarios such as tracing "id" performance, which typically involve multiple group requests. Therefore, the variables are not zeroed out and you need to interrupt the script manually with Ctrl+C. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* CONTRIB: Add a systemtap script to analyze the performance of the 'id' commandJakub Hrozek2016-06-101-0/+165
Run this script using "stap" as root: sudo stap /path/to/sssd/contrib/systemtap/id_perf.stp It is not required to restart the script between successive id runs, the variables are cleared when systemtap detects id had started or finished. You should see output as this one: Total run time of id was: 112 ms Number of zero-level cache transactions: 9 Time spent in level-0 sysdb transactions: 84 ms Time spent writing to LDB: 80 ms Number of LDAP searches: 13 Time spent waiting for LDAP: 11 ms LDAP searches breakdown: Number of user requests: 1 Time spent in user requests: 15 Number of group requests: 6 Time spent in group requests: 71 Number of initgroups requests: 1 Time spent in initgroups requests: 20 Unaccounted time: 17 ms sysdb transaction breakdown: 1 hits of transaction sysdb_transaction_commit+0x6b [libsss_util.so] sdap_save_users+0x2d2 [libsss_ldap_common.so] sdap_get_users_done+0x186 [libsss_ldap_common.so] sdap_search_user_process+0x2d9 [libsss_ldap_common.so] generic_ext_search_handler+0x22f [libsss_ldap_common.so] sdap_get_and_parse_generic_done+0x6f [libsss_ldap_common.so] sdap_get_generic_op_finished+0x806 [libsss_ldap_common.so] sdap_process_message+0x3c4 [libsss_ldap_common.so] sdap_process_result+0x33a [libsss_ldap_common.so] sdap_ldap_next_result+0x2f [libsss_ avg:14 min: 14 max: 14 sum: 14 5 hits of transaction sysdb_transaction_commit+0x6b [libsss_util.so] sdap_nested_done+0x2c8 [libsss_ldap_common.so] sdap_nested_group_done+0x9b [libsss_ldap_common.so] 0x7f47a6320be4 [libtevent.so.0.9.26+0x4be4] avg:9 min: 9 max: 11 sum: 49 1 hits of transaction sysdb_transaction_commit+0x6b [libsss_util.so] sdap_nested_done+0x2c8 [libsss_ldap_common.so] sdap_nested_group_done+0x9b [libsss_ldap_common.so] sdap_nested_group_process_done+0x1dc [libsss_ldap_common.so] sdap_nested_group_single_done+0x112 [libsss_ldap_common.so] sdap_nested_group_recurse_done+0x95 [libsss_ldap_common.so] 0x7f47a6320be4 [libtevent.so.0.9.26+0x4be4] avg:11 min: 11 max: 11 sum: 11 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>