, 10 tweets, 5 min read Read on Twitter
Now @siruslan is going to talk about automatic scaling of the Java heap in the Elastic JVM. #DevopsDays We hear a lot about horizontal scaling, but people underestimate the use of vertical scaling.
Java can be greedy... so much memory consumption! Before founding Jelastic, @siruslan found there was no good hosting for Java apps (vs. lots for PHP) because of that. #DevOpsDays
Problem with horizontal scaling: sometimes you’re just scaling an inefficient process. Java is hard to vertically scale (despite the popularity of containers now) because you can’t resize it on the fly. #DevopsDays
The G1 garbage collector allows scaling down the JVM, yay! You do have to call it specifically, though. (And don’t use aggressive mode: then there’s no vertical scaling, the reserved heap is constant. This is good where you really need stability.) #DevopsDays
They were using a workaround: inject an agent to periodically call full GC with the G1 garbage collector. Then they ended up making a patch to the JVM itself. :) (Coming out with JDK version 12.) Awesome! #DevopsDays @siruslan Slide: details of upcoming improvements to unused committed memory handling
This is a hot topic in Java right now: see also the Shenandoa GC, the Z GC, OpenJ9. Vertical scaling is unavoidable, now everything is running in containers in the cloud. So: no more reason to pay your hosting for the max memory, rather than the used memory. ;) #DevopsDays
Another memory tip: The JVM can have reserved memory inside *and* out of the heap, if your heap is set quite small. Use the NativeMemoryTracking parameter to keep track of that (this gives a performance penalty but can be useful for diagnosis of memory issues). #DevopsDays
Q: is there a CPU cost to this kind of continuous garbage collection?

A: yes, but you can set a threshold of CPU usage, below which you don’t collect garbage. In future they also want to check I/O load for this, so as not to reduce reserved memory when that’s high. #DevopsDays
(I think that answer was about Jelastic specifically.)
@threadreaderapp Unroll, svp.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Rae Knowler
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!