Hacker News new | past | comments | ask | show | jobs | submit login

TCP != UDP. In TCP recv() gives you a buffer. In UDP recv() gives you a packet.

Good luck receiving 50k pps of UDP packets, doing some processing and _sending_ 50k pps responses back. It actually is hard.




The lead-in wasn't talking about UDP. And the article is specifically showing you how to use the multiple-packets-per call APIs (sendmmsg et al) and hitting 350 kpps with simeple single-threaded code and UDP. Then 1.4 Mpps with tuning and parallelism.

And even if you were using the slow API, even with ping:

  [7 year old desktop]$ sudo ping -q -f -c 100000 localhost
  PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
  --- localhost.localdomain ping statistics ---
  100000 packets transmitted, 100000 received, 0% packet loss, time 954ms
  rtt min/avg/max/mdev = 0.004/0.004/0.195/0.002 ms, ipg/ewma 0.009/0.005 ms
Google around for some iperf or netperf results that people are generally getting with Linux.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: