home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.protocols.tcp-ip      TCP and IP network protocols.      14,669 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 12,890 of 14,669   
   Jorgen Grahn to David Schwartz   
   Re: maximum allowable buffer size for se   
   28 May 09 13:49:53   
   
   4a79f182   
   From: grahn+nntp@snipabacken.se   
      
   On Thu, 28 May 2009 03:50:02 -0700 (PDT), David Schwartz  wrote:   
   > On May 28, 2:53 am, reppisch  wrote:   
   ...   
      
   > The 'select' API is   
   > atrocious and 'poll' is only slightly better.   
      
   ...   
      
   > You should really switch to a better socket discovery API if one is   
   > available on the OSes you support. The problem with this is that if   
   > you have 50 connections that are very inactive and one connection that   
   > is very active, you wind up making the kernel put you on 51 wait   
   > queues and then take you off 51 wait queues every time you call   
   > 'select' just to discover the one active connection.   
      
   ...   
      
   What *are* better alternatives to select() and poll(), anyway? On   
   Linux, in my case.   
      
   I've seen select(2) performance decrease in a disappointing way when I   
   selected across ~100 fds -- and that was on Linux, and my surrounding   
   code was as fast as possible (e.g. I copied the set instead of calling   
   FD_SET 100 times before each call).   
      
   "reppisch" mentioned the Linux-specific epoll(), but the man page   
   looked a bit ... unprofessional, and it wasn't clear that it would   
   scale better than select().   
      
   /Jorgen   
      
   --   
     // Jorgen Grahn           R'lyeh wgah'nagl fhtagn!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca