Re: runzeo.py exit with unexpected exit code
Jason Madden <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
> On Apr 7, 2017, at 03:55, Etienne Robillard <[email protected]> wrote: > > The other option I considered was to replace select.select() calls to use native epoll library in ZEO/zrpc/client.py. > > According to Gevent documentation, monkey.patch_all() may replace select.select() with gevent.select.select() for improved cooperativity. > > http://www.gevent.org/gevent.monkey.html If you keep reading, that same documentation[1] also states that `select.epoll` is *removed* by default because it cannot be made cooperative. If you try to avoid this and use `select.epoll` *anyway*, you'll find your entire process blocked, which is likely not what you want.[2] In the past (ZEO 4, pre ZEO 5), I have been able to successfully run a ZEO *client* cooperatively under gevent (and indeed, we did see performance gains under concurrent workloads). The trick, like with most gevent-related things, is to monkey-patch as the very first thing your process does. If you wait to do so until some ZEO file is imported, it's probably way too late. When we were doing that, we did not monkey-patch the ZEO server. In fact we had to take care *not* to monkey-patch if we happened to be imported in the server during conflict resolution (patching that late will certainly break things). I haven't personally tried this with the new asyncio-based ZEO 5, although I suspect it still works. > I created a new repository for tracking my experimental ZODB changes: > > https://bitbucket.org/tkadm30/zodb-gevent I doubt that hacking on such an old, outdated ZEO is going to gain you very much (when it looks like focusing on connection management issues is the way to go) or find many people interested in helping. [1] http://www.gevent.org/gevent.monkey.html#gevent.monkey.patch_select [2] You could also try to disable patching of threads, but ZEO<5 uses a lot of threads and presumably that's why you're interested in monkey-patching in the first place. -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.