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,833 of 14,669   
   Roy Smith to Dmitry V. Krivenok   
   Re: UDP socket && sendto && EPERM   
   05 May 09 09:04:02   
   
   7afbc40f   
   From: roy@panix.com   
      
   In article   
   <9ba880d8-7135-4abe-8375-0a1bfcbe7414@m24g2000vbp.googlegroups.com>,   
    "Dmitry V. Krivenok"  wrote:   
      
   > Hello!   
   >   
   > I wrote simple SNMP-client to test polling performance.   
   > As you know SNMP works over UDP and my question   
   > is about UDP socket and sendto system call.   
   >   
   > My program is designed to poll devices "asynchronously", i.e.   
   > at first I create N non-blocking sockets, then I send all requests   
   > using sendto() and then wait for responses using select (in this   
   > version, but I'm going to use epool in Linux).   
      
   Are you creating one socket for each device you are polling?  That's a very   
   expensive way to do it.  Better to create a single socket and multiplex all   
   your SNMP traffic over that.  You can tell which client responded by   
   looking at the source IP address which recvfrom() makes available.   
      
   > The program works fine when I poll few hundred of devices,   
   > but I get strange error when I poll several thousand of devices:   
      
   You might want to check how many descriptors a single process can have open   
   on your system.  By the time you get to several thousand sockets, you may   
   have well run into that limit.   
      
   --- 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