Skip to content

Loop duration and wakeup delay statistics #710

@htuch

Description

@htuch

We (Envoy; https://github.com/envoyproxy/envoy) would like to start collecting histograms on the epoll (or more generally, event loop) duration. This will help us to identify badly behaving event handlers in extensions to Envoy. In addition, we'd like to track wakeup delay; specifically the time between when the event manager blocks for the next wakeup and when the wakeup occurs, to get an idea of kernel load.

The existing libevent event loop (http://www.wangafu.net/~nickm/libevent-book/Ref3_eventloop.html) doesn't really support this, even if we run with EVLOOP_ONCE.

I'm interested in hearing from libevent folks how we could best add this support; we don't mind taking on this work item but would like some guidance on the best fit to libevent's API. I think libev/libuv could support this with their check/prepare/idle watchers, but maybe there is something lighterweight to add to libevent.

CC @mattklein123
Related discussion in envoyproxy/envoy#4952

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions