commit | 413573d5abb6063aac31b84c9f6dce4e2caed547 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Nov 10 09:45:18 2014 -0800 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Nov 10 09:47:39 2014 -0800 |
tree | ee330dca081610dc5dfb4677f905c3a0bb64a33c | |
parent | 7cd48f362032880123c84ac51d0a5750c4accdea [diff] |
MapDBLog: reduce cache size Change-Id: I4a3ba607e85fb1ac1b350ca84bfa88a51a59773e
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/MapDBLog.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/MapDBLog.java index 637a643..6c33445 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/MapDBLog.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/MapDBLog.java
@@ -41,6 +41,8 @@ private static final String LOG_NAME = "log"; private static final String SIZE_FIELD_NAME = "size"; + private int cacheSize = 256; + public MapDBLog(String dbFileName, StoreSerializer serializer) { this.dbFile = new File(dbFileName); this.serializer = serializer; @@ -50,6 +52,8 @@ public void open() throws IOException { txMaker = DBMaker .newFileDB(dbFile) + .cacheLRUEnable() + .cacheSize(cacheSize) .makeTxMaker(); }