cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Why would a ~3GB database size consume 10+GB of server RAM?

It is a causal cluster of 3 instances (1 leader 2 followers). Below are the sysinfo output:

 

Store Sizes
Count Store 35.00 KiB
Label Store 279.29 KiB
Index Store 717.59 MiB
Schema Store 200.01 KiB
Array Store 595.73 MiB
Logical Log 249.65 MiB
Node Store 51.67 MiB
Property Store 617.91 MiB
Relationship Store 69.67 MiB
String Store 499.27 MiB
Total Store Size 2.98 GiB

 

ID Allocation
Node ID 3610731
Property ID 15790448
Relationship ID 2116732
Relationship Type ID 321
Page Cache
Faults 324113
Evictions 0
File Mappings 165
Bytes Read 2652151457
Flushes 1714
Eviction Exceptions 0
File Unmappings 116
Bytes Written 14456456
Hit Ratio 99.99%
Usage Ratio 82.75%

 

Transactions
Last Tx Id 61236137
Current 1
Peak 2
Opened 20988
Committed 20987

Pagecache and Heap config:

  • dbms.memory.heap.initial_size: 5G
  • dbms.memory.heap.max_size: 5G
  • dbms.memory.pagecache.size: 3G

Attached screenshot of consumption applies to all three instances the same.

 

3 REPLIES 3

@abed_halawi   

a. what version of Neo4j

b.  your heap is defined to use 5G and pagecache is defined to use 3G and this would bring us to 8G.   But the JVM, just like any other JVM, does not thus only run on these 2 memory allocations.

Also I might ??? disagree with a dbms.memory.pagecache.size=3G for

Total Store Size

2.98 GiB

is a bit incorrect as this includes the size of all transaction logs, and transaction logs are not loaded into dbms.memry.pagecache.size.   Further

Logical Log 249.65 MiB

 is also a bit incorrect since it represents the size of the current written txn log ( data/graph.db/neostore.transaction.db*) but you may have multiple files here.   And the multiple files are incorrectly used in the 'Total Store Size'.   ``Incorrect`  in that transaction logs are not loaded into dbms.memory.pagecache.size

 

 

 

Thank you @dana_canzano 

a. 3.5.4 (unfortunately couldn't upgrade yet)

b. Do you mean that I should increase pagecache and reduce heap instead? e.g. pagecache = 5G, heap = 3G?

@abed_halawi 

a. Neo4j 3.5.x is no longer eligible for new patch releases

b. I would set pagecache to be the size, i.e. last line, as reported by `du -hc data/graph.db/*store.db`*`