VIEW GARBAGE COLLECTION OPERATION GRAPHICALLY

VIEW GARBAGE COLLECTION OPERATION GRAPHICALLY
–––––––––––––––––––––––––––––––––––––––––––––
To track memory usage of a running VCM system, it can be helpful to see the
Garbage Collector operation in a graphical format.

You can add flags to make the JVM produce statistics about Garbage Collector
operation, which includes heap–memory usage of the JVM. You can use a
third–party viewer to produce a graphical output (memory usage over time).

Note: 7.3.0.x versions of the VCM ship with the Sun JVM; 7.3.1.x+ versions ship
with BEA's "JRockit" JVM – so the arguments to the 'java' executable in each
case varies. Ensure you get them correct for your platform, otherwise your App
Server may not start at all !

Enabling the flags
––––––––––––––––––
To enable the flags that make the JVM produce statistics:

1. Back up your config.xml in

<vignette>/runtime_services/8.1/domains/vgndomain/config.xml

2. Open the Runtime Services screen at http://vm–vgndev:27001/console/, and
log in as "vgnadmin/<password>".

3. Navigate to "Servers | VgnVCMServer | Remote Start".

4. In the "Arguments" field, add the following arguments to the end of the
string:

7.3.0.x (Sun's JVM)

–Xloggc:<path of output file> –XX:+PrintGCDetails

For example:

–Xloggc:C:/GC_VIEWER_OUTPUT.LOG –XX:+PrintGCDetails

7.3.1.x (BEA's JRockit JVM)

–verbosegc –Xverboselog:<path of output file>

For example:

–verbosegc –Xverboselog:C:/GC_VIEWER_OUTPUT.LOG

5. Click "Apply".

6. Restart the VgnVCMServer.

7. Check that the file you specified ("C:/GC_VIEWER_OUTPUT.LOG" in the example}
has been created.

Now you can run whatever testing you need.

Viewing the file in graphical format
––––––––––––––––––––––––––––––––––––
To view the output file in a graphical format, download the third–party tool
"gcviewer" from this website:

http://www.tagtraum.com/gcviewer.html

Tips:

* IMPORTANT: When the JVM restarts (ie, when you restart the VCM), it will
overwrite the same 'gc' file that was previously generated. Therefore , ensure
you copy the existing file before starting the JVM otherwise you will lose your
data !!

* On the "view" menu of "gcviewer", selecting just "Used Heap" (blue) and
"Total Heap" (red) gives a useful indication of the overall size of the heap
(red) and how much of the heap is used (blue).

* Use the "%" pulldown option to zoom in and out of the graph – this is handy
for getting an idea of the overall trends when you view a file that was
produced over a long period.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章