How to make UDP server performance better?

141 views
Skip to first unread message

Zhuo Meng

unread,
Aug 27, 2018, 6:42:10 AM8/27/18
to golang-nuts
Hi, Gophers

I'm doing benmarking for my GoNTPd .

I found that my implement is only can handle about 100Kpps (kilo packets per second) per goroutine while ntpd can handle about 170 Kpps. on Intel Xeon E312
The pprof shows most of function time spend on syscall.Syscall6 (Read/Write from UDP socket), how can I improve that?

Many thanks!

Matt Harden

unread,
Aug 31, 2018, 12:27:00 AM8/31/18
to Zhuo Meng, golang-nuts
The time spent in the syscall would include time blocked, waiting for a packet to arrive. I would look at the other parts of the profile for possible improvements. The kernel may also be dropping packets if there is not enough buffer space to receive them into; see the SO_RCVBUF socket option. Maybe ntpd sets this option to a larger value than the default.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages