From 875885dfa994609c78b8a03989c29e29bf4c11e8 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Sun, 12 May 2013 11:23:40 +0000 Subject: [PATCH] Increase the default auto compaction ratio. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1481528 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/scala/org/apache/activemq/leveldb/LevelDBClient.scala | 1 - .../main/scala/org/apache/activemq/leveldb/LevelDBStore.scala | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala index 0cc4db9c73..81bfa45713 100755 --- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala +++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala @@ -1422,7 +1422,6 @@ class LevelDBClient(store: LevelDBStore) { val ratio = (index_usage*1.0f/index_queue_entries) // println("usage: index_usage:%d, index_queue_entries:%d, ratio: %f".format(index_usage, index_queue_entries, ratio)) - // After running some load we empirically found that a healthy ratio is between 12 and 25 bytes per entry. // lets compact if we go way over the healthy ratio. if( ratio > store.autoCompactionRatio ) { index.compact_needed = true diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala index e93b83bf42..de5718a3c6 100644 --- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala +++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala @@ -174,7 +174,7 @@ class LevelDBStore extends LockableServiceSupport with BrokerServiceAware with P @BeanProperty var monitorStats = false @BeanProperty - var autoCompactionRatio = 100 + var autoCompactionRatio = 250 var purgeOnStatup: Boolean = false