пятница, 25 декабря 2009 г.

Pure-tcl sockets

Тесты fileevent socket-сервера на CoreQuad хосте для двух сценариев - возвращаемый документ 10 килобайт и 0,5 килобайт. Тестовый скрипт - немного модифицированный netserver.txt, возвращающий вместо эха http-заголовок 200 OK и простенькую html-страничку.

Ради интереса попробовал tclhttpd (оригинальный, 2004-го года) и его реинкарнацию wub. Первый выдает 40 TPS, а второй - 8 TPS. Комментарии, как говорится, излишни.

10k responce

$ openload -l 10 localhost:9999 200
URL: http://localhost:9999/
Clients: 200
Time Limit: 10 sec.
MaTps 6301.00, Tps 6301.00, Resp Time 0.020, Err 0%, Count 6301
MaTps 6324.30, Tps 6534.00, Resp Time 0.020, Err 0%, Count 12835
MaTps 6416.87, Tps 7250.00, Resp Time 0.018, Err 0%, Count 20085
MaTps 6434.88, Tps 6597.00, Resp Time 0.023, Err 0%, Count 26682
MaTps 6469.59, Tps 6782.00, Resp Time 0.019, Err 0%, Count 33464
MaTps 6501.94, Tps 6793.00, Resp Time 0.019, Err 0%, Count 40257
MaTps 6535.44, Tps 6837.00, Resp Time 0.030, Err 0%, Count 47094
MaTps 6563.40, Tps 6815.00, Resp Time 0.019, Err 0%, Count 53909
MaTps 6576.86, Tps 6698.00, Resp Time 0.019, Err 0%, Count 60607
MaTps 6595.97, Tps 6768.00, Resp Time 0.056, Err 0%, Count 67375
Total TPS: 6736.83
Avg. Response time: 0.024 sec.
Max Response time: 9.714 sec
Total Requests: 67375
Total Errors: 0


$ openload -l 10 localhost:9999 100
URL: http://localhost:9999/
Clients: 100
Time Limit: 10 sec.
MaTps 3251.00, Tps 3251.00, Resp Time 0.030, Err 0%, Count 3251
MaTps 3297.60, Tps 3717.00, Resp Time 0.027, Err 0%, Count 6968
MaTps 3417.44, Tps 4496.00, Resp Time 0.022, Err 0%, Count 11464
MaTps 3527.50, Tps 4518.00, Resp Time 0.022, Err 0%, Count 15982
MaTps 3672.85, Tps 4981.00, Resp Time 0.020, Err 0%, Count 20963
MaTps 3796.66, Tps 4911.00, Resp Time 0.020, Err 0%, Count 25874
MaTps 3843.60, Tps 4266.00, Resp Time 0.023, Err 0%, Count 30140
MaTps 3840.14, Tps 3809.00, Resp Time 0.026, Err 0%, Count 33949
MaTps 3800.42, Tps 3443.00, Resp Time 0.029, Err 0%, Count 37392
MaTps 3869.98, Tps 4496.00, Resp Time 0.022, Err 0%, Count 41888
Total TPS: 4188.38
Avg. Response time: 0.024 sec.
Max Response time: 0.090 sec
Total Requests: 41888
Total Errors: 0


$ openload -l 10 localhost:9999 50
URL: http://localhost:9999/
Clients: 50
Time Limit: 10 sec.
MaTps 4303.00, Tps 4303.00, Resp Time 0.012, Err 0%, Count 4303
MaTps 4317.90, Tps 4452.00, Resp Time 0.011, Err 0%, Count 8755
MaTps 4352.51, Tps 4664.00, Resp Time 0.011, Err 0%, Count 13419
MaTps 4379.56, Tps 4623.00, Resp Time 0.011, Err 0%, Count 18042
MaTps 4438.30, Tps 4967.00, Resp Time 0.010, Err 0%, Count 23009
MaTps 4467.67, Tps 4732.00, Resp Time 0.011, Err 0%, Count 27741
MaTps 4483.60, Tps 4627.00, Resp Time 0.011, Err 0%, Count 32368
MaTps 4476.54, Tps 4413.00, Resp Time 0.011, Err 0%, Count 36781
MaTps 4427.99, Tps 3991.00, Resp Time 0.013, Err 0%, Count 40772
MaTps 4383.79, Tps 3986.00, Resp Time 0.013, Err 0%, Count 44758
Total TPS: 4475.35
Avg. Response time: 0.011 sec.
Max Response time: 0.020 sec
Total Requests: 44758
Total Errors: 0



0.5k responce

$ sudo nice -n -20 openload -l 10 localhost:9999 1
URL: http://localhost:9999/
Clients: 1
Time Limit: 10 sec.
MaTps 4683.00, Tps 4683.00, Resp Time 0.000, Err 0%, Count 4683
MaTps 4676.60, Tps 4619.00, Resp Time 0.000, Err 0%, Count 9302
MaTps 4667.74, Tps 4588.00, Resp Time 0.000, Err 0%, Count 13890
MaTps 4652.97, Tps 4520.00, Resp Time 0.000, Err 0%, Count 18410
MaTps 4645.77, Tps 4581.00, Resp Time 0.000, Err 0%, Count 22991
MaTps 4641.79, Tps 4606.00, Resp Time 0.000, Err 0%, Count 27597
MaTps 4639.41, Tps 4618.00, Resp Time 0.000, Err 0%, Count 32215
MaTps 4634.67, Tps 4592.00, Resp Time 0.000, Err 0%, Count 36807
MaTps 4623.30, Tps 4521.00, Resp Time 0.000, Err 0%, Count 41328
MaTps 4610.87, Tps 4499.00, Resp Time 0.000, Err 0%, Count 45827
Total TPS: 4582.24
Avg. Response time: 0.000 sec.
Max Response time: 0.012 sec
Total Requests: 45827
Total Errors: 0


$ sudo nice -n -20 openload -l 10 localhost:9999 5
URL: http://localhost:9999/
Clients: 5
Time Limit: 10 sec.
MaTps 5097.00, Tps 5097.00, Resp Time 0.001, Err 0%, Count 5097
MaTps 5065.10, Tps 4778.00, Resp Time 0.001, Err 0%, Count 9875
MaTps 5053.59, Tps 4950.00, Resp Time 0.001, Err 0%, Count 14825
MaTps 5037.93, Tps 4897.00, Resp Time 0.001, Err 0%, Count 19722
MaTps 5018.14, Tps 4840.00, Resp Time 0.001, Err 0%, Count 24562
MaTps 4999.32, Tps 4830.00, Resp Time 0.001, Err 0%, Count 29392
MaTps 4978.49, Tps 4791.00, Resp Time 0.001, Err 0%, Count 34183
MaTps 4954.64, Tps 4740.00, Resp Time 0.001, Err 0%, Count 38923
MaTps 4939.98, Tps 4808.00, Resp Time 0.001, Err 0%, Count 43731
MaTps 4921.28, Tps 4753.00, Resp Time 0.001, Err 0%, Count 48484
Total TPS: 4847.92
Avg. Response time: 0.001 sec.
Max Response time: 0.023 sec
Total Requests: 48484
Total Errors: 0

$ sudo nice -n -20 openload -l 10 localhost:9999 20
URL: http://localhost:9999/
Clients: 20
Time Limit: 10 sec.
MaTps 5692.00, Tps 5692.00, Resp Time 0.004, Err 0%, Count 5692
MaTps 5577.90, Tps 4551.00, Resp Time 0.004, Err 0%, Count 10243
MaTps 5461.31, Tps 4412.00, Resp Time 0.005, Err 0%, Count 14655
MaTps 5365.98, Tps 4508.00, Resp Time 0.004, Err 0%, Count 19163
MaTps 5286.28, Tps 4569.00, Resp Time 0.004, Err 0%, Count 23732
MaTps 5204.55, Tps 4469.00, Resp Time 0.004, Err 0%, Count 28201
MaTps 5130.50, Tps 4464.00, Resp Time 0.004, Err 0%, Count 32665
MaTps 5049.65, Tps 4322.00, Resp Time 0.005, Err 0%, Count 36987
MaTps 5009.68, Tps 4650.00, Resp Time 0.004, Err 0%, Count 41637
MaTps 4974.02, Tps 4653.00, Resp Time 0.004, Err 0%, Count 46290
Total TPS: 4628.54
Avg. Response time: 0.004 sec.
Max Response time: 0.015 sec
Total Requests: 46290
Total Errors: 0


$ sudo nice -n -20 openload -l 10 localhost:9999 50
URL: http://localhost:9999/
Clients: 50
Time Limit: 10 sec.
MaTps 9530.00, Tps 9530.00, Resp Time 0.005, Err 0%, Count 9530
MaTps 9266.20, Tps 6892.00, Resp Time 0.007, Err 0%, Count 16422
MaTps 9140.08, Tps 8005.00, Resp Time 0.006, Err 0%, Count 24427
MaTps 8684.07, Tps 4580.00, Resp Time 0.011, Err 0%, Count 29007
MaTps 8299.37, Tps 4837.00, Resp Time 0.010, Err 0%, Count 33844
MaTps 7903.13, Tps 4337.00, Resp Time 0.011, Err 0%, Count 38181
MaTps 7608.42, Tps 4956.00, Resp Time 0.010, Err 0%, Count 43137
MaTps 7305.07, Tps 4575.00, Resp Time 0.011, Err 0%, Count 47712
MaTps 6936.37, Tps 3618.00, Resp Time 0.014, Err 0%, Count 51330
MaTps 7147.43, Tps 9047.00, Resp Time 0.006, Err 0%, Count 60377
Total TPS: 6037.10
Avg. Response time: 0.008 sec.
Max Response time: 0.018 sec
Total Requests: 60377
Total Errors: 0


$ sudo nice -n -20 openload -l 10 localhost:9999 100
URL: http://localhost:9999/
Clients: 100
Time Limit: 10 sec.
MaTps 7591.00, Tps 7591.00, Resp Time 0.013, Err 0%, Count 7591
MaTps 7788.30, Tps 9564.00, Resp Time 0.011, Err 0%, Count 17155
MaTps 7463.87, Tps 4544.00, Resp Time 0.022, Err 0%, Count 21699
MaTps 7545.68, Tps 8282.00, Resp Time 0.012, Err 0%, Count 29981
MaTps 7756.81, Tps 9657.00, Resp Time 0.010, Err 0%, Count 39638
MaTps 7940.53, Tps 9594.00, Resp Time 0.010, Err 0%, Count 49232
MaTps 8054.78, Tps 9083.00, Resp Time 0.011, Err 0%, Count 58315
MaTps 8205.70, Tps 9564.00, Resp Time 0.010, Err 0%, Count 67879
MaTps 8269.43, Tps 8843.00, Resp Time 0.011, Err 0%, Count 76722
MaTps 8303.19, Tps 8607.00, Resp Time 0.012, Err 0%, Count 85329
Total TPS: 8532.05
Avg. Response time: 0.012 sec.
Max Response time: 0.047 sec
Total Requests: 85329
Total Errors: 0



sudo nice -n -20 openload -l 10 localhost:9999 200
URL: http://localhost:9999/
Clients: 200
Time Limit: 10 sec.
MaTps 10043.00, Tps 10043.00, Resp Time 0.013, Err 0%, Count 10043
MaTps 10013.60, Tps 9749.00, Resp Time 0.013, Err 0%, Count 19792
MaTps 9922.24, Tps 9100.00, Resp Time 0.014, Err 0%, Count 28892
MaTps 9780.12, Tps 8501.00, Resp Time 0.022, Err 0%, Count 37393
MaTps 9309.32, Tps 5072.21, Resp Time 0.026, Err 0%, Count 42521
MaTps 8980.09, Tps 6017.00, Resp Time 0.022, Err 0%, Count 48538
MaTps 8850.68, Tps 7686.00, Resp Time 0.023, Err 0%, Count 56224
MaTps 8636.71, Tps 6711.00, Resp Time 0.023, Err 0%, Count 62935
MaTps 7965.04, Tps 1920.00, Resp Time 0.068, Err 0%, Count 64855
Total TPS: 6484.20
Avg. Response time: 0.020 sec.
Max Response time: 9.707 sec
Total Requests: 64855
Total Errors: 0


$ sudo nice -n -20 openload -l 10 localhost:9999 500
URL: http://localhost:9999/
Clients: 500
Time Limit: 10 sec.
MaTps 9850.00, Tps 9850.00, Resp Time 0.014, Err 0%, Count 9850
MaTps 9824.10, Tps 9591.00, Resp Time 0.014, Err 0%, Count 19441
MaTps 9835.89, Tps 9942.00, Resp Time 0.013, Err 0%, Count 29383
MaTps 9854.90, Tps 10026.00, Resp Time 0.043, Err 0%, Count 39409
MaTps 9862.01, Tps 9926.00, Resp Time 0.018, Err 0%, Count 49335
MaTps 9864.91, Tps 9891.00, Resp Time 0.013, Err 0%, Count 59226
MaTps 9864.12, Tps 9857.00, Resp Time 0.044, Err 0%, Count 69083
MaTps 9745.91, Tps 8682.00, Resp Time 0.023, Err 0%, Count 77765
MaTps 9602.42, Tps 8311.00, Resp Time 0.016, Err 0%, Count 86076
MaTps 9607.87, Tps 9657.00, Resp Time 0.119, Err 0%, Count 95733
Total TPS: 9572.34
Avg. Response time: 0.032 sec.
Max Response time: 9.584 sec
Total Requests: 95733
Total Errors: 37


$ sudo nice -n -20 openload -l 10 localhost:9999 1000
URL: http://localhost:9999/
Clients: 1000
Time Limit: 10 sec.
MaTps 4979.00, Tps 4979.00, Resp Time 0.027, Err 0%, Count 4979
MaTps 5039.50, Tps 5584.00, Resp Time 0.023, Err 0%, Count 10563
MaTps 5534.75, Tps 9992.00, Resp Time 0.013, Err 0%, Count 20555
MaTps 5973.48, Tps 9922.00, Resp Time 0.055, Err 0%, Count 30477
MaTps 6337.63, Tps 9615.00, Resp Time 0.027, Err 0%, Count 40092
MaTps 6638.56, Tps 9347.00, Resp Time 0.014, Err 0%, Count 49439
MaTps 6928.91, Tps 9542.00, Resp Time 0.068, Err 0%, Count 58981
MaTps 7134.02, Tps 8980.00, Resp Time 0.027, Err 0%, Count 67961
MaTps 7360.82, Tps 9402.00, Resp Time 0.014, Err 0%, Count 77363
MaTps 7592.63, Tps 9679.00, Resp Time 0.152, Err 0%, Count 87042
Total TPS: 8703.33
Avg. Response time: 0.044 sec.
Max Response time: 9.650 sec
Total Requests: 87042
Total Errors: 0

Комментариев нет:


(C) Alexey Pechnikov aka MBG, mobigroup.ru