Repository: asterixdb
Updated Branches:
  refs/heads/master 77c8c7907 -> 5818b3f8a


[NO ISSUE] Increase Default Log Page Size

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- The current log page default size (128KB) is too small for high
throughput disk writes. Increase it to 4MB.

Change-Id: I83595e12abb531293a64eb12a1be3e15bafca463
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2553
Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <ima...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/5818b3f8
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/5818b3f8
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/5818b3f8

Branch: refs/heads/master
Commit: 5818b3f8a955241d32adf23beaaf126bae6aff18
Parents: 77c8c79
Author: luochen01 <cl...@uci.edu>
Authored: Fri Mar 30 21:56:58 2018 -0700
Committer: Luo Chen <cl...@uci.edu>
Committed: Mon Apr 2 14:11:03 2018 -0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/asterix/test/txn/LogManagerTest.java | 3 +++
 .../src/test/resources/cc-small-txn-log-partition.conf            | 1 +
 .../results/api/cluster_state_1/cluster_state_1.1.regexadm        | 2 +-
 .../api/cluster_state_1_full/cluster_state_1_full.1.regexadm      | 2 +-
 .../api/cluster_state_1_less/cluster_state_1_less.1.regexadm      | 2 +-
 .../org/apache/asterix/common/config/TransactionProperties.java   | 2 +-
 asterixdb/asterix-doc/src/site/markdown/ncservice.md              | 2 +-
 7 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5818b3f8/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/txn/LogManagerTest.java
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/txn/LogManagerTest.java
 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/txn/LogManagerTest.java
index 1c8ac62..4453a1d 100644
--- 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/txn/LogManagerTest.java
+++ 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/txn/LogManagerTest.java
@@ -28,6 +28,7 @@ import org.apache.asterix.common.TestDataUtil;
 import org.apache.asterix.common.api.IDatasetLifecycleManager;
 import org.apache.asterix.common.api.INcApplicationContext;
 import org.apache.asterix.common.config.GlobalConfig;
+import org.apache.asterix.common.config.TransactionProperties;
 import org.apache.asterix.common.dataflow.DatasetLocalResource;
 import org.apache.asterix.common.exceptions.ACIDException;
 import org.apache.asterix.common.exceptions.ExceptionUtils;
@@ -64,6 +65,8 @@ public class LogManagerTest {
     @Before
     public void setUp() throws Exception {
         System.setProperty(GlobalConfig.CONFIG_FILE_PROPERTY, 
TEST_CONFIG_FILE_NAME);
+        // use a small page size for test purpose
+        
integrationUtil.addOption(TransactionProperties.Option.TXN_LOG_BUFFER_PAGESIZE, 
128 * 1024);
         integrationUtil.init(true, TEST_CONFIG_FILE_NAME);
     }
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5818b3f8/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf 
b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
index 6cd3b87..811a40d 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
@@ -52,5 +52,6 @@ compiler.joinmemory=256KB
 messaging.frame.size=4096
 messaging.frame.count=512
 txn.log.partitionsize=2MB
+txn.log.buffer.pagesize=128KB
 txn.log.checkpoint.pollfrequency=2147483647
 storage.max.active.writable.datasets=50
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5818b3f8/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
index 28ef0eb..03eb4be 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
@@ -38,7 +38,7 @@
     "txn\.lock\.timeout\.sweepthreshold" : 10000,
     "txn\.lock\.timeout\.waitthreshold" : 60000,
     "txn\.log\.buffer\.numpages" : 8,
-    "txn\.log\.buffer\.pagesize" : 131072,
+    "txn\.log\.buffer\.pagesize" : 4194304,
     "txn\.log\.checkpoint\.history" : 0,
     "txn\.log\.checkpoint\.lsnthreshold" : 67108864,
     "txn\.log\.checkpoint\.pollfrequency" : 120,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5818b3f8/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
index 61cf528..ae08a2b 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
@@ -38,7 +38,7 @@
     "txn\.lock\.timeout\.sweepthreshold" : 10000,
     "txn\.lock\.timeout\.waitthreshold" : 60000,
     "txn\.log\.buffer\.numpages" : 8,
-    "txn\.log\.buffer\.pagesize" : 131072,
+    "txn\.log\.buffer\.pagesize" : 4194304,
     "txn\.log\.checkpoint\.history" : 0,
     "txn\.log\.checkpoint\.lsnthreshold" : 67108864,
     "txn\.log\.checkpoint\.pollfrequency" : 120,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5818b3f8/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
index d340386..fba43bb 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
@@ -38,7 +38,7 @@
     "txn\.lock\.timeout\.sweepthreshold" : 10000,
     "txn\.lock\.timeout\.waitthreshold" : 60000,
     "txn\.log\.buffer\.numpages" : 8,
-    "txn\.log\.buffer\.pagesize" : 131072,
+    "txn\.log\.buffer\.pagesize" : 4194304,
     "txn\.log\.checkpoint\.history" : 0,
     "txn\.log\.checkpoint\.lsnthreshold" : 67108864,
     "txn\.log\.checkpoint\.pollfrequency" : 120,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5818b3f8/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
index c15f8a7..4ee00cd 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
@@ -38,7 +38,7 @@ public class TransactionProperties extends AbstractProperties 
{
         TXN_LOG_BUFFER_NUMPAGES(INTEGER, 8, "The number of pages in the 
transaction log tail"),
         TXN_LOG_BUFFER_PAGESIZE(
                 INTEGER_BYTE_UNIT,
-                StorageUtil.getIntSizeInBytes(128, KILOBYTE),
+                StorageUtil.getIntSizeInBytes(4, MEGABYTE),
                 "The page size (in bytes) for transaction log buffer"),
         TXN_LOG_PARTITIONSIZE(
                 LONG_BYTE_UNIT,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5818b3f8/asterixdb/asterix-doc/src/site/markdown/ncservice.md
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-doc/src/site/markdown/ncservice.md 
b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
index 1d174e9..9804c05 100644
--- a/asterixdb/asterix-doc/src/site/markdown/ncservice.md
+++ b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
@@ -368,7 +368,7 @@ The following parameters are configured under the 
"[common]" section.
 | common  | txn.lock.timeout.sweepthreshold           | Interval (in 
milliseconds) for checking lock timeout | 10000 |
 | common  | txn.lock.timeout.waitthreshold            | Time out (in 
milliseconds) of waiting for a lock | 60000 |
 | common  | txn.log.buffer.numpages                   | The number of pages in 
the transaction log tail | 8 |
-| common  | txn.log.buffer.pagesize                   | The page size (in 
bytes) for transaction log buffer | 131072 (128 kB) |
+| common  | txn.log.buffer.pagesize                   | The page size (in 
bytes) for transaction log buffer | 4194304 (4MB) |
 | common  | txn.log.checkpoint.history                | The number of 
checkpoints to keep in the transaction log | 0 |
 | common  | txn.log.checkpoint.lsnthreshold           | The checkpoint 
threshold (in terms of LSNs (log sequence numbers) that have been written to 
the transaction log, i.e., the length of the transaction log) for transaction 
logs | 67108864 (64 MB) |
 | common  | txn.log.checkpoint.pollfrequency          | The frequency (in 
seconds) the checkpoint thread should check to see if a checkpoint should be 
written | 120 |

Reply via email to