[ZODB-Dev] Question about zeo client cache
Malthe Borch
mborch at gmail.com
Sun Dec 11 12:44:00 UTC 2011
On 11 December 2011 13:22, Jim Fulton <jim at zope.com> wrote:
> Even with low latency, your talking on the order of a millisecond for
> a round trip to the server.
True.
This is obviously a problem for an application that routinely needs to
fetch hundreds of objects, and perhaps in the thousands on startup.
> Data can be loaded from client cache on a 10-20 microseconds if the
> data is in the client
> disk cache.
If it's in the disk cache, to my understanding, it might as well be in
the ZEO client's pickle cache.
My (possibly very, very bad) advice was based on the fact that there's
an obvious, huge win in having a ZEO client cache if it's particularly
expensive to request the object from the ZEO server.
I don't think that less than a microsecond is expensive and chances
are that the object is in the disk cache on the ZEO server and not in
the disk cache on the ZEO client.
> If the database is large or if the server is heavily loaded, then
> server load times can be'
> much worse. Of course, leaning toward small cache and lots of server
> loads makes the server even more heavily loaded.
If you've got a lot of mostly static data, to the extent that most of
it's on disk and not in any cache, then it's probably a good idea to
distribute that to client caches so that the disk load is spread out.
\malthe
More information about the ZODB-Dev
mailing list