Steven Stallion wrote: > Saso Kiselkov wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Hi, >> >> I'm currently trying to optimize my multicast UDP streaming application >> as much as I can, and was wondering if there is a way to read() multiple >> pending packets from the socket layer. I'm trying to squeeze every last >> bit of performance out of the machine (Netra 240), since I'm trying to >> receive a stream of several hundred Mbit/s worth of TV channels for >> integrity monitoring. > > Look into the various iovec operations (i.e. readv). Minor nit, you are > not streaming, you are sending datagrams - don't expect to achieve > maximum throughput, especially via multicast.
I should probably follow this up; readv calls will still only read a single packet at a time, however it will read into a preallocated buffer you can use for scatter/gather. Buffer management is *critical* for achieving high performance I/O. Another option is to look into POSIX.4 AIO; AIO can reduce context switches significantly. Steve _______________________________________________ networking-discuss mailing list networking-discuss@opensolaris.org