Merge lp:~mdcallag/maria/5.3fcntl into lp:maria/5.3
Status: | Needs review |
---|---|
Proposed branch: | lp:~mdcallag/maria/5.3fcntl |
Merge into: | lp:maria/5.3 |
Diff against target: |
57 lines (+7/-5) 1 file modified
sql/net_serv.cc (+7/-5) |
To merge this branch: | bzr merge lp:~mdcallag/maria/5.3fcntl |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Maria-captains | Pending | ||
Review via email: mp+51226@code.launchpad.net |
Description of the change
This changes mysqld to use socket timeouts rather than non-blocking, setsockopt, blocking, setsockopt. It reduces fcntl calls significantly. Many Linux kernels use the big kernel lock for fcntl and all threads can get stuck on it on a big multi-core server with 500+ concurrent connections.
With this change I double peak QPS on sysbench readonly (100k -> 200k).
The change differs from my original change in the Facebook patch. The original change broke rpl.rpl_ssl. I excluded two lines while porting.
Unmerged revisions
- 2921. By Mark Callaghan
-
Port http://
bazaar. launchpad. net/~mysqlatfac ebook/mysqlatfa cebook/ 5.1/revision/ 3540. When the
server is compiled with -DNO_ALARM this uses socket timeouts and avoids frequent fcntl calls.
Many Linux kernels use the big kernel lock during fcntl calls so this change can reduce
severe contention on fcntl and it doubles peak QPS for sysbench read-only from ~100k to ~200k.This diff excludes 2 of the 7 lines changed in the original diff. I think those two lines were
incorrect and they broke the mtr test rpl.rpl_ssl
Hi!
>>>>> "Mark" == Mark Callaghan <email address hidden> writes:
Mark> Mark Callaghan has proposed merging lp:~mdcallag/maria/5.3fcntl into lp:maria.
Mark> Requested reviews:
Mark> Maria-captains (maria-captains)
Mark> For more details, see: /code.launchpad .net/~mdcallag/ maria/5. 3fcntl/ +merge/ 51226
Mark> https:/
Mark> This changes mysqld to use socket timeouts rather than non-blocking, setsockopt, blocking, setsockopt. It reduces fcntl calls significantly. Many Linux kernels use the big kernel lock for fcntl and all threads can get stuck on it on a big multi-core server with 500+ concurrent connections.
Mark> With this change I double peak QPS on sysbench readonly (100k -> 200k).
Mark> The change differs from my original change in the Facebook patch. The original change broke rpl.rpl_ssl. I excluded two lines while porting.
I will look at this during this week. Thanks!
Regards,
Monty