diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-06-01 18:36:08 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-06-01 18:36:08 +0000 |
commit | 45d1d44c5ff29062b878f5105f18ad21850b76d6 (patch) | |
tree | a0024814e5145b40a3200361247429d9d9b78e1c | |
parent | d7c21331eb1ae8b893d1910ee5db41698b692bae (diff) |
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
-rw-r--r-- | src/socketengines/socketengine_epoll.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |