[ZODB-Dev] speeding up zdctl/zdrun start
Daniel Drake
ddrake at brontes3d.com
Fri Jun 8 17:43:12 EDT 2007
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.
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?
Thanks.
--
Daniel Drake
Brontes Technologies, A 3M Company
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zodb.patch
Type: text/x-patch
Size: 2065 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20070608/37e4df1c/zodb.bin
More information about the ZODB-Dev
mailing list