I currently have a very strange behavior with performance when running neo4j community as Docker. First of all, I am currently importing JSON data into a neo4j database using the https://github.com/BloodHoundAD/BloodHound program. Boodhound uses the JS file for the import. The import itself works fine, however I have a very different behavior when I run the neo4j natively or as a docker container.
Now when I import the data on a native Neo4j database it takes about 1 min (even with multiple attempts).
All files imported in 66.52 s.
The memory settings are set to the following values:
Since I need multiple instances of neo4j for my tests, I came up with the idea to docker this and thus create multiple containers for multiple instances of neo4j. When I start the Docker container (and set the same settings as in the native Neo4j database) the import takes very different times and significantly longer:
started with: sudo docker run --name "testneo4j" --rm -p 7687:7687 -p 7474:7474 --env NEO4J_AUTH=neo4j/test --env NEO4J_dbms_memory_pagecache_size=5G --env NEO4J_dbms_memory_heap_max__size=5G neo4j:4.2.3 Results: All files imported in 1052.01 s. All files imported in 383.83 s. All files imported in 415.76 s. All files imported in 661.72 s. All files imported in 710.43 s. All files imported in 415.76 s All files imported in 642.58 s
Since it requires additional effort with Docker, I expected a longer runtime. However, the fact that the times increase roughly by a factor of 10 seems strange to me. In addition, the import times are not stable, which I can not really explain.
Now to my actual question, are there any settings on the Docker side or the neo4j Docker container that can cause such a slowdown (factor 10)? Also, can anyone explain why the times are not constant?
I have already tried several things with the parallelization of the import, as well as the order of the files to be imported, but the behavior itself has not changed.
Thanks in advance, I am open to any idea :)