HP

HPjmeter 4.1 User's Guide

English
  HPjmeter 4.1 User's Guide > Chapter 8 Using Visualizer Functions   

Using Specialized Garbage Collection Displays

GC data displays are available immediately on opening a .vgc file that was generated by running your application with -Xverbosegc or -Xloggc options. This data is presented in the following visualizers:

See also:

For an explanation of Java memory terminology, see the Sun Developer Network publication Memory Management in the Java HotSpot™ Virtual Machine (.pdf)

For an explanation of Java memory terminology, see the Sun Developer Network publication Memory Management in the Java HotSpot™ Virtual Machine (http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf)

Heap Usage After GC

This visualizer shows heap usage in the eden space and in the old, survivor, and permanent generations after each garbage collection. When viewed with consideration of the type of each event, this graph provides a general picture of the heap resources minimally required by an application.

NOTE:

Difference in Display of Garbage Collection in the Heap Monitor and the Heap Usage After GC Visualizers  Monitoring visualizers like the Heap Monitor show only object data from the eden, survivor, and old generation spaces. Visualizers that display GC data, like the Heap Usage After GC visualizer, show object data from the permanent generation, as well as from the eden, survivor, and old generation spaces.

Figure 8-24 GC Metric: Heap Usage After GC

Visualizer showing heap usage after
GC over time, with scavenges and full GC events distinguished by color
and shape.

Duration (Stop the World)

This visualizer shows the amount of stop-the-world time spent for each garbage collection event.

A well-tuned application shows a relatively large number of short scavenges with less frequent, but more expensive, full garbage collections.

This graph is also useful for exposing the cost of explicit System.gc() method calls within an application, which often result in expensive and unneeded garbage collection overhead.

Figure 8-25 GC Metric: Duration

Visualizer showing stop-the-world
times, with GC events distinguished by color and shape.

Cumulative Allocation

This visualizer shows the cumulative amount of storage for new objects requested by the application over time, which can indicate the overall progress of the application. Because the rate at which an application creates new objects is often an indicator of its performance, changes in the slope of this curve may indicate opportunities for tuning garbage collection.

To see a more dramatic presentation of incremental changes in object creation, see the Creation Rate visualizer.

Note that storage recovered by the garbage collector for unused objects is not deducted from the cumulative amount.

Figure 8-26 GC Metric: Cumulative Allocation

Visualizer showing cumulative storage
requested by application over time, with GC events distinguished by
color and shape.

Creation Rate

This panel shows the incremental object creation rate for the application as observed at each garbage collection event. The increment at each data point is the amount of elapsed time since the previous GC event.

The rate of object creation can be a good measure of your application's overall performance. By correlating GC events with changes in the object creation rate, you can discover opportunities for improving this performance through heap parameter tuning.

Figure 8-27 GC Metric: Creation Rate

Visualizer showing cumulative creation
rate over time, with GC color distinctions off and lines connecting
GC events in the order in which they occurred.

Allocation Site Statistics

This visualizer displays the sites (methods) in the JDK and user's Java code where objects have been created. The display includes the number of objects created at each site (Invoke Count), the percent of memory allocated to the objects generated by the compiled portion of the running Java application (% Allocated), the average size of each object in bytes (Average Size (Byte)), and the amount of memory occupied by the objects (Bytes Allocated). This metric is useful when you choose to decrease heap pressure by modifying the application code.

The data displayed in this visualizer can be refreshed from the verbose GC file during the collection period by clicking the button. The data display shows the cumulative results of all the dumps of the allocation sites statistics collected up to that point or the different allocations separated by time.

Requires use of -XX:+PrintAllocStatistics in the run command:

See Collecting Allocation Site Statistics for Viewing in HPjmeter for an example of command syntax.

Allocation sites can originate from interpreted as well as compiled Java code. When specifying –XX:+PrintAllocStatistics, only allocations from compiled code are reported. However, because the Java Virtual Machine detects and compiles the most active Java methods as early as possible, the most active allocation sites (the sites most likely to cause GC performance problems) are reported.

The allocation data can be displayed as either combined or separated time sets. Use the toolbar button combined (the default) and separated to toggle between them.

When the button is toggled to combined, the clock button Toggle clock to hours is disabled, and the background color is white. The default sort on this table is determined by % Allocated, and values in this column are displayed in descending order, from greatest area of memory use to least. Making code changes first in the area where memory use is greatest can have more significant impact on the heap. The Combined Sets and Show Clock Time entries are also listed under the View menu.

Figure 8-28 GC Metric: Combined Sets of Allocation Site Statistics

Visualizer showing Combined Sets
of Allocation Site Statistics.

When the button is toggled to separated, a Time column is added to the left side of the table to display the time at which the allocations were made, and the clock button Toggle clock to hours on the toolbar is enabled to let you choose clock time or elapsed time. If the table has more than one time set, the background color of the first set will be white, the second will be gray, the third will be white again, and so on. The default sort on this table is determined by Time, with values in this column displayed in ascending order.

Figure 8-29 GC Metric: Separated Sets of Allocation Site Statistics.

Visualizer showing Separated Sets
of Allocation Site Statistics.

The filter button opens a pop-up dialog box where you can provide various filters to narrow down the data. A Filter entry is also listed under the Edit menu.

If the sets are combined, the columns and filter dialog box show as combined. With the filter dialog box still displayed, pressing the Toggle Allocation Data into Combined or Separated Sets button would then show the columns and filter dialog box as separated. Enter filter field values to narrow down the data and then click Apply Filters for the results. To display the complete Allocation Site Statistics table again, click Reset and Apply Filters.

Figure 8-30 GC Metric: Allocation Site Statistics - Combined Sets, Filter Dialog Box

Visualizer showing Allocation Site
Statistics with Combined Sets, Filter.

Figure 8-31 GC Metric: Allocation Site Statistics - Separated Sets, Filter Dialog Box

Visualizer showing Allocation Site
Statistics with Separated Sets, Clock, Filter.

Filter Field Descriptions:

  • Time – Only visible for separated sets. Select the time set from the dropdown list, which contains a sorted list of all time sets for the GC file. If there is more than one time set, the value All is also listed, which if chosen will display all time sets for this GC file in the table.

  • % Allocated – Choose the equality = (the default), or one of the the comparative operators (> or <) from the dropdown list, and then supply a percentage value in the text field using numbers 0-9, and the decimal point (.) or percent (%) characters. Both 0.01 and 0.01% will supply a filter value of .01%.

  • Bytes Allocated – Use the equality or comparitive operators and supply a numerical value in the text box.

  • Invoke Count – Use the equality or comparitive operators and supply a numerical value in the text box.

  • Average Size – Use the equality or comparitive operators and supply a numerical value in the text box using numbers 0-9, and optional comma. Both 10,000 and 10000 will supply a filter value of 10,000.

  • Allocation Site – Enter any characters to match an allocation site listed in the table. Wildcards are allowed. You can enter the entire string or part of a string, making sure to match lowercase and uppercase. If an allocation site listed as a row in the table contains more than one string entered in the filter, any string that matches will match that row.

  • Type – Enter any characters to match an allocation site type listed in the table. Wildcards are allowed. You can enter the entire string or part of a string, making sure to match lowercase and uppercase.

How a Snapshot of Allocation Sites Statistics is Shown in GC Visualizers

Figure 8-32 Presentation of Allocation Sites Statistics and Xverbosegc Data Collected During the Same Time Period

Presentation of Allocation Sites Statistics and Xverbosegc Data Collected During the Same Time Period

Figure 8-33 Presentation of Allocation Sites Statistics and Zero Preparation GC Data Collection During the Same Time Period

Presentation of Allocation Sites Statistics and Zero Preparation GC Data Collection During the Same Time Period

User-Defined X-Y Axes

This visualizer is supplied to help you to experiment with your own combinations of data gathered by -Xverbosegc or -Xloggc.

Select variables for the X and Y axes from the drop-down lists. HPjmeter plots the X-Y relationships for your captured data file. For a partial list of available metrics, see –Xverbosegc and –Xloggc Options and Their Corresponding Metrics.

For some user-defined selections, it is possible that the data capture obtained the GC type without being able to ascertain the numerical value of the data point. Data points with unknown numerical values are shown in gray near zero (0) on the X or Y axis of a graph. To determine the GC type of a data point, check the color in the legend given below the graph.

Figure 8-34 User-Defined Comparisons of GC Metrics

Visualizer showing X-Y axes controls
to use to create your own metric comparison.

Multiple User-Defined

This visualizer is supplied to help you experiment with your own combinations of data gathered by -Xverbosegc or -Xloggc, including Glance Data that you might have collected. The Heap Usage After GC metric is shown by default.

Figure 8-35 Multiple User-Defined Metrics

Visualizer showing Y axis control
to use to create multiple metric comparisons.

Click the toolbar button to open a metric configuration pop-up box that lets you select the metrics you want to display:

Figure 8-36 Multiple User-Defined Metric Configuration Box

Visualizer showing user-defined metric
configuration box for creating multiple metric comparisons.

Choose the Metric Selection Mode by clicking the Single or Multiple metric radio button. Then click the check boxes to select the desired metric or combination of metrics. When you check a metric, it is immediately added to the chart. Uncheck it, and it is removed from the chart.

When displaying multiple metrics, HPjmeter tries to share the default y-axis if possible. If not, it creates additional y-axes to the right of the graph, in units appropriate to the selected metrics. For example, Figure 8-35 shows four metrics, but only three y-axes. The units for the Heap Usage After GC and Old After metrics are MBytes, so they share the same default MBytes y-axis to the left of the graph. The GC Count units are in integers (indicated by Count), and the Cumulative GC Duration units are in seconds, so they are each given their own y-axis.

For a partial list of available metrics, see –Xverbosegc and –Xloggc Options and Their Corresponding Metrics.

If Glance data was collected, then the Glance metrics are also included for selection in the metric configuration pop-up box.

Glance Data

The Glance Adviser visualizer displays a subset of HP GlancePlus metrics collected during a Java application run.

Requires use of the /opt/hpjmeter/bin/javaGlanceAdviser.ksh command to collect Glance data:

See Collecting Glance Data for Viewing in HPjmeter for an example of command syntax.

The metrics display as the Y-axis values on the graph. These metrics provide information about the global state of the HP-UX server and the specific process that was selected by process id (pid) when the Glance data collection was started. By default, the visualizer displays the Process CPU metric:

Figure 8-37 GC Metric: Glance Data

Visualizer showing Glance data.

You can display a different Glance metric or a combination of multiple metrics using the toolbar button. This opens a metric configuration pop-up box that lets you select the metrics you want to display:

Figure 8-38 Glance Data Metric Configuration Box

Visualizer showing Glance data.

Click the Single or Multiple metric radio button to choose the Metric Selection Mode. Then click the check boxes to select the desired metric or combination of metrics. When you check a metric, it is immediately added to the chart. Uncheck it, and it is removed from the chart.

You can also view these metrics together with GC metrics and Glance system call metrics on the Multiple User-Defined tab.

Table 8-2 “Metrics Shown in Glance Adviser Visualizer” describes the metrics available for display in the metric configuration pop-up box of the Glance Adviser visualizer. For additional detail on these metrics, see the HP GlancePlus for HP-UX Dictionary of Operating System Performance Metrics provided with your HP GlancePlus product.

Table 8-2 Metrics Shown in Glance Adviser Visualizer

Glance Adviser Metric NameHP GlancePlus Dictionary Metric NameDescription
Global Swap UtilizationGBL_SWAP_SPACE_UTILPercent of available swap space that was being used by running processes in the interval.
Global File TableTBL_FILE_TABLE_UTILPercentage of file table entries currently used by file descriptors.This metric is updated every 30 seconds or the sampling interval, whichever is greater.
Global CPUGBL_CPU_TOTAL_UTILPercentage of time the CPU was not idle during the interval.
Global System Mode CPU GBL_CPU_SYS_MODE_UTILPercentage of time the CPU was in system mode during the interval.
Global User Mode CPUGBL_CPU_USER_MODE_UTILPercentage of time the CPU was in user mode during the interval.
Run Queue AverageGBL_RUN_QUEUEAverage number of threads waiting in the run queue over the interval.
Global Private Virtual Memory GBL_MEM_VIRTTotal private virtual memory (in MBs unless otherwise specified) at the end of the interval. This is the sum of the virtual allocation of private data and stack regions for all processes.
Physical Memory UtilizationGBL_MEM_UTILPercentage of physical memory in use during the interval. This includes system memory (occupied by the kernel), buffer cache and user memory. On HP-UX 11iv3 and above, this includes file cache also.
Global Pageout Rate GBL_MEM_PAGEOUT_RATE Total number of page outs to the disk per second during the interval. This reflects paging activity between memory and paging space. It does not include activity between memory and file systems.
Global Cumulative Pageout RateGBL_MEM_PAGEOUT_RATE_CUMAverage number of page outs to the disk per second over the cumulative collection time. This includes pages paged out to paging space and to the file system.
Global Buffer Cache Hit GBL_MEM_CACHE_HIT_PCT Percentage of buffer cache reads resolved from the buffer cache (rather than going to disk) during the interval. Buffer cache reads can occur as a result of a logical read (for example, file read system call), a read generated by a client, a read-ahead on behalf of a logical read, or a system procedure.
Global Disk IO RateGBL_DISK_PHYS_IO_RATENumber of physical IOs per second during the interval. Only local disks are counted in this measurement. NFS devices are excluded. All types of physical disk IOs are counted, including file system IO, virtual memory IO, and raw IO.
Global Net Inbound Packet RateGBL_NET_IN_PACKET_RATENumber of successful packets per second received through all network interfaces during the interval. Successful packets are those that have been processed without errors or collisions.
Global Net Inbound Error RateGBL_NET_IN_ERROR_RATENumber of inbound errors per second on all network interfaces during the interval.
Global Net Outbound Packet RateGBL_NET_OUT_PACKET_RATENumber of successful packets per second sent through the network interfaces during the interval. Successful packets are those that have been processed without errors or collisions.
Global Net Outbound Error RateGBL_NET_OUT_ERROR_RATENumber of outbound errors per second on all network interfaces during the interval.
Process CPUPROC_CPU_TOTAL_UTILTotal CPU time consumed by a process or kernel thread as a percentage of the total CPU time available during the interval.
Process System Mode CPU PROC_CPU_SYS_MODE_UTILPercentage of time that the CPU was in system mode in the context of the process or kernel thread during the interval.
Process User Mode CPUPROC_CPU_USER_MODE_UTILPercentage of time the process or kernel thread was using the CPU in user mode during the interval.
Process Virtual MemoryPROC_MEM_VIRTSize (in KB) of virtual memory allocated for the proces or kernel thread.
Process Resident Memory PROC_MEM_RESThe size (in KB) of resident memory allocated for the process or kernel thread.
Data Region Virtual MemoryPROC_REGION_VIRT_DATASize (in KBs unless otherwise indicated) of the total virtual memory occupied by data regions of this process. This value is not affected by the reference count since all data regions are private.
Data Region Resident Memory PROC_REGION_RES_DATASize (in KBs unless otherwise indicated) of the total resident memory occupied by data regions of this process. This value is not affected by the reference count since all data regions are private.
Process Kernel ThreadsPROC_THREAD_COUNTTotal number of kernel threads for the current process.
Process Open FilesPROC_FILE_OPENNumber of files the current process has remaining open as of the end of the interval.
Process Physical IO RatePROC_IO_BYTE_RATENumber of physical IO KBs per second used by this process or kernel thread, either directly or indirectly, during the interval.
Process Physical Disk IO RatePROC_DISK_PHYS_IO_RATEAverage number of physical disk IOs per second made by the process or kernel thread during the interval.

 

Glance System Call Data

The Glance System Call display provides a graph of data obtained from the PROC_SYSCALL loop in Glance Plus. For additional details, see the HP GlancePlus for HP-UX Dictionary of Operating System Performance Metrics. At each sampling interval, all system calls that exceed a predefined rate are written to the data file. Six items are recorded for each system call. They are shown below, with the GlancePlus items they correspond to in parentheses:

  • Count for this system call since the last sample (PROCSYSCALL_CALL_COUNT)

  • Cumulative count for this system call (PROCSYSCALL_CALL_COUNT_CUM)

  • Rate for this system call (PROCSYSCALL_CALL_RATE)

  • Cumulative rate for this system call (PROCSYSCALL_CALL_RATE_CUM)

  • Time spent in this system call (PROCSYSCALL_TOTAL_TIME)

  • Cumulative time spent in this system call (PROCSYSCALL_TOTAL_TIME_CUM)

These metrics provide information about the system call behavior of the selected process. You can use the display to look for high system call activity.

Figure 8-39 GC Metric: Glance System Call Data

Visualizer showing Glance System
Call data.

You can display a different Glance system call metric or a combination of multiple metrics using the toolbar button. This opens a metric configuration pop-up box that lets you select the metrics you want to display:

Figure 8-40 Glance System Call Metric Configuration Box

Visualizer showing Glance System
Call Configuration Box.

Click the Single or Multiple metric radio button to choose the Metric Selection Mode. Then click the check boxes to select the desired metric or combination of metrics. When you check a metric, it is immediately added to the chart. Uncheck it, and it is removed from the chart.

You can also view these metrics together with GC metrics and Glance Adviser metrics on the Multiple User-Defined tab.