[ 
https://issues.apache.org/jira/browse/TS-4924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Peach updated TS-4924:
----------------------------

Here is a motivating benchmark. I'm using the configuration above, which uses  
{{passthru.so}} as the protocol and {{generator.so}} as the origin server. I'm 
using a 1K cached URL, and {{wrk}} to generate load.

This is on a OS X 10.11, so real hardware but not that spiffy.

*Port 8080 (native ATS)*
{noformat}
$ wrk -s wrk.proxy  --connections 1 --threads 1 --duration 10 
http://127.0.0.1:8080 -- $url
Running 10s test @ http://127.0.0.1:8080
  1 threads and 1 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   137.66us   18.70us   1.32ms   91.55%
    Req/Sec     7.09k    82.87     7.27k    71.29%
  71254 requests in 10.10s, 84.19MB read
Requests/sec:   7055.05
Transfer/sec:      8.34MB
{noformat}

*Port 9090 (passthru protocol plugin)*
{noformat}
$ wrk -s wrk.proxy  --connections 1 --threads 1 --duration 10 
http://127.0.0.1:9090 -- $url
Running 10s test @ http://127.0.0.1:9090
  1 threads and 1 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   495.67us  291.50us  13.83ms   99.84%
    Req/Sec     1.79k   177.05     1.84k    96.63%
  15970 requests in 10.03s, 18.79MB read
  Socket errors: connect 0, read 399, write 0, timeout 0
Requests/sec:   1591.89
Transfer/sec:      1.87MB
{noformat}

So we go from *7K RPS* to *1.5K RPS* simply by introducing a protocol plugin. 
It is possible that {{passthru.so}} is a pile of junk, but I would like to be 
convinced of that :)

> Protocol plugin performance penalty
> -----------------------------------
>
>                 Key: TS-4924
>                 URL: https://issues.apache.org/jira/browse/TS-4924
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Performance, Plugins
>            Reporter: James Peach
>             Fix For: sometime
>
>
> It looks like protocol plugins take a significant performance penalty 
> compared to doing the same work in the code.
> *Configuratation:*
> {noformat}
> [root@fedora-23 ~]# cat /opt/ats/etc/trafficserver/remap.config
> map http://generator.jpeach.org/ http://127.0.0.1/ \
>       @plugin=generator.so
> [root@fedora-23 ~]# cat /opt/ats/etc/trafficserver/plugin.config
> passthru.so
> [root@fedora-23 ~]# tail /opt/ats/etc/trafficserver/records.config
> ...
> CONFIG config.plugin.passthru.server_ports STRING 9090
> {noformat}
> *http_load:*
> {noformat}
> http://generator.jpeach.org/cache/1024/1934f6c8-2cd6-46ea-9077-0532528fb1c9
> [vagrant@fedora-23 ~]$ http_load -proxy 127.0.0.1:8080 -parallel 50 -seconds 
> 20 -keep_alive 4 url.lst
> {noformat}
> We are using a generator URL of 1K that gets served from cache.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to