How to save and load the catalog query plan?

Continuing the discussion from Performance boost at Radio Free Asia (Part 2):

can you please explain how you did it? I was unable to find any clear documentation on that and even Martijn Pieters mention to it seems incomplete to me:

http://plone.293351.n2.nabble.com/bug-in-zcatalog-queryplan-causing-very-slow-first-query-after-startup-td7568343.html

Pretty shit you have to use a env variable since that is not site specific. It's a long thread but I think it has discussion on how to make it better but never went anywhere

thanks! I've read the thread and I think Hanno Schlichting (who else?) gave the most important advice in these two paragraphs:

The dominant factor for query performance isn't the length of any of the
involved data sets, but the ratio between how much of that data has to be
loaded from the server and how much is already in the connection or ZEO
caches.

and then:

With all that said, maintaining query plans across instance restarts has much
less value than one would assume. The best one can do is to create some
warm-up process to prefill the connection cache before allowing any newly
started instance to serve web traffic.

we are already doing the later, and that could be good enough; anyway, warm-up process is taking a lot (sometimes more than 2 minutes) and that could indicate that we need to review the ZEO cache size.

I'm going to make some tests.

wow, that was amazing! I discovered that I've been wrong all this years an we were not using the persistent client cache at all, but a transient one.

I made a couple of change to our configuration in 2 sites and the result were really encouraging.

I'm going to share them in another thread.

1 Like