I'd like to use neo4j on an ubuntu server. I guess the installation is via the package manager. I am new to neo4j, and I'd like to set memory and disk space usage limits, since the server is small, and has only 2G memory and 32GB disk space, no swap. I'd like to use at most 512M memory and 8GB disc space, if that is possible. Is there an easy way to set these limits?
1 Answer
You can configure
- Java heap in
conf/neo4j-wrapper.conf(java.maxmemory) - page-cache to in
conf/neo4j.properties(dbms.pagecache.memory=500M) - logical logs in
conf/neo4j.properties(keep_logical_logs=false)
There is currently no means to limit the size of the store files, so you have to limit the amount of data you put into the db.
Each node takes 15 bytes, each relationship 34 and each property block 42.
2 Comments
inf3rno
So setting java.maxmemory and dbms.pagecache.memory to 500M would be enough?
inf3rno
According to the comments in the config files it is additive, so 512 for the heap and another 512 for the cache. I set the cache to 256, so the total is 768MB. I hope it will be enough for the neo4j and the rest will be enough for the system, the nodejs and the pgsql.