Modified storage config paramters.
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixAppRuntimeContext.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixAppRuntimeContext.java
index 76b3a22..719ec37 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixAppRuntimeContext.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/common/AsterixAppRuntimeContext.java
@@ -27,13 +27,13 @@
import edu.uci.ics.asterix.common.config.AsterixTransactionProperties;
import edu.uci.ics.asterix.common.config.IAsterixPropertiesProvider;
import edu.uci.ics.asterix.common.context.AsterixFileMapManager;
-import edu.uci.ics.asterix.common.context.ConstantMergePolicy;
import edu.uci.ics.asterix.common.context.DatasetLifecycleManager;
import edu.uci.ics.asterix.common.context.PrefixMergePolicy;
import edu.uci.ics.asterix.common.exceptions.ACIDException;
import edu.uci.ics.asterix.common.exceptions.AsterixException;
import edu.uci.ics.asterix.common.transactions.IAsterixAppRuntimeContextProvider;
import edu.uci.ics.asterix.common.transactions.ITransactionSubsystem;
+import edu.uci.ics.asterix.metadata.bootstrap.MetadataPrimaryIndexes;
import edu.uci.ics.asterix.transaction.management.resource.PersistentLocalResourceRepository;
import edu.uci.ics.asterix.transaction.management.resource.PersistentLocalResourceRepositoryFactory;
import edu.uci.ics.asterix.transaction.management.service.transaction.TransactionSubsystem;
@@ -118,8 +118,9 @@
localResourceRepository = (PersistentLocalResourceRepository) persistentLocalResourceRepositoryFactory
.createRepository();
resourceIdFactory = (new ResourceIdFactoryProvider(localResourceRepository)).createResourceIdFactory();
- indexLifecycleManager = new DatasetLifecycleManager(storageProperties, localResourceRepository);
- IAsterixAppRuntimeContextProvider asterixAppRuntimeContextProvider = new AsterixAppRuntimeContextProviderForRecovery(
+ indexLifecycleManager = new DatasetLifecycleManager(storageProperties, localResourceRepository,
+ MetadataPrimaryIndexes.FIRST_AVAILABLE_USER_DATASET_ID);
+ IAsterixAppRuntimeContextProvider asterixAppRuntimeContextProvider = new AsterixAppRuntimeContextProdiverForRecovery(
this);
txnSubsystem = new TransactionSubsystem(ncApplicationContext.getNodeId(), asterixAppRuntimeContextProvider,
txnProperties);
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixStorageProperties.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixStorageProperties.java
index d7ff15d..74c3bb1 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixStorageProperties.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/config/AsterixStorageProperties.java
@@ -17,19 +17,22 @@
public class AsterixStorageProperties extends AbstractAsterixProperties {
private static final String STORAGE_BUFFERCACHE_PAGESIZE_KEY = "storage.buffercache.pagesize";
- private static int STORAGE_BUFFERCACHE_PAGESIZE_DEFAULT = (32 << 10); // 32KB
+ private static int STORAGE_BUFFERCACHE_PAGESIZE_DEFAULT = (128 << 10); // 128KB
private static final String STORAGE_BUFFERCACHE_SIZE_KEY = "storage.buffercache.size";
- private static final long STORAGE_BUFFERCACHE_SIZE_DEFAULT = (32 << 20); // 32 MB
+ private static final long STORAGE_BUFFERCACHE_SIZE_DEFAULT = (512 << 20); // 512 MB
private static final String STORAGE_BUFFERCACHE_MAXOPENFILES_KEY = "storage.buffercache.maxopenfiles";
private static int STORAGE_BUFFERCACHE_MAXOPENFILES_DEFAULT = Integer.MAX_VALUE;
private static final String STORAGE_MEMORYCOMPONENT_PAGESIZE_KEY = "storage.memorycomponent.pagesize";
- private static final int STORAGE_MEMORYCOMPONENT_PAGESIZE_DEFAULT = (32 << 10); // 32KB
+ private static final int STORAGE_MEMORYCOMPONENT_PAGESIZE_DEFAULT = (128 << 10); // 128KB
private static final String STORAGE_MEMORYCOMPONENT_NUMPAGES_KEY = "storage.memorycomponent.numpages";
- private static final int STORAGE_MEMORYCOMPONENT_NUMPAGES_DEFAULT = 1024; // ... so 32MB components
+ private static final int STORAGE_MEMORYCOMPONENT_NUMPAGES_DEFAULT = 256; // ... so 32MB components
+
+ private static final String STORAGE_METADATA_MEMORYCOMPONENT_NUMPAGES_KEY = "storage.metadata.memorycomponent.numpages";
+ private static final int STORAGE_METADATA_MEMORYCOMPONENT_NUMPAGES_DEFAULT = 256; // ... so 32MB components
private static final String STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS_KEY = "storage.memorycomponent.numcomponents";
private static final int STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS_DEFAULT = 2; // 2 components
@@ -76,6 +79,13 @@
PropertyInterpreters.getIntegerPropertyInterpreter());
}
+ public int getMetadataMemoryComponentNumPages() {
+ return accessor
+ .getProperty(STORAGE_METADATA_MEMORYCOMPONENT_NUMPAGES_KEY,
+ STORAGE_METADATA_MEMORYCOMPONENT_NUMPAGES_DEFAULT,
+ PropertyInterpreters.getIntegerPropertyInterpreter());
+ }
+
public int getMemoryComponentsNum() {
return accessor.getProperty(STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS_KEY,
STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS_DEFAULT, PropertyInterpreters.getIntegerPropertyInterpreter());
@@ -95,4 +105,4 @@
return accessor.getProperty(STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE_KEY,
STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE_DEFAULT, PropertyInterpreters.getDoublePropertyInterpreter());
}
-}
+}
\ No newline at end of file
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/DatasetLifecycleManager.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/DatasetLifecycleManager.java
index 617b6ff..265188e 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/DatasetLifecycleManager.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/DatasetLifecycleManager.java
@@ -48,13 +48,15 @@
private final Map<Integer, ILSMOperationTracker> datasetOpTrackers;
private final Map<Integer, DatasetInfo> datasetInfos;
private final ILocalResourceRepository resourceRepository;
+ private final int firstAvilableUserDatasetID;
private final long capacity;
private long used;
public DatasetLifecycleManager(AsterixStorageProperties storageProperties,
- ILocalResourceRepository resourceRepository) {
+ ILocalResourceRepository resourceRepository, int firstAvilableUserDatasetID) {
this.storageProperties = storageProperties;
this.resourceRepository = resourceRepository;
+ this.firstAvilableUserDatasetID = firstAvilableUserDatasetID;
datasetVirtualBufferCaches = new HashMap<Integer, List<IVirtualBufferCache>>();
datasetOpTrackers = new HashMap<Integer, ILSMOperationTracker>();
datasetInfos = new HashMap<Integer, DatasetInfo>();
@@ -298,12 +300,12 @@
List<IVirtualBufferCache> vbcs = datasetVirtualBufferCaches.get(datasetID);
if (vbcs == null) {
vbcs = new ArrayList<IVirtualBufferCache>();
+ int numPages = datasetID < firstAvilableUserDatasetID ? storageProperties
+ .getMetadataMemoryComponentNumPages() : storageProperties.getMemoryComponentNumPages();
for (int i = 0; i < storageProperties.getMemoryComponentsNum(); i++) {
- MultitenantVirtualBufferCache vbc = new MultitenantVirtualBufferCache(
- new VirtualBufferCache(new HeapBufferAllocator(),
- storageProperties.getMemoryComponentPageSize(),
- storageProperties.getMemoryComponentNumPages()
- / storageProperties.getMemoryComponentsNum()));
+ MultitenantVirtualBufferCache vbc = new MultitenantVirtualBufferCache(new VirtualBufferCache(
+ new HeapBufferAllocator(), storageProperties.getMemoryComponentPageSize(), numPages
+ / storageProperties.getMemoryComponentsNum()));
vbcs.add(vbc);
}
datasetVirtualBufferCaches.put(datasetID, vbcs);
diff --git a/asterix-installer/src/main/resources/conf/asterix-configuration.xml b/asterix-installer/src/main/resources/conf/asterix-configuration.xml
index 084a3f8..c74f1d6 100644
--- a/asterix-installer/src/main/resources/conf/asterix-configuration.xml
+++ b/asterix-installer/src/main/resources/conf/asterix-configuration.xml
@@ -16,7 +16,7 @@
<property>
<name>nc.java.opts</name>
- <value>-Xmx1024m</value>
+ <value>-Xmx1536m</value>
<description>JVM parameters for each Node Contoller (NC)</description>
</property>
@@ -29,18 +29,18 @@
<property>
<name>storage.buffercache.pagesize</name>
- <value>32768</value>
+ <value>131072</value>
<description>The page size in bytes for pages in the buffer cache.
- (Default = "32768" // 32KB)
+ (Default = "131072" // 128KB)
</description>
</property>
<property>
<name>storage.buffercache.size</name>
- <value>33554432</value>
+ <value>536870912</value>
<description>The size of memory allocated to the disk buffer cache.
The value should be a multiple of the buffer cache page size(Default
- = "33554432" // 32MB)
+ = "536870912" // 512MB)
</description>
</property>
@@ -54,17 +54,25 @@
<property>
<name>storage.memorycomponent.pagesize</name>
- <value>32768</value>
+ <value>131072</value>
<description>The page size in bytes for pages allocated to memory
- components. (Default = "32768" // 32KB)
+ components. (Default = "131072" // 128KB)
</description>
</property>
<property>
<name>storage.memorycomponent.numpages</name>
- <value>1024</value>
+ <value>256</value>
<description>The number of pages to allocate for a memory component.
- (Default = 1024)
+ (Default = 256)
+ </description>
+ </property>
+
+ <property>
+ <name>storage.metadata.memorycomponent.numpages</name>
+ <value>64</value>
+ <description>The number of pages to allocate for a memory component.
+ (Default = 64)
</description>
</property>
@@ -100,7 +108,7 @@
filters associated with LSM indexes. (Default = "0.01" // 1%)
</description>
</property>
-
+
<property>
<name>txn.log.buffer.numpages</name>
<value>8</value>
@@ -110,9 +118,9 @@
<property>
<name>txn.log.buffer.pagesize</name>
- <value>131072</value>
+ <value>524288</value>
<description>The size of pages in the in-memory log buffer. (Default =
- "131072" // 128KB)
+ "524288" // 512KB)
</description>
</property>
@@ -201,9 +209,9 @@
<property>
<name>compiler.framesize</name>
- <value>32768</value>
+ <value>131072</value>
<description>The Hyracks frame size that the compiler configures per
- job. (Default = "32768" // 32KB)
+ job. (Default = "131072" // 128KB)
</description>
</property>