Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warming up high throughput Java apps

I recently learned about scenarios which require warming up an app (with high throughput requirement) before they start serving real requests. The logic behind this was to allow JIT to do its performance magic!

Is this a norm for Java apps or is this generally done for memory heavy (footprint) apps?

like image 911
Aayush Puri Avatar asked Feb 11 '10 19:02

Aayush Puri


People also ask

How do you warm up JVM?

What Is Warming up the JVM. Once class-loading is complete, all important classes (used at the time of process start) are pushed into the JVM cache (native code) – which makes them accessible faster during runtime. Other classes are loaded on a per-request basis.

What is throughput in Java application?

7.1 Measuring Application Throughput In this document application throughput denotes the speed at which a Java application runs. If your application is a transaction-based system, high throughput means that more transactions are executed during a given amount of time.

What are warmup requests?

Warmup requests load your app's code into a new instance before any live requests reach that instance. If warmup requests are enabled for your application, App Engine attempts to detect when your application needs a new instance and initiates a warmup request to initialize a new instance.


1 Answers

If you are talking about a high traffic webapp/website then JIT is a very minor issue. The biggest problem is warming up (populating) all the cache layers you'll need to have. E.g ehcache regions which are being populated from hibernate. That's because IO related operations are orders of magnitude slower than anything that happens inside the CPU (that is unless you are calculating fractals :)

like image 114
cherouvim Avatar answered Sep 23 '22 17:09

cherouvim