25.01.2015 Views

Caché Monitoring Guide - InterSystems Documentation

Caché Monitoring Guide - InterSystems Documentation

Caché Monitoring Guide - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7<br />

Examining Routine Performance Using<br />

^%SYS.MONLBL<br />

The routine ^%SYS.MONLBL provides a user interface to the <strong>Caché</strong> MONITOR facility. This utility provides a way to<br />

diagnose where time is spent executing selected code in <strong>Caché</strong> ObjectScript and <strong>Caché</strong> Basic routines, helping to identify<br />

lines of code that are particularly resource intensive. It is an extension of the existing MONITOR utility accessed through<br />

^PERFMON and the %Monitor.System package classes. Because these utilities share the same memory allocation, you<br />

can only run one of them at a time on a <strong>Caché</strong> instance.<br />

This chapter contains the following sections:<br />

• Invoking the Line-by-line <strong>Monitoring</strong> Routine<br />

• Line-by-line <strong>Monitoring</strong> Options<br />

• Sample Line-by-line Monitor Reports<br />

• Line-by-line Monitor Programming Interface<br />

7.1 Invoking the Line-by-line <strong>Monitoring</strong> Routine<br />

If the monitor is not running when you invoke ^%SYS.MONLBL, the routine displays a warning message and gives you<br />

the option to start the monitor or to check memory requirements. For example:<br />

%SYS>Do ^%SYS.MONLBL<br />

WARNING ! Starting the line-by-line monitor will enable the<br />

collection of statistics for *every* line of code executed by<br />

the selected routines and processes. This can have a significant<br />

impact on the performance of a system, and it is recommended<br />

that you do this on a 'test' system.<br />

The line-by-line monitor also allocates shared memory to track<br />

these statistics for each line of each routine selected. This is<br />

taken from the general shared memory already allocated by Cache and<br />

should be considered if you are using '*' wildcards and trying to<br />

analyze a large number of routines. If the monitor fails to start due<br />

to a problem with memory allocation, you may need to increase the<br />

GenericHeapSize parameter in the system configuration. You may use<br />

the 'Memory Requirements' option to see how much memory a collection<br />

would need (without starting the collection).<br />

1.) Start Monitor<br />

<strong>Caché</strong> <strong>Monitoring</strong> <strong>Guide</strong> 57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!