summaryrefslogtreecommitdiff
path: root/src/socketengines/socketengine_epoll.cpp
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-01 18:36:08 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-01 18:36:08 +0000
commit45d1d44c5ff29062b878f5105f18ad21850b76d6 (patch)
treea0024814e5145b40a3200361247429d9d9b78e1c /src/socketengines/socketengine_epoll.cpp
parentd7c21331eb1ae8b893d1910ee5db41698b692bae (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
Diffstat (limited to 'src/socketengines/socketengine_epoll.cpp')
-rw-r--r--src/socketengines/socketengine_epoll.cpp3
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)
{