[Tarantool-patches] [PATCH 00/20] Rewrite performance critical parts of net.box in C

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Aug 4 02:05:37 MSK 2021

Did you try to port netbox to direct usage of ev_io instead of a dedicated
fiber + coio_wait wrapper? Do you think it is worth trying? The only problem
I see is the necessity to call on_connect/on_disconnect/on_schema_reload/...
triggers somewhere but the scheduler fiber, because they are allowed to yield.

The pros is that you won't call ev_io_start/ev_io_stop on each 'communicate'
iteration. AFAIR, on Linux they lead to epoll_ctl() to add/remove a descriptor
from epoll, and these calls are expensive.

At that point the netbox state machine does not seem to be doing much in Lua.
Even if you keep the fiber, it could be ported to C entirely. It is now only
270 lines including empty lines and comments.

More information about the Tarantool-patches mailing list