From 45d1d44c5ff29062b878f5105f18ad21850b76d6 Mon Sep 17 00:00:00 2001 From: special Date: Sun, 1 Jun 2008 18:36:08 +0000 Subject: Only prepare epoll for 25% of maxfds initially; it will grow beyond that as necessary, but it's pretty unusual to be loading your server that much. Should save some kernel memory, too git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9832 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengines/socketengine_epoll.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp index fa7a8e03f..5552cccf6 100644 --- a/src/socketengines/socketengine_epoll.cpp +++ b/src/socketengines/socketengine_epoll.cpp @@ -20,7 +20,8 @@ EPollEngine::EPollEngine(InspIRCd* Instance) : SocketEngine(Instance) { MAX_DESCRIPTORS = 0; - EngineHandle = epoll_create(GetMaxFds()); + // This is not a maximum, just a hint at the eventual number of sockets that may be polled. + EngineHandle = epoll_create(GetMaxFds() / 4); if (EngineHandle == -1) { -- cgit v1.2.3