Skip to content

Commit

Permalink
Tuned Java Memory Allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Wiens committed Feb 4, 2025
1 parent 3d8584c commit 7bce34e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ ENV LD_PRELOAD="/usr/lib64/libjemalloc.so"
ENTRYPOINT ["java", \
"-Djava.rmi.server.hostname=$DOCKER_HOST_IP", \
"-Dlogback.configurationFile=/home/logback.xml", \
"-Xmx128M", \
"-Xms16M", \
"-Xmx1024M", \
"-Xms128M", \
"-XX:+UseG1GC", \
"-XX:MaxGCPauseMillis=20", \
"-XX:InitiatingHeapOccupancyPercent=35", \
Expand All @@ -50,7 +50,7 @@ ENTRYPOINT ["java", \
"-XX:MaxMetaspaceFreeRatio=80", \
"-XX:+ExplicitGCInvokesConcurrent", \
"-XX:InitialRAMPercentage=5.0", \
"-XX:MaxRAMPercentage=50.0", \
# "-XX:MaxRAMPercentage=50.0", \
"-jar", \
"/home/jpo-deduplicator.jar"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class BoundedMemoryRocksDBConfig implements RocksDBConfigSetter {
TOTAL_MEMTABLE_MEMORY = getEnvLong("DEDUPLICATOR_ROCKSDB_TOTAL_MEMTABLE_MEMORY", 64 * MB);
BLOCK_SIZE = getEnvLong("DEDUPLICATOR_ROCKSDB_BLOCK_SIZE", 4 * KB);
N_MEMTABLES = getEnvInt("DEDUPLICATOR_ROCKSDB_N_MEMTABLES", 2);
MEMTABLE_SIZE = getEnvLong("ROCKSDB_MEMTABLE_SIZE", 16 * MB);
MEMTABLE_SIZE = getEnvLong("DEDUPLICATOR_ROCKSDB_MEMTABLE_SIZE", 16 * MB);

log.info("Initialized BoundedMemoryRocksDBConfig. TOTAL_OFF_HEAP_MEMORY = {}, INDEX_FILTER_BLOCK_RATIO = {}," +
" TOTAL_MEMTABLE_MEMORY = {}, BLOCK_SIZE = {}, N_MEMTABLES = {}, MEMTABLE_SIZE = {}",
Expand Down

0 comments on commit 7bce34e

Please sign in to comment.