[Neo4j] Can we commit at regular intervals in batch insert mode

Suruchi Deodhar deodharsuruchi at gmail.com
Wed Jun 23 00:00:49 CEST 2010


Hi Mattias,

Replying to your query on the forum.

Could you copy-paste the exact command line to start java? I'd like to
see if there's some tyop with the heap size option.


I typed following command for execution.:
/usr/java/default/bin/java -Xmx2048M BuildGraph.java

where Java 1.6 executable version is stored at /usr/java/default/bin/java

I am running many queries on the Graph DB that I created and noticed that
the speed of query execution depends a lot on memory heap size available and
how many nodes and relationships are being read in main memory by the graph.
For eg. A query that has a call to getAllNodes() would take a much longer
duration to process. (I have close to 2 million nodes)
Just to confirm, what is the optimal way to commit after querying/updating a
fixed size of data say 20, 000 nodes. Do we need to call tx.finish() every
time after processing 20, 000 nodes?

Do you know of any other optimizations to make query processing faster and
more efficient??

Details on my server config:

1. Java version:
javac version: javac 1.6.0_18
java version: (default) "1.4.2_17"
However, while executing the program, I use the java executable 1.6.0_18.

2. Neo4j version:

I downloaded the neo4j-apoc-1.0.zip<http://dist.neo4j.org/neo4j-apoc-1.0.zip>
 from the website and using it for the project.

3. - RAM, OS and Filesystem of your machine?

2 Intel Xeon Quad-Core 3.0GHz CPUs
96 nodes, each node with 2 Intel Quad-Core Xeon E5440 processo
RAM - 16 GB(2 GB/Core) . I am running the code on the head node currently.
OS-SUSE Linux Enterprise Server 10.2 (x86_64)


~Suruchi


More information about the User mailing list