Does deleting nodes and relationships immediate cut down Neo4j disk usage size?

31 views
Skip to first unread message

Ray Chengr

unread,
Aug 28, 2016, 3:48:04 PM8/28/16
to Neo4j
We continue to add nodes and relationships to our Neo4j 3.0.3. At some point our disk will be full. One way is to remove old nodes and relationships when disk is approaching to, say 80%, full. Does deleting nodes and relationships immediate cut down Neo4j disk usage size, or do we need to restart Neo4j to see less disk usage size?
Thanks!

Michael Hunger

unread,
Aug 28, 2016, 5:04:52 PM8/28/16
to ne...@googlegroups.com
If you restart after deletions the freed records will be reused.

To compact your store you can use my store-utils tool: https://github.com/jexp/store-utils

Cheers, Michael

Am 28.08.2016 um 09:48 schrieb Ray Chengr <chen...@gmail.com>:

We continue to add nodes and relationships to our Neo4j 3.0.3. At some point our disk will be full. One way is to remove old nodes and relationships when disk is approaching to, say 80%, full. Does deleting nodes and relationships immediate cut down Neo4j disk usage size, or do we need to restart Neo4j to see less disk usage size?
Thanks!

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ray Chengr

unread,
Aug 28, 2016, 5:50:29 PM8/28/16
to Neo4j
Hi Michael,

(1) I didn't restart Neo4j 3.0.3 after I deleted about 3,000,000 relationships last night.

'du' showed neostore.propertystore.db and neostore.propertystore.db.arrays stay the same size after a whole night's Neo4j creations of nodes and relationships without restarting Neo4j 3.0.3.

% du neostore.propertystore.db*
15967220        neostore.propertystore.db              
28139264    neostore.propertystore.db.arrays
(in KB)

It seems to me the disk storage spaces for relationship's properties and property arrays are being reused without a Neo4j restart. Is this right?

(2) Does your store-utils tool  copy the exist Neo4j DB to a new location in order to compact the storage on the new Neo4j DB?

Thanks!
Ray

Michael Hunger

unread,
Aug 28, 2016, 6:10:56 PM8/28/16
to ne...@googlegroups.com

Am 28.08.2016 um 23:50 schrieb Ray Chengr <chen...@gmail.com>:

Hi Michael,

(1) I didn't restart Neo4j 3.0.3 after I deleted about 3,000,000 relationships last night.

'du' showed neostore.propertystore.db and neostore.propertystore.db.arrays stay the same size after a whole night's Neo4j creations of nodes and relationships without restarting Neo4j 3.0.3.

% du neostore.propertystore.db*
15967220        neostore.propertystore.db              
28139264    neostore.propertystore.db.arrays
(in KB)



It seems to me the disk storage spaces for relationship's properties and property arrays are being reused without a Neo4j restart. Is this right?

Yes, property blocks are reused immediately only node and relationship-blocks are only reused after restart.


(2) Does your store-utils tool  copy the exist Neo4j DB to a new location in order to compact the storage on the new Neo4j DB?

Yes it does.

Ray Chengr

unread,
Aug 28, 2016, 6:56:45 PM8/28/16
to Neo4j
Great! Thanks  a  lot Michael!
Ray
Reply all
Reply to author
Forward
0 new messages