Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-505

Worse performance when Origin server sends Connection: keep-alive

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.6
    • Component/s: Network
    • Labels:
      None

      Description

      I have a test setup using lighttpd (stock config, but with the port changed to port 82, and logging disabled). I've created a small file (42 bytes) in /var/www/lighttpd/cl-test.html.

      I'm running Apache TS with a stock config ("gmake install") with the following configuration changes:

      records.config:
      ---------------
      CONFIG proxy.config.http.server_port INT 80
      CONFIG proxy.config.http.cache.required_headers INT 2
      CONFIG proxy.config.log2.logging_enabled INT 0

      remap.config:
      -------------
      map http://loki.ogre.com/lighttpd/ http://localhost:82/

      I'm "benchmarking" this using "ab" from a second host, running a command like

      ab -c 20 -n 10000 http://loki.ogre.com/lighttpd/cl-test.html

      Test 1: I disable Keep-Alive in lighttpd, adding a configuration like this to /etc/lighttpd/lighttpd.conf:

      server.max-keep-alive-requests = 0

      Test results are

      Requests per second: 9056.01 /sec (mean)
      Time per request: 2.208 [ms] (mean)
      Time per request: 0.110 [ms] (mean, across all concurrent requests)

      Test 2: I enable Keep-Alive in lighttpd, with

      server.max-keep-alive-requests = 1000000

      Test results are:

      Requests per second: 4456.33 /sec (mean)
      Time per request: 4.488 [ms] (mean)
      Time per request: 0.224 [ms] (mean, across all concurrent requests)

      This might not seem like a huge difference, but why would it be serving 2x fewer QPS and 2x the latency with keep-alive to the origin server? If anything, I'd expect it to be faster with keep-alive, right ? Shouldn't that be noticeably less work?

        Attachments

          Activity

            People

            • Assignee:
              zwoop Leif Hedstrom
              Reporter:
              zwoop Leif Hedstrom
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: