283 words

Cache usage

#1
2017-03-22 18:10

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 ?

hgzwicker
hgzwicker's picture
Joined on 2014-04-09
User Post #25
#2
2017-03-23 10:16

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,719

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel