Bug #62286 call multiple accepts per poll
Submitted: 28 Aug 2011 22:02 Modified: 29 Aug 2011 10:18
Reporter: Domas Mituzas Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Locking Severity:S5 (Performance)
Version:5.1, 5.5, ... OS:Any
Assigned to: CPU Architecture:Any

[28 Aug 2011 22:02] Domas Mituzas
Description:
currently accept routine is:

poll();accept();poll();accept()....

on a loaded server poll() is not needed, as there's a big chance that accept() would already hit a pending connection.

How to repeat:
connect to mysql a lot

Suggested fix:
call accept() until socket is drained, only then call poll. 

can have tunable parameter when to inject poll - (every # of accepts) - to avoid starvation of usually empty unix socket