Monitoring JVM memory and garbage collection | Heap fragmentation due to pinned and dosed objects
Enable verbose garbage collection
To set up verbose garbage collection, open the WebSphere Application Server administrative console and follow these steps:
- Open the WebSphere Application Server administration site.
- Select...
Servers | Application servers | server1 | Java and Process Management | Process Definition | Java Virtual Machine- Set Verbose Garbage Collection to true
- Click Apply and click Save at the top of this page.
- Restart WebSphere Application Server.
Here is an example of verbose garbage collection output:
<AF[2]: Allocation Failure. need 6920 bytes, 44962 ms since last AF> <AF[2]: managing allocation failure, action=1 (0/533723648) (3145728/3145728)> <GC(2): GC cycle started Mon Oct 13 14:34:35 2003 <GC(2): freed 396872056 bytes, 74% free (400017784/536869376), in 411 ms> <GC(2): mark: 342 ms, sweep: 69 ms, compact: 0 ms> <GC(2): refs: soft 0 (age >= 32), weak 2, final 6655, phantom 0> <AF[2]: completed in 414 ms>