3

I realize that the performance would be related to the machine. But given say two core i7 PCs with a gigabit LAN between them, with one sending out 1k packets as fast as it can and one receiving them, what would be a rough guess of how many packets per second you would expect?

I ask because I am implementing a protocol using raw sockets and I can send out around 100,000 1k packets a second but I only seems to be able to receive somewhere between 20,000 and 40,000pps. The sending is remarkably constant but the receive packets per second varies wildly between the two values. When I hit this receive limit the CPU util is around 20%. Why is the send , apparently, so much faster than the receive?

I am not doing any processing on the receive but simply calling receive again after the last receive with the same buffer. I am using BeginSendTo and BeginReceiveFrom with corresponding EndReceive etc. Maybe 20 -40,000 pps is very good? What sort of pps do other people achieve and do you start missing any packets at higher packet rates? If you are looking to "wring every last ounce" out of sockets tx/rx what are the best methods to use and things to look out for.

All pointers / ideas to try welcome.

4

0 回答 0