Calculation of the heap memory usage with the manual

118 views
Skip to first unread message

c_inconnu

unread,
Mar 2, 2012, 11:20:21 AM3/2/12
to Neo4j
Hi,
I'm trying to calculate the size of my database in the object cache
using the table provided by the manual (v1.6.1 - chapter 21.3.2). I'm
not sure how to interpret this table :
1. for each object, is the first line the sum of the others ? if it
is, Relationship sizes doesn't add up
2. about the 2 Relationship**S** entries i understand that

if
- node A is related to B with 3 relationships R
- node A is related to C with 2 relationships S

then
- size of one A = 344(node) + xxx(properties) + 108(relationships for
R) + 108(relationships for S) <=== and not 3*108 + 2*108
- size of one B = 344(node) + xxx(properties) + 108(relationships for
R) <=== and not 3*108
- size of one R = 208(relationship) + xxx(properties) +
8(relationship) <=== and not 2*8 (for both ends)

is that correct ?
thanks

c_inconnu

unread,
Mar 4, 2012, 4:50:41 PM3/4/12
to Neo4j
someone ?

Peter Neubauer

unread,
Mar 4, 2012, 6:21:26 PM3/4/12
to ne...@googlegroups.com

Hi there,
Are you using default block sizes for your store? Also, what are your properties like?

c_inconnu

unread,
Mar 5, 2012, 3:34:41 AM3/5/12
to Neo4j
hi,
1. "block size" => for the time being, yes
2. "properties" => i'm not sure i understand the question : which
properties ?
let me know if my question was not clear enough
thanks

On 5 mar, 00:21, Peter Neubauer <neubauer.pe...@gmail.com> wrote:
> Hi there,
> Are you using default block sizes for your store? Also, what are your
> properties like?
>

Michael Hunger

unread,
Mar 5, 2012, 4:53:17 PM3/5/12
to ne...@googlegroups.com
Have you looked into the hardware calculator on neo4j.org ?

Michael

c_inconnu

unread,
Mar 6, 2012, 10:20:23 AM3/6/12
to Neo4j
i did but i'm trying to get a more accurate evaluation
actually, i think the manual is not clear enough on this part (and
maybe there is an error - see my previous messages)
i just want to know:
1. if the first line the sum of the others ? if yes, there is an error
2. for what exactly stand the "108" and "8" for the two
"relationships" lines
thanks

On 5 mar, 22:53, Michael Hunger <michael.hun...@neotechnology.com>
wrote:

Peter Neubauer

unread,
Mar 8, 2012, 5:50:39 AM3/8/12
to ne...@googlegroups.com
Hi David,
not really sure it is totally up to date (for that to be
auto-generated we would need some C++ actual measuring code), but it
should. Woudl be nice to actually measure it from test code though.

2) No, that is correct. One line is for the Relationship object in the
cache, and one is for the fact that the node records that it contains
that relationship.
The first one is once for each relationship, the second one is once
for each node that is part of the relationship (i.e. x2).

Thanks to Tobias Linkaaker for the insights.

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/

Reply all
Reply to author
Forward
0 new messages