You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the nitrite db to store and delete objects, I am also doing a lot of find operations on it. To speed up the find operations I added an index field as well. I am not using it as an in-memory db. Is the Index in memory or also on disc?
The reason why I am asking is that the Eclipse MAT shows me the following thing:
One instance of org.h2.mvstore.MVStore loaded by jdk.internal.loader.ClassLoaders$AppClassLoader @ 0x80100000 occupies 31,479,256 (39.85%) bytes. The memory is accumulated in one instance of org.h2.mvstore.cache.CacheLongKeyLIRS$Segment[], loaded by jdk.internal.loader.ClassLoaders$AppClassLoader @ 0x80100000, which occupies 30,309,896 (38.37%) bytes.
The text was updated successfully, but these errors were encountered:
If you are using persistent disk based storage then index are also on disk.
The message what you are seeing is from H2 MVStore, (the underlying storage engine of nitrite), it uses LIRS cache. Here is the relevant section from it's documentation.
Concurrent reads and writes are supported. All such read operations can occur in parallel. Concurrent reads from the page cache, as well as concurrent reads from the file system are supported. Write operations first read the relevant pages from disk to memory (this can happen concurrently), and only then modify the data. The in-memory parts of write operations are synchronized. Writing changes to the file can occur concurrently to modifying the data, as writing operates on a snapshot.
Caching is done on the page level. The page cache is a concurrent LIRS cache, which should be resistant against scan operations.
For fully scalable concurrent write operations to a map (in-memory and to disk), the map could be split into multiple maps in different stores ('sharding'). The plan is to add such a mechanism later when needed.
Hello,
I am using the nitrite db to store and delete objects, I am also doing a lot of find operations on it. To speed up the find operations I added an index field as well. I am not using it as an in-memory db. Is the Index in memory or also on disc?
The reason why I am asking is that the Eclipse MAT shows me the following thing:
One instance of org.h2.mvstore.MVStore loaded by jdk.internal.loader.ClassLoaders$AppClassLoader @ 0x80100000 occupies 31,479,256 (39.85%) bytes. The memory is accumulated in one instance of org.h2.mvstore.cache.CacheLongKeyLIRS$Segment[], loaded by jdk.internal.loader.ClassLoaders$AppClassLoader @ 0x80100000, which occupies 30,309,896 (38.37%) bytes.
The text was updated successfully, but these errors were encountered: