![]() ![]() Before we start we must ensure the traffic won't be interfered with by the iptables: receiver$ iptables -I INPUT 1 -p udp -dport 4321 -j ACCEPT The source code of the test programs is available here: udpsender, udpreceiver. The boxes have a multi-queue 10G network card by Solarflare, with 11 receive queues configured. With hyperthreading (HT) enabled that counts to 24 processors on each box. They both have two six core 2GHz Xeon processors. That means 74įor the experiments we will use two physical servers: "receiver" and Since we're interested in pps, our experiments will use short UDP You can achieve high Bps by better pipelining and sending longer packets. Measuring packets per second (pps) is much more interesting than measuring bytes per second (Bps). Hopefully, answering this question will be a good lesson about the design of a modern networking stack. On Linux, how hard is it to write a program that receives 1 million UDP packets per second? While I agree that 50kpps per core is probably the limit for any practical application, what is the Linux networking stack capable of? Let's rephrase that to make it more fun: Public static void main(String args) throws IOException, InterruptedException įor (int i = 0 i < messages.Last week during a casual conversation I overheard a colleague saying: "The Linux network stack is slow! You can't expect it to do more than 50 thousand packets per second per core!" Thanks, I modified the server to listen on multiple ports and to multiple clients. ![]() Post navigation ← Square Root Algorithms in Scheme Sockets Programming Example in C: Server Converts Strings to Uppercase → This entry was posted in C, Networking on Apby Daniel Scocco. You might also like: Sockets Programming in C Using UDP Datagrams *- Read the message from the server into the buffer -*/ *- Connect the socket to the server using the address struct -*/Ĭonnect(clientSocket, (struct sockaddr *)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |