jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.89k stars 873 forks source link

Memory limits for compaction to work #799

Open edudar opened 7 years ago

edudar commented 7 years ago

I run java service with Xms1G and Xmx2G. My mapdb file is 1.4G. Compaction fails with java.lang.OutOfMemoryError: Java heap space. While the solution here would be to increase Xmx to probably 4G it's interesting what limitations are expected for memory consumption. Like, what memory ranges are OK when DB size is XG, YG or ZG. Or maybe it's possible to avoid OOM even for small services and large DBs.

jankotek commented 7 years ago

Compaction should not use too much heap. Will investigate

edudar commented 6 years ago

The latest here: 5.8GB mapdb file and 10G Xmx result into java heap space OOM...