Neo4J database size / shrinking

2019-04-09 12:26发布

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

1条回答
何必那么认真
2楼-- · 2019-04-09 13:23

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.

查看更多
登录 后发表回答