[ 
https://issues.apache.org/jira/browse/TS-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447455#comment-13447455
 ] 

kuotai commented on TS-1405:
----------------------------

this because of origin scheduler's accuracy is 5ms(event < 5ms will insert to 
after[0], and processed at next loop). so some event can't process, then enter 
epoll_wait(sleep). The new patch change to 5ms alse.
the new patch test:
{code}
orig:
[root@test58 ~]# ab -n 500000 -c 50 -k -H "Host: ts.cn" 
http://115.238.23.222:8080/1024/1.bmp
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 115.238.23.222 (be patient)
Completed 50000 requests
Completed 100000 requests
Completed 150000 requests
Completed 200000 requests
Completed 250000 requests
Completed 300000 requests
Completed 350000 requests
Completed 400000 requests
Completed 450000 requests
Completed 500000 requests
Finished 500000 requests


Server Software:        ATS/3.2.0
Server Hostname:        115.238.23.222
Server Port:            8080

Document Path:          /1024/1.bmp
Document Length:        1024 bytes

Concurrency Level:      50
Time taken for tests:   34.522 seconds
Complete requests:      500000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    500000
Total transferred:      691500000 bytes
HTML transferred:       512000000 bytes
Requests per second:    14483.42 [#/sec] (mean)
Time per request:       3.452 [ms] (mean)
Time per request:       0.069 [ms] (mean, across all concurrent requests)
Transfer rate:          19561.10 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     0    3  10.8      1     316
Waiting:        0    3  10.8      1     285
Total:          0    3  10.8      1     316

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      3
  95%     20
  98%     41
  99%     52
 100%    316 (longest request)

time_wheel:
[root@test58 ~]# ab -n 500000 -c 50 -k -H "Host: ts.cn" 
http://115.238.23.222:8080/1024/1.bmp
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 115.238.23.222 (be patient)
Completed 50000 requests
Completed 100000 requests
Completed 150000 requests
Completed 200000 requests
Completed 250000 requests
Completed 300000 requests
Completed 350000 requests
Completed 400000 requests
Completed 450000 requests
Completed 500000 requests
Finished 500000 requests


Server Software:        ATS/3.2.0
Server Hostname:        115.238.23.222
Server Port:            8080

Document Path:          /1024/1.bmp
Document Length:        1024 bytes

Concurrency Level:      50
Time taken for tests:   35.486 seconds
Complete requests:      500000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    500000
Total transferred:      691500000 bytes
HTML transferred:       512000000 bytes
Requests per second:    14090.22 [#/sec] (mean)
Time per request:       3.549 [ms] (mean)
Time per request:       0.071 [ms] (mean, across all concurrent requests)
Transfer rate:          19030.05 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0  29.1      0    3000
Processing:     0    3  10.2      1     263
Waiting:        0    3  10.2      1     263
Total:          0    4  31.4      1    3262

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      2
  95%     20
  98%     40
  99%     51
 100%   3262 (longest request)

{code}
                
> apply time-wheel scheduler  about event system
> ----------------------------------------------
>
>                 Key: TS-1405
>                 URL: https://issues.apache.org/jira/browse/TS-1405
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 3.2.0
>            Reporter: kuotai
>            Assignee: kuotai
>             Fix For: 3.3.1
>
>         Attachments: time-wheel.patch, time_wheel_v2.patch
>
>
> when have more and more event in event system scheduler, it's worse. This is 
> the reason why we use inactivecop to handler keepalive. the new scheduler is 
> time-wheel. It's have better time complexity(O(1))

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to