Hi,
We are testing performance on a Java application which uses a H2 database in server mode (in a dedicated JVM) and we have noticed an important CPU and Heap memory consumption by the H2 JVM even though there is very little or no JDBC activity
For information we monitor H2 JVM with Java Mission Control (via JMX).
In the attached exemple, we have some activity before 14:30 and after 14:30 we have 1.5 req / min (average)
1) Heap Memory
As we can see in screenshot, heap memory is constantly increasing even when we have Major GC, the heap size doesn't return to the initial level.
The JVM Heap max size is frequently increased from 35Mo to 55Mo.
2) Heap CPU
CPU Heap consumption fluctuates always between 10-20% with some pics over 40%
We have big constraints in terms of RAM and CPU consumption since we are on an embedded system with a small hardware configuration (1 core and 256 Mo RAM).
Can you tell us how can we optimize this ? limit H2 cache size ? limit H2 background activity
If you have another tools to monitor h2 performance we are also interested for example to get JDBC stats, Cache utilization
JVM args : -Xms32M -Xmx64M
JDBC URL : jdbc.h2.url=jdbc:h2:tcp://localhost:1521/k;DB_CLOSE_ON_EXIT=FALSE;TRACE_LEVEL_FILE=4;INIT=CREATE SCHEMA IF NOT EXISTS XXX\\;SET SCHEMA XXX;
H2 version : 1.4.196
Thanks
Mansour