O'Reilly logo

Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ by Dan Scott, George Baklarz, Paul C. Zikopoulos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performance Tuning

You need to properly size Apache Derby memory. If you find that performance is sluggish, or if you encounter OutOfMemory exceptions (OOMEs), the first thing you should do is to adjust the Apache Derby pageCache. The amount of memory that you can safely allocate to the page cache depends on a combination of many factors: the amount of physical memory on your machine, the average pageSize, and the maxHeap of the JVM. The basic calculation is to compute the number of pages to allocate to the pageCache as a ratio of the JVM to the maxHeap size.

You set the maxHeap size using the Java parameter -Xmx#m. In this example, # is the size in MB that you want to allocate to this heap. For example, the command java -Xmx128m allocates 128 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required