SOCK_DGRAM optimization needed...

Martin Eugen martin.eugen at gmail.com
Fri Aug 18 07:41:38 UTC 2006


Hello there,
I have a simple application, that deals with lots of dgram sockets (UDP).
Thousands of them. Basically, its purpose is to
maintain pairs of sockets and when data is received on one of the sockets it
peeks through it (doing some simple
statistic calculations) and then forwards it to the other socket.
Because of the hudge number of reads and writes (probably about a 10 packets
per second per socket pair) it generates a significant load
on the system, that I would like to minimize. I'm currently evaluating if it
would be possible to add simple 'routing' functionality in the socket layer
in the kernel, because frankly I'm not able to think of anything else.

Any ideas?

Martin

P.S. I'm not subscribed to the list so please CC.


More information about the freebsd-hackers mailing list