On Jun 8, 2007, at 5:43 PM, Daniel Drake wrote:
Starting the database through zdrun is quite slow, as it always
sleeping for at least 1 second:
- zdctl spawns zdrun
- zdctl immediately tries to connect to the unix socket
- unix socket is not ready or non-existent
- zdctl sleeps for 1 second
- zdctl retries the connection
The socket is usually ready pretty quickly (especially on hot caches),
so sleeping for 1 second is quite a lot.
The attached patch speeds up startup by making zdctl launch zdrun by
fork(), and then sharing a pipe so that zdrun can tell zdctl when the
socket is ready.
Wouldn't it be a lot simpler to simply sleep less? It sounds like
sleeping .1 would speed it up by a factor of 10. :)
It's not that pretty but it does speed up startup quite significantly.
Would you consider this approach? If so I will update it for the
zdaemon (it's generated against zodb-3.3, sorry..) and clean up the
Are there any released versions of zdaemon (I note it's no longer
included in the zodb tarballs) or should I get it from svn?
It's on PyPI: http://www.python.org/pypi/zdaemon
You can also get it from svn.
Jim Fulton mailto:[EMAIL PROTECTED] Python
CTO (540) 361-1714
Zope Corporation http://www.zope.com http://www.zope.org
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org