Garbage Collection in Java is a neat feature: It helps developers focus on the important business and application logic while the runtime takes care of the memory management. While this process is mostly automated, it can still be worthwhile to pay attention to what the garbage collector is doing and how efficiently it performs its job.
When we at Living Mainframe are asked to look at the health status of a WebSphere Application server on z/OS, one of our first steps is to take a look at the log files produced by the various garbage collections running all the time on the server. We have developed a small tool (called the Living Mainframe GC Log Visualizer) which helps us quickly extracting the most important information from the vast amount of log files and visualizing the key insights.
For example, we look at a metric which we call “GB freed per second” which indicates how effective garbage collection is being performed on a particular server: Some servers free over 100GB on average in a single CPU second which is very good. Others average only between 10 and 30 GB per second – which is still very acceptable. However, some servers only free up less than 1 GB per second on average. Those servers need special attention as they might waste valuable CPU resources performing garbage collections without actually disposing any “garbage”.
For those servers, it might make sense to increase the maximum heap to prevent and endless cycle of low-performing garbage collections followed by the application almost immediately allocating new memory which triggers another vicious cycle. In many cases, the “maximum used” metric can be very helpful for calculating a recommended heap size which is neither too large nor too small. Our tool conviniently shows this information directly on the front page.
Want to learn more about how the Living Mainframe GC Log Visualizer can help your organization utilize their resources more effectively and prevent IBM WebSphere Servers on z/OS from wasting resources during garbage collection?
Contact us and find out more!