On Jun 8, 2007, at 5:43 PM, Daniel Drake wrote:
Hi,
Starting the database through zdrun is quite slow, as it always
ends up
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
latest
zdaemon (it's generated against zodb-3.3, sorry..) and clean up the
whitespace etc.
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
--
Jim Fulton mailto:[EMAIL PROTECTED] Python
Powered!
CTO (540) 361-1714
http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev