国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

關于 webman redis/mysql api 請求吞吐量問題

wanstu

今天我想試一下 webman 做 api 服務的吞吐量 進程數(shù)設置為 100 已安裝 event 擴展 使用環(huán)境是 windows wls2 + docker
截圖
使用 Jmeter 進行測試
截圖
首先是 一個只做 redis 數(shù)據(jù)庫讀寫的接口
截圖
通過 Jmeter 測試結果如下
截圖
截圖

然后是是 一個只做 mysql 數(shù)據(jù)庫讀寫的接口
截圖
通過 Jmeter 測試結果如下
截圖
截圖

這兩個接口所測出的吞吐量和平均請求時長都不如我使用 AdapterMan + CI 的吞吐量和平均請求時長
AdapterMan|論壇內關于 adapterman 的文章
首先是 redis 數(shù)據(jù)庫讀寫
截圖
通過 Jmeter 測試結果如下
截圖
截圖

首先是 mysql 數(shù)據(jù)庫讀寫
截圖
通過 Jmeter 測試結果如下
截圖
截圖

下面是我的問題
我看手冊首頁聲稱 webman 非??斓夷壳皽y試的結果來看效果并不是很好 這是我環(huán)境的原因嗎(測試時均是 進程數(shù)設置為 100 已安裝 event 擴展 使用環(huán)境是 windows wls2 + docker 所連接 mysql 數(shù)據(jù)庫 redis 數(shù)據(jù)庫是相同的)

1295 8 0
8個回答

wanstu

頂一頂 靜等各位大佬來解惑

  • 暫無評論
wanstu

補充一點 在使用 AdapterMan 后也做過一些測試 與使用fpm的CI相比 (通過 Jmeter 測試帶業(yè)務API)性能提升也達不到2倍
截圖
這個性能也未達到其項目(AdapterMan)中的效果,也想請各位大佬幫忙看下是怎么回事

  • 暫無評論
six

電腦啥配置,開了100個進程

  • wanstu 2023-09-01

    這個進程數(shù)我在測試 webman 和 AdapterMan + CI 時設置的是相同的 我認為的話這個應該對結果差異影響不大

walkor 打賞

wls2本身性能很差,尤其是有磁盤讀寫的時候。因為wls2成為瓶頸,壓測結果相差不是不大。
還有,進程數(shù)100感覺多了,進程數(shù)開成4倍cpu即可,進程太多性能會下降。

關于webman壓測略低于AdapterMan + CI,
是因為webman用的數(shù)據(jù)庫組件和CI的數(shù)據(jù)庫組件性能差異導致,尤其是laravel/think-orm的Model,性能較低。
如果都用原生PDO或者同一個數(shù)據(jù)庫組件,webman肯定會高于AdapterMan。

另外使用Model、 Db::table() 和原生PDO性能也有差異,之前有人壓測(數(shù)據(jù)庫隨機查詢)的對比數(shù)據(jù)。
http://www.wtbis.cn/a/1337
如果使用原生PDO webman QPS為1.78萬
如果使用laravel的Db::table() webman QPS降到 0.94萬QPS
如果使用laravel的Model webmanQPS降到 0.72萬QPS

最后建議壓測使用正式linux系統(tǒng)壓測,對于不同框架間的數(shù)據(jù)庫組件的那點性能差異可以忽略。

  • wanstu 2023-09-01

    感謝回復
    首先是關于 wsl2 的問題 稍后我會嘗試在 debian Linux 上測試
    然后是進程數(shù) 這個進程數(shù)我在測試 webman 和 AdapterMan + CI 時設置的是相同的 我認為的話這個應該對結果差異影響不大 (稍后在 debian Linux 上測試時會嘗試調整為 cpu * 4)
    目前我手邊有一個安裝了圖形界面的 debian11 今天在這個上面測試后我會再回復您

  • walkor 2023-09-01

    我的意思是100進程對于webman和AdapterMan都有點多了,調整合適的進程他們都會有更好的表現(xiàn)。不是說100進程是webman QPS低于AdapterMan的原因。
    webman低于AdapterMan的原因是數(shù)據(jù)庫組件的性能差異導致。

  • wanstu 2023-09-01

    大佬 我在下面貼出了我在debian上的測試結果 想請您幫忙看下 這個結果是否發(fā)揮出了 webman 應有的潛力

  • walkor 2023-09-01

    http://www.wtbis.cn/a/1337
    評論區(qū)有人發(fā)過壓測結果,你可以作為對比

  • 情系軒尼詩 2023-09-02

    大佬,對于tp的orm你有沒有測過

wanstu

cpu 為 8 核
截圖
截圖
redis 與 webman服務在同一主機 ab測試發(fā)起端與webman服務在同一內網(wǎng)
由于我本地部署的mysql在使用時報錯(通過 dbeaver 或 其他數(shù)據(jù)庫圖形工具可以正常連接)

PDOException: SQLSTATE[HY000] [2002] Operation timed out in /www/webman/vendor/illuminate/database/Connectors/Connector.php:66

并且我一時也不知怎么解決 所以 mysql 數(shù)據(jù)庫使用的是遠程服務器的

用來測試的接口
無業(yè)務
截圖
ab 測試結果

situ@localhost:~$ ab -n100000 -c200 -k http://172.18.1.0:2345/index/json
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 172.18.1.0 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests

Server Software:        workerman
Server Hostname:        172.18.1.0
Server Port:            2345

Document Path:          /index/json
Document Length:        21 bytes

Concurrency Level:      200
Time taken for tests:   11.365 seconds
Complete requests:      100000
Failed requests:        0
Keep-Alive requests:    100000
Total transferred:      13500000 bytes
HTML transferred:       2100000 bytes
Requests per second:    8799.24 [#/sec] (mean)
Time per request:       22.729 [ms] (mean)
Time per request:       0.114 [ms] (mean, across all concurrent requests)
Transfer rate:          1160.06 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   2.6      0      88
Processing:     8   23  13.5     19     404
Waiting:        6   23  13.5     19     404
Total:          9   23  14.7     19     444

Percentage of the requests served within a certain time (ms)
  50%     19
  66%     22
  75%     24
  80%     26
  90%     32
  95%     40
  98%     55
  99%     84
 100%    444 (longest request)

帶 redis
截圖
ab 測試結果

situ@localhost:~$ ab -n100000 -c200 -k http://172.18.1.0:2345/index/redisTest
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 172.18.1.0 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests

Server Software:        workerman
Server Hostname:        172.18.1.0
Server Port:            2345

Document Path:          /index/redisTest
Document Length:        61 bytes

Concurrency Level:      200
Time taken for tests:   16.403 seconds
Complete requests:      100000
Failed requests:        0
Keep-Alive requests:    100000
Total transferred:      17500000 bytes
HTML transferred:       6100000 bytes
Requests per second:    6096.32 [#/sec] (mean)
Time per request:       32.807 [ms] (mean)
Time per request:       0.164 [ms] (mean, across all concurrent requests)
Transfer rate:          1041.85 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1  26.9      0    1104
Processing:     9   32  14.9     29     302
Waiting:        9   32  14.9     29     302
Total:          9   33  31.1     29    1155

Percentage of the requests served within a certain time (ms)
  50%     29
  66%     32
  75%     36
  80%     38
  90%     47
  95%     58
  98%     75
  99%     91
 100%   1155 (longest request)

帶 sql
截圖
ab 測試結果

situ@localhost:~$ ab -n100000 -c200 -k http://172.18.1.0:2345/index/sqlTest
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 172.18.1.0 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests

Server Software:        workerman
Server Hostname:        172.18.1.0
Server Port:            2345

Document Path:          /index/sqlTest
Document Length:        887 bytes

Concurrency Level:      200
Time taken for tests:   111.727 seconds
Complete requests:      100000
Failed requests:        0
Keep-Alive requests:    100000
Total transferred:      100200000 bytes
HTML transferred:       88700000 bytes
Requests per second:    895.04 [#/sec] (mean)
Time per request:       223.455 [ms] (mean)
Time per request:       1.117 [ms] (mean, across all concurrent requests)
Transfer rate:          875.81 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   8.2      0     276
Processing:    52  222 105.7    185    2517
Waiting:       52  222 105.7    185    2517
Total:         52  222 109.5    185    2777

Percentage of the requests served within a certain time (ms)
  50%    185
  66%    215
  75%    262
  80%    295
  90%    355
  95%    404
  98%    482
  99%    564
 100%   2777 (longest request)

我想請大佬幫忙看下目前這個表現(xiàn)的 webman 是正常的嗎

  • six 2023-09-01

    根據(jù)我之前的壓測結果來看數(shù)據(jù)不太對。
    無業(yè)務 QPS 只有8799 太不正常了,正常應該5萬-20萬之間。是不是用了啥中間件寫磁盤了,比如webman/log。
    Redis QPS也應該過萬才對。
    數(shù)據(jù)庫讀寫各一次應該有幾千QPS,幾百也不太正常。

MarkGo

截圖
空業(yè)務,windows下的結果....

  • 暫無評論
軟飯工程師

截圖
6核的電腦,開了24個進程,沒做任何優(yōu)化,圖省事,debug 都沒關

  • 暫無評論
軟飯工程師

截圖
截圖
300萬數(shù)據(jù),隨機取一條返回,24個進程也能打到1萬5

  • 暫無評論
年代過于久遠,無法發(fā)表回答
??