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 ...

Get Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.