Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4J database size / shrinking

We have a neo4j database with ~10Mil nodes and ~300 million relationships. the database has grown to about 80 Gig. There are daily jobs that kill off old data and add new data, so the approx number of nodes and relationships stays fairly constant. However, the physical file size of the db files keeps on growing (for example, the relationshipstore file is at 50Gig currently).

I have found the following link that might explain why the size might not go down when deleting (space is left reserved and is taken up by new relationships and nodes), however it still does not explain why our database keeps growing! neostore.* file size after deleting millions node

Questions:

a) What can we check to find out why our db is still growing?

b) Most relational db's I've worked with always had "shrink files" or "optimize free space" function. Does something like this exist for Neo4j? (google search was unsuccessful!).

Thank you,

-A

P.S. We're running Neo4j 2.1.5 Community Edition on Ubuntu 14

like image 798
Diaspar Avatar asked Nov 09 '22 23:11

Diaspar


1 Answers

There is a tool called store-utils which will allow you to effectively compact the store. You'd have to shut down the store before running that though.

As always take a back up before you try out any tools that do anything with the store.

like image 95
Mark Needham Avatar answered Nov 12 '22 13:11

Mark Needham