A high-throughput Java OLTP system may need a bigger heap

Your system just does some basic work. It doesn’t involve big objects or long-lived objects. But you may still need a bigger heap if It frequently creates many short-lived objects.

One example is logging. Some logging libraries may create tons of byte[] objects, such as logback 1.2.x

So why is a bigger heap needed? Because short-lived small objects can survive for sometime before being garbage collected. And if the throughput is high, they can accumulate quickly and take up memory. If the heap size is not big enough, full GCs may be forced to happen.

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.