Sébastien
unread,Jan 15, 2013, 5:55:40 PM1/15/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to da...@cheney.net, mikioh...@gmail.com, remyoud...@gmail.com, brad...@golang.org, minu...@gmail.com, r...@golang.org, night...@googlemail.com, ia...@golang.org, dvy...@google.com, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
Hello Dmitriy / All,
Few weeks ago I write and play with an edge triggered linux poll server.
For various reasons, having a stripped-down implementation, with a significantly reduced contention surface (and slightly less syscalls), made me hope for some performance improvements.. which happened to be almost just wrong (nothing on 1 core, ~5% on 4-8 cores in the TCPOneShot case and ~20% in the persistent one).
I then blamed the way (supposedly) non-blocking syscalls were not handled, so I flagged accept/connect/write as non-blocking. End result was not better and even slightly worst, either because they did occasionally block (as separately suggested by Iant), or because it happened to adversely disturb the scheduler (by offering less/different resumption points), or because both of them, or because of whatever else.
After few more investigations, what I learn was that even an almost naked poll server was still saturating on the scheduler side, and that the blocking vs non-blocking syscalls point was ultimately not a first order performance consideration.
I incidentally didn't found any pollserver-side way to resorb the abrupt/ crazy slowdowns that still appear beyond 10-12 cores (cf. 6496054), and I still feel tempted by blaming the scheduler for that..
My bottom line would be: if the only remaining issue was to erroneously consider that `connect' (and/or its friends) can block, whilst they don't, then a very significant part of the scheduler would be quite slick... and I would be much more than happy with that situation alone ;).
Best,
Sebastien