Bug 52662 - Problem results by Mono on Linux when stress testing socket with SocketAsyncEventargs, different with .NET Framework on Windows
Summary: Problem results by Mono on Linux when stress testing socket with SocketAsyncE...
Status: ASSIGNED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: master
Hardware: PC All
: --- normal
Target Milestone: Untriaged
Assignee: Ludovic Henry
URL:
Depends on:
Blocks:
 
Reported: 2017-02-22 08:29 UTC by apollo_maverick
Modified: 2017-03-03 22:30 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description apollo_maverick 2017-02-22 08:29:38 UTC
use the test case I uploaded at https://bugzilla.xamarin.com/show_bug.cgi?id=51939

Mind the mono ab result: document length and failure number 
and wrk result: Requests/sec and Transfer/sec

test client running on one same ubuntu 16.04 Linux machine.

the same test case binary 

test case server running by .NET Framework on Windows:

wrk -c 10000 http://192.168.60.1:80/
Running 10s test @ http://192.168.60.1:80/
  2 threads and 10000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    76.67ms  111.25ms   1.95s    86.76%
    Req/Sec     4.62k     2.19k   10.85k    68.13%
  88554 requests in 10.02s, 15.29MB read
  Socket errors: connect 0, read 7445, write 2660, timeout 608
Requests/sec:   8833.70
Transfer/sec:      1.53MB


ab -c 100 -n 10000 http://192.168.60.1:80/    
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.60.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests


Server Software:        nginx/1.8.1
Server Hostname:        192.168.60.1
Server Port:            80

Document Path:          /
Document Length:        19 bytes

Concurrency Level:      100
Time taken for tests:   2.227 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      1810000 bytes
HTML transferred:       190000 bytes
Requests per second:    4490.40 [#/sec] (mean)
Time per request:       22.270 [ms] (mean)
Time per request:       0.223 [ms] (mean, across all concurrent requests)
Transfer rate:          793.71 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   11  82.6      4    1007
Processing:     1    5   2.6      4      26
Waiting:        0    3   2.2      3      25
Total:          3   16  82.9      9    1016

Percentage of the requests served within a certain time (ms)
  50%      9
  66%     11
  75%     11
  80%     12
  90%     16
  95%     17
  98%     19
  99%     26
 100%   1016 (longest request)


test case server running by Mono(master/4.9.1 latest CI build) on Ubuntu 16.04 Linux:

wrk -c 1000 http://192.168.60.128:8000/
Running 10s test @ http://192.168.60.128:8000/
  2 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   448.45ms  605.29ms   1.99s    87.13%
    Req/Sec    31.24     49.02   212.00     90.48%
  110 requests in 10.04s, 19.55KB read
  Socket errors: connect 0, read 0, write 0, timeout 9
Requests/sec:     10.95
Transfer/sec:      1.95KB


ab -c 100 -n 10000 http://192.168.60.128:8000/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.60.128 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests


Server Software:        
Server Hostname:        192.168.60.128
Server Port:            8000

Document Path:          /
Document Length:        0 bytes

Concurrency Level:      100
Time taken for tests:   1.999 seconds
Complete requests:      10000
Failed requests:        878
   (Connect: 0, Receive: 0, Length: 878, Exceptions: 0)
Total transferred:      159796 bytes
HTML transferred:       17560 bytes
Requests per second:    5003.30 [#/sec] (mean)
Time per request:       19.987 [ms] (mean)
Time per request:       0.200 [ms] (mean, across all concurrent requests)
Transfer rate:          78.08 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    6  71.8      1    1001
Processing:     0    3  13.5      2     560
Waiting:        0    0   5.4      0     405
Total:          1    9  78.4      3    1204

Percentage of the requests served within a certain time (ms)
  50%      3
  66%      4
  75%      4
  80%      4
  90%      5
  95%      6
  98%      7
  99%      8
 100%   1204 (longest request)
Comment 1 apollo_maverick 2017-03-03 22:30:46 UTC
@ludovic maybe this is caused by underneath problem of threading infrastructure?

Note You need to log in before you can comment on or make changes to this bug.