ObjectDB ObjectDB

Cache usage

#1

after a runtime of several weeks we are now analyzing the usage of the cache and so on. Looking at the heap dump we suspect that the cache is really used (see heap dump attached), the RAM allocated by objectdb is much less than we would expect.

The database file has around 25 GByte of size and there is heavy traffic of around 400 clients communicating permanently via webSockets to the objectdb.

The config is attached as well.

The question is: is the cache really used ?

edit
delete
#2

The heap dump shows usage of several ObjectDB caches:

Page Cache (processing cache="2048mb")

It seems that when the heap dump was taken the size of the database page cache was about 1.4GB. It is less than the 2GB specified in the configuration, but the cache is purged periodically and 70% of the maximum size is normal. In addition to this cache, the OS manages its own cache and can use all the free RAM for database file pages, so if you have sufficient free RAM it is expected to be used anyway.

Query cache (query-cache results="256mb" programs="500")

54,283 query results are in the cache. Results have to be removed from the cache on every change to the data that may affect them. Query programs are not shown in the heap dump image, as the number of instances is less than 500.

Level 2 cache  (cache level2="4096mb")

About 90,000 entity objects are stored in that cache. They may take about 100MB, and anyway much less than the limit. This may be normal if only small part of the 25GB database was accessed since the creation of the EntityManagerFactory, but if not, it may indicate an issue.

Level 1 cache

Managed by the JVM automatically, and usually less relevant.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.