2010/6/7 Craig Taverner <cr...@amanzi.com>:
> Seems that the string store is not optimal for the 'common' usage of
> properties for names or labels, which are typically 5 to 20 characters long,
> leading to about 5x (or more) space utilization than needed. By 'names or
> labels' I mean things like username, tags, categorizations, product names,
> etc. These seem like very common scenarios.

You're quite right about that, however:

Is there a specific constrain on disk space? Normally disk space isn't
a problem... it's cheap and there's usually loads of it.

>
> I guess there is no simple way of optimizing for this? At an app level it is
> possible to pack a bunch of strings into a single property using, for
> example, JSON. But that only makes sense if the usage is always to work with
> them all as a unit.
>
> On Mon, Jun 7, 2010 at 10:32 AM, Johan Svensson 
> <jo...@neotechnology.com>wrote:
>
>> Hi,
>>
>> These are the current record sizes in bytes that can be used to
>> calculate the actual store size:
>>
>> nodestore: 9
>> relationshipstore: 33
>> propertystore: 25
>> stringstore: 133
>> arraystore: 133
>>
>> All properties except strings and arrays will take a single
>> propertystore record (25 bytes). A string or array property will use
>> one record from the propertystore then as many blocks needed from the
>> string/array store file (each block of 133 bytes can store 120 bytes
>> of data). This means if all your strings are in 120 bytes multiples in
>> size you will make very efficient use of the store file while if they
>> are empty you will not make very good use of the space (exactly like a
>> normal filesystem taking up space for empty files).
>>
>> -Johan
>>
>> On Fri, Jun 4, 2010 at 9:15 AM, Mattias Persson
>> <matt...@neotechnology.com> wrote:
>> > That formula is correct regarding nodes and relationships, yes. When
>> > properties comes into play another formula would, of course, have to
>> > be applied. Depending on property types and length of keys/string
>> > values it is different. It could be good though with a formula/tool to
>> > calculate that.
>> >
>> > 2010/6/4, Biren Gandhi <biren.gan...@gmail.com>:
>> >> In that case, what are the ways to estimate storage capacity numbers?
>> Basic
>> >> formula of nodes*9 + edges*33 doesn't seem like a practical one.
>> >>
>> >> On Wed, Jun 2, 2010 at 11:26 PM, Mattias Persson
>> >> <matt...@neotechnology.com>wrote:
>> >>
>> >>> String properties are stored in blocks so even if you have tiny string
>> >>> values each property value will occupy a full block (30 or 60 bytes,
>> >>> can someone correct me here?). That's what taking most of your space
>> >>> IMHO
>> _______________________________________________
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to