Archived
This forum has been archived. Please start a new discussion on GitHub.
Evictor performance question

xdm
La Coruña, Spain
in Help Center
I using freeze evictor for persitence of a tree like structure, but same nodes not all can have millon of childs or more.
now i have samething like this
can evictor and this design have a good performance or is better store childs as a separte FreezeMap for each Node.
And the second option implique have millon of database files because same node can have a millon of child nodes each one with is dedicated FreezeMap and db, i'm not sure if this is a good idea.
i special interesting in performance of get method. is the most invoked all the time system is up.
any help is apreciate thanks
now i have samething like this
clas BaseItem { string title; } dictionary<Ice::Identity,BaseItem*> ItemMap; class Item extends BaseItem { string content; } interface NodeAdmin { BaseItem* add(BaseItem* obj); BasetIem* get(Ice::Identity id); } class Node extends BaseItem implementes NodeAdmin { ItemMap childs; }
can evictor and this design have a good performance or is better store childs as a separte FreezeMap for each Node.
And the second option implique have millon of database files because same node can have a millon of child nodes each one with is dedicated FreezeMap and db, i'm not sure if this is a good idea.
i special interesting in performance of get method. is the most invoked all the time system is up.
any help is apreciate thanks
0
Comments
-
Hi Jose,
Ideally the objects (servants) stored in a Freeze Evictor should be of average size. Lots of very small objects waste disk space since the Freeze Evictor adds overhead to each record. With a very large object, like an object holding an Ice dictionary with a million entries, the problem is that each little change in that object will result in the entire object being written to disk.
So, I'd recommend to use a Freeze dictionary to hold your items, since they can be so numerous. And I don't see why all your nodes can't share the same Freeze dictionary.
Also this interface:interface NodeAdmin { BaseItem* add(BaseItem* obj); BasetIem* get(Ice::Identity id); };
does not make much sense, since BaseItem has no operation. Maybe you meant to return BaseItem by value.
Cheers,
Bernard0