epoll scheduler

Alexey Andriyanov <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <[email protected]>
Hi, Alexandre!

Recently I was struggling from exceeding of the opened filehandles limit (1024) in my keepalived.
Increasing the limit did not help at all: keepalived's scheduler is using select(2) that is limited to 1k descriptors by design.

I did not investigate of the root cause accurately and began to work on using epoll(7) in the scheduler.

Now I've got a working epoll implementation. It is more effective than the current one, because it does not use list traversal to search for a thread struct. I have profiled the heavy-scheduled config with 2k local checkers and proved that scheduler is the most cpu-intensive part in this scenario and that the new scheduler is more than twice faster than the current one.

However, afterwards it turned out that the real problem was in high CPU usage in libssl and it gone away by updating this lib. The problem was not in the scheduler and I don't need the epoll implementation any more.

If you think it might be useful for some users, I'll post it for review or make a pull request.

-- 
Best regards,
Alexey 

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.