inf3rno
inf3rno

Reputation: 26139

How can I limit neo4j memory and disc space usage on Ubuntu?

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?

Upvotes: 1

Views: 672

Answers (1)

Michael Hunger
Michael Hunger

Reputation: 41686

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.

Upvotes: 3

Related Questions