Random ...
 
December 2017
S M T W T F S
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Tags ...
Links



python+zope++:: ZEO client cache: How big is yours?; the bigger, the better(?|!)
Posted at 31.Mar,2005 09:41  Comments 3 / Trackbacks 0 / Like this post!
Technorati tag(s):

Read a posting by Tim Peters @ ZODB-dev and that makes me wonder, how big is your ZEO cache?

Mine, I've never twiddle with it. It's at 20 MB, which is the default. Maybe it's time to try and play with this knob.

With Zope version < 2.6, we need to change this in our custom_zodb.py

Here's mine:

    import ZEO.ClientStorage

    ZSS_HOST = '127.0.0.1'    # Host name 
    ZSS_PORT = 8000              # Port that the ZSS is running on
    ZSS_NAME = 'ZEO'              # Name of the storage being used
    CSIZE=200                          #*1024**2 (in ClientStorage.py)

   # Now we tell Zope where its storage is:
      Storage=ZEO.ClientStorage.ClientStorage((ZSS_HOST, ZSS_PORT),
                                        name=ZSS_NAME,cache-size=CSIZE)

For Zope version > 2.6, all configuration are available in $INSTANCE_HOME/etc/zope.conf

Here's a snippet:

    <zodb_db main>
   mount-point /
   <zeoclient>
     server 127.0.0.1:8000
     storage 1
     name zeostorage
     var $INSTANCE/var
     client maindb
     cache-size 200000000
   </zeoclient>
 </zodb_db>

Note: Read up on component.xml (locate/find the files) to find out the key:value pair that's available for zope.conf

Notable ones:

zope27/lib/python/tempstorage/component.xml zope27/lib/python/ZODB/component.xml zope27/lib/python/zLOG/component.xml zope27/lib/python/zdaemon/component.xml zope27/lib/python/ZEO/component.xml zope27/lib/python/ZConfig/tests/library/widget/component.xml zope27/lib/python/ZConfig/tests/library/thing/component.xml zope27/lib/python/ZServer/component.xml

Now, how big is yours?


Bookmark and Share

Is this entry helpful? Comments/Donate/Click some google ads.  
Trackback is http://myzope.kedai.com.my/blogs/kedai/21/tbping 

Comments
Re: ZEO client cache: How big is yours?

I've recently set up a 20 gb cache (Zope 2.7.4).

I hope it will not explode...

No time for real tests unfortunately. Will see when they will turn it on... :/

mp  at 31.Mar,2005 11:40
20 GB?

are you serious? never thought of setting one that huge :P. if it works ok, do tell us!

p/s - how long does it take to start a zeo client?
in the secs or minutes ?

kedai  at 31.Mar,2005 16:42
Re: ZEO client cache: How big is yours?

Well, since whole ZODB is about 500MB, it doesn't really matter ;)
Cache will not fill up for a very long time...

Zope starts (and works) very fast.

What is this cache anyway? I've read it's disk cache...
(Actually, I've read it here: http://mail.zope.org/pipermail/zope/2005-March/157174.html).

How is this disk cache stored? Is it local ZODB-like temporary file storage?

It all depends on how efficient this cache is.. If it's as fast as the lookup of the object on the ZEO's server-side
ZODB (ZEO server uses Data.fs) and if there are many more reads than writes (I think this is the case in most situations), then the bigger cache size is, the better "scalability" is...

I wish I had more time to examine and test those things properly :/

mp  at 01.Apr,2005 07:27
Post a comment