Bug #43278 listen() backlog is too small for benchmark runs
Submitted: 28 Feb 2009 13:51 Modified: 17 Aug 2009 16:44
Reporter: Jan Kneschke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Core Severity:S3 (Non-critical)
Version:0.7.0-bzr OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any

[28 Feb 2009 13:51] Jan Kneschke
Description:
Using mysqlslap to run a benchmark through mysql-proxy sometimes hangs mysqlslap.

The listen() backlog is currently 8 which is too small for benchmark clients which tend to open a large number of connections in parallel.

How to repeat:
Run mysqlslap with a concurrency > 20

  $ mysqlslap --host=127.0.0.1 --port=4040 \
    --create-schema=mysqlslap --auto-generate-sql \
    --concurrency=20

Sometimes it finishes in 0.2sec, sometimes it doesn't finish at all.

Suggested fix:
Increase the listen() backlog to 128.
[2 Jul 2009 15:22] Jan Kneschke
revno: 708
committer: jan@mysql.com
branch nick: trunk
timestamp: Thu 2009-07-02 16:52:53 +0200
message:
  raise the listen() backlog from 8 to 128 (fixes #43278)
[2 Jul 2009 21:29] Diego Medina
Verified fixed on r709 ( 0.8.0)
[17 Aug 2009 15:08] MC Brown
A note has been added to the 0.8.0 and 0.7.3 changelogs: 

MySQL Proxy could stop accepting network packets if a large number of packets were sent to the proxy. The listen queue has been extended to allow a larger backlog.