I am working a java application using H2 Database in embedded mode. My Application consumes 150mb of heap memory.
Problem: Steps When I load H2 database with 2 mb of dat
In most cases, performance problems are not actually related to the cache size or page size. To analyze performance problems, see the H2 documentation, specially:
If you set the cache size manually to 1024 * 1024, then H2 will use 1 GB heap memory. This setting should only be use if you have a lot more than 1 GB of physical memory available to the JVM (using java -Xmx2048m
or similar). Otherwise, I suggest to use the default settings (16 MB cache size) instead.
Using a smaller page size than the default might decrease performance. This depends on the hard disk, and possibly on the access pattern. However, there is no list of rules when to use a non-default page size - the only way to find out is to try different settings.