InterSystems IRIS Data Platform 2019.2  /  Monitoring Guide

Monitoring Guide
Monitoring Routine Performance Using ^PROFILE
Previous section           Next section
InterSystems: The power behind what matters   

The ^PROFILE utility helps programmers analyze the performance of their application routines and classes. It accomplishes this task in two phases:
  1. It gathers data, sorted at the routine level, to help you identify which routines do the most “work.”
  2. It lets you select routines for which you want to gather and display data (subroutines, procedures, and individual lines) at a detail level so that you can “drill down” into the individual routines that may be causing performance issues.
By default, ^PROFILE captures metrics for up to 5000 routines; if there is not enough shared memory available for the maximum number of routines, it displays an informational message before it starts to capture the metrics, then captures metrics for as many routines as possible.
After you select the routines to monitor and the metrics to gather, if there is not enough space to collect metrics on all routines running in InterSystems IRIS™, the utility displays a message about the number of pages of memory required to monitor this collection and the number of pages available.
This chapter includes the following sections:
Invoke the (^PROFILE) utility from the %SYS namespace:
When you are prompted to start the collection of data, press Enter.
When you are prompted for a response (other than Yes or No) you can enter ? to display online help.
By default, the profile displays a numbered list of routines with the following metrics; initially, the list is sorted by the RtnLine metrics:
Column Title (Metric) Description
Number of routine lines of code executed. By default, it lists the value as a percentage of all lines of code executed.
Elapsed time used to execute the routine. By default, the time is listed as a percentage of the total time used by all routines.
CPU time used to execute the routine. By default, the entry is listed as a percentage of the total CPU time used by all routines.
Number of times the routine is loaded. By default, the entry is listed as a percentage of all routine loads.
Number of global references by the routine. By default, the entry is listed as a percentage of global references by all routines.
Number of global sets by the routine. By default, the entry is listed as a percentage of global sets by all routines.
The name of the routine (INT or MVI file) and the namespace where it is executing is displayed on the second line of the entry.
Follow the instructions that are displayed in the Terminal:
^PROFILE Example
Following is an example of running the ^PROFILE utility interactively (from the %SYS namespace) in the Terminal:
  1. Enter the following command:
  2. The following message appears.
    WARNING: This routine will start a system-wide collection of
    data on routine activity and then display the results. There
    may be some overhead associated with the initial collection,
    and it could significantly affect a busy system.
    The second phase of collecting line level detail activity
    has high overhead and should ONLY BE RUN ON A TEST SYSTEM!
    Are you ready to start the collection?  Yes =>
  3. Press Enter to start collecting metrics. Metrics similar to the following are displayed:
     Waiting for initial data collection ...
          RtnLine     Time        CPU         RtnLoad     GloRef      GloSet
    1.    41.48%      12.19%      0.00%       28.97%      10.65%      0.00%
          %Library.ResultSet.1.INT (IRISLIB)
    2.    35.09%      56.16%      65.22%      9.35%       36.77%      42.55%
          SYS.Database.1.INT (IRISSYS)
    3.    10.75%      6.62%       0.00%       43.30%      22.68%      46.81%
          Config.Databases.1.INT (IRISSYS)
    4.    7.13%       3.22%       0.00%       6.23%       0.00%       0.00%
          %Library.Persistent.1.INT (IRISLIB)
    5.    1.26%       0.71%       0.00%       4.36%       4.12%       4.26%
    6.    1.20%       0.00%       0.00%       0.00%       5.15%       6.38%
          %SYS.WorkQueueMgr.INT (IRISSYS)
    7.    0.76%       15.08%      34.78%      0.00%       0.00%       0.00%
          %SYS.API.INT (IRISSYS)
    8.    0.64%       1.05%       0.00%       0.00%       17.18%      0.00%
          %Library.JournalState.1.INT (IRISLIB)
    9.    0.61%       0.31%       0.00%       3.74%       0.00%       0.00%
          %Library.IResultSet.1.INT (IRISLIB)
    10.   0.28%       0.93%       0.00%       0.00%       1.72%       0.00%
          %Library.Device.1.INT (IRISLIB)
    11.   0.24%       0.71%       0.00%       0.62%       0.00%       0.00%
          Config.CPF.1.INT (IRISSYS)
    Select routine(s) or '?' for more options  N =>
  4. Enter the number(s) associated with the routines you want to analyze in more detail. For example, enter 2–3,5,7,10, then enter N or B to display other pages so that you can select additional routines.
  5. After you select all the routines you want to analyze, enter Q to display a message similar to the following:
    There are 2 routines selected for detailed profiling. You may now
    end the routine level collection and start a detailed profiler collection.
    WARNING !!
    This will have each process on the system gather subroutine level and line
    level activity on these routines. Note that this part of the collection may
    have a significant effect on performance and should only be run in a test
    or development instance.
    Are you ready to start the detailed collection?  Yes =>
  6. After you press Enter, a page similar to the following is displayed:
    Stopping the routine level Profile collection ...
    Loading ^%Library.Persistent.1 in ^^c:\intersystems\iris\mgr\irislib\
    Detail level Profile collection started.
        RtnLine     Routine Name  (Database)
    1.  96.72%      %Library.Persistent.1.INT (IRISLIB)
    2.  3.28%       Config.CPF.1.INT (IRISSYS)
    Select routine to see details or '?' for more options  R =>
  7. After you select the routine whose code you want to analyze, the routine displays a page with information about the code.

Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-22 06:48:58