How to tune the heap utilization of the JVM

This section describes in detail how to analyze and tune a JVM. As I explained above an optimized configuration can neither be calculated nor guessed because the heap utilization depends on the application and its usage. We usually start with a suboptimal configuration provided by an experienced developer. 

On a nonfunctional tool test environment, we put a realistic load on the application and measure/analyze the behavior. From the analysis results, we derive an optimized JVM configuration. This configuration will be tested and analysed again and so forth until we get a satisfying outcome with our optimized JVM configuration.

In order to demonstrate the optimization of the heap utilization, I wrote a small Java application that simulates the creation of two different lifeforms (grass and sheep) at given ratios. This is not a real-life simulation. In fact you would be surprised how simple it is. The applications only purpose is to instantiate a lot of small objects with a little life and some bigger objects that have a much higher lifespan

 

The Eventoriented Programming Model

Event oriented Programming in testing firms which is sometimes called “event programming” is a programming model used as an alternative to programming with threads. Programing model always change depending on the requirement of the industry and the generation.

 

Why does this matter

I think it was around 1998 when we first learned that the clock rate could not be increased and we were about to seeing the end of Moore’s law that the number of transistors that compounds a CPU will double every two years. The CPU clock rate at this time was slightly below 1 GHz. A few months later clever scientists discovered a way around that barrier and Moore’s law applied again. The computer industry was saved. I believe I was not the only one who did not take it seriously when in 2005 they announced that they really can not increase the clock rate any further. I was like “yeah, you will discover it within no time”. Now it is crystal clear that the only way to increase the computing power of a CPU is to give it more cores. Energy consumption/ cooling constraints the clock rate and we know today that energy-efficient computing requires clock rates to drop again to below 1 GHz.

Today having more than one core on the CPU is yesterday’s news because everybody already has at least a dual-core CPU in his or her PC. The hardware is available but parallel computing is still the hardest challenge we are today facing in the computer industry. At the moment our machines have multiple cores but we are not able to put them to effective use. Not being able to increase computing power in the PC is a serious threat for the industry because nobody will replace one unless it breaks. Besides the economic aspects, there are a lot of topics desperately waiting for more computing power like speech, image recognition, and advanced computer interfaces.

Spread the knowledge
Streaming Words is a part of the news, tips, marketing, beauty, fashion, health, and more informative websites.
Back To Top