Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated config setup

  • Loading branch information...
commit 1f8df4d89e3dd6615319bce42b9ef9d361cddde7 1 parent b3f3e8b
@jexp authored
View
2  run.sh
@@ -1,3 +1,3 @@
-source ./settings.sh
+. ./settings.sh
mvn clean test-compile exec:java -Dexec.mainClass=org.neo4j.batchimport.DisruptorTest -Dexec.classpathScope=test
View
4 settings.sh
@@ -1,10 +1,10 @@
MEMORY_OPTS="-Xmx50G -Xms50G -server -d64 -Xmn3g -XX:SurvivorRatio=2"
GC_OPTS="-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelCMSThreads=4 -XX:+CMSParallelRemarkEnabled -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycle=10 -XX:CMSFullGCsBeforeCompaction=1 "
-PRINT_GC_OPTS=" -XX:+PrintGCApplicationStoppedTime -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log"
+PRINT_GC_OPTS="-XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log"
# PROFILE_OPTS="-agentpath:/root/yourkit/bin/linux-x86-64/libyjpagent.so=port=10001"
-#-XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+PrintGCTaskTimeStamps
+#-XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+PrintGCTaskTimeStamps
export MAVEN_OPTS="$PROFILE_OPTS $MEMORY_OPTS $GC_OPTS $PRINT_GC_OPTS"
View
16 src/main/java/org/neo4j/batchimport/ParallelImporter.java
@@ -7,6 +7,7 @@
import org.neo4j.batchimport.structs.Relationship;
import org.neo4j.batchimport.utils.Params;
import org.neo4j.consistency.ConsistencyCheckTool;
+import org.neo4j.helpers.collection.MapUtil;
import org.neo4j.kernel.impl.util.FileUtils;
import org.neo4j.unsafe.batchinsert.BatchInserterImpl;
@@ -52,6 +53,7 @@
private static final boolean RUN_CHECK = false;
private static final int MEGABYTE = 1024 * 1024;
+ private static final File PROP_FILE = new File("batch.properties");
private DisruptorBatchInserter inserter;
private final File graphDb;
private final File nodesFile;
@@ -145,12 +147,20 @@ private void init() {
private static Map<String, String> config() {
+ if (PROP_FILE.exists()) {
+ try {
+ return MapUtil.load(PROP_FILE);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
return stringMap("use_memory_mapped_buffers", "true",
//"dump_configuration", "true",
"cache_type", "none",
- "neostore.nodestore.db.mapped_memory", "50M",
- "neostore.propertystore.db.mapped_memory", "1G",
- "neostore.relationshipstore.db.mapped_memory", "500M"
+ "neostore.nodestore.db.mapped_memory", "2G",
+ "neostore.propertystore.db.mapped_memory", "5G",
+ "neostore.relationshipstore.db.mapped_memory", "20G",
+ "neostore.propertystore.db.strings.mapped_memory","2G"
);
}
@Override
View
16 src/test/java/org/neo4j/batchimport/DisruptorTest.java
@@ -4,6 +4,7 @@
import org.junit.Ignore;
import org.neo4j.batchimport.structs.NodeStruct;
import org.neo4j.consistency.ConsistencyCheckTool;
+import org.neo4j.helpers.collection.MapUtil;
import org.neo4j.kernel.impl.util.FileUtils;
import org.neo4j.unsafe.batchinsert.BatchInserterImpl;
@@ -54,6 +55,7 @@
public static final String STORE_DIR = "target/test-db2";
public static final int NODES_TO_CREATE = 1000 * 1000 ;
private static final boolean RUN_CHECK = true;
+ private static final File PROP_FILE = new File("batch.properties");
@SuppressWarnings("unchecked")
public static void main(String[] args) throws Exception {
@@ -74,12 +76,20 @@ public static void main(String[] args) throws Exception {
}
private static Map<String, String> config() {
+ if (PROP_FILE.exists()) {
+ try {
+ return MapUtil.load(PROP_FILE);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
return stringMap("use_memory_mapped_buffers", "true",
//"dump_configuration", "true",
"cache_type", "none",
- "neostore.nodestore.db.mapped_memory", "1G",
- "neostore.propertystore.db.mapped_memory", "2G",
- "neostore.relationshipstore.db.mapped_memory", "5G"
+ "neostore.nodestore.db.mapped_memory", "2G",
+ "neostore.propertystore.db.mapped_memory", "5G",
+ "neostore.relationshipstore.db.mapped_memory", "20G",
+ "neostore.propertystore.db.strings.mapped_memory","2G"
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.