首页   注册   登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Coding
V2EX  ›  whoami9894  ›  全部回复第 1 页 / 共 25 页
回复总数  494
1  2  3  4  5  6  7  8  9  10 ... 25  
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@ClericPy
学到了,感谢感谢
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@ClericPy
Time per request: 1311.422 [ms] (mean)
Time per request: 1.311 [ms] (mean, across all concurrent requests)
我搜了下超过 1s 应该是 1000 并发量都请求一次的时间,平均下来一个请求 1ms 左右,应该差不多
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@chenset 果然是,改成 2^16-1 感觉没啥问题了

```
Concurrency Level: 1000
Time taken for tests: 13.114 seconds
Complete requests: 10000
Failed requests: 421
(Connect: 0, Receive: 0, Length: 421, Exceptions: 0)
Total transferred: 24437163 bytes
HTML transferred: 20628743 bytes
Requests per second: 762.53 [#/sec] (mean)
Time per request: 1311.422 [ms] (mean)
Time per request: 1.311 [ms] (mean, across all concurrent requests)
Transfer rate: 1819.74 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 188 724 226.3 670 2185
Processing: 118 540 146.4 538 1997
Waiting: 22 232 137.8 188 1775
Total: 465 1265 265.6 1234 2689

Percentage of the requests served within a certain time (ms)
50% 1234
66% 1315
75% 1370
80% 1409
90% 1538
95% 1703
98% 2100
99% 2193
100% 2689 (longest request)
```
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@phpdever
`-c 1000 -n 3000`时的负载情况

```
top - 13:30:23 up 51 days, 16:50, 2 users, load average: 1.67, 0.46, 0.18
任务: 269 total, 3 running, 197 sleeping, 0 stopped, 0 zombie
%Cpu(s): 72.1 us, 7.5 sy, 0.0 ni, 18.5 id, 0.0 wa, 0.0 hi, 1.9 si, 0.0 st
KiB Mem : 16422300 total, 1691276 free, 1062368 used, 13668656 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 15068552 avail Mem

进 USER PR NI VIRT RES SHR %CPU %MEM TIME+ COMMAND 22322 root 20 0 120432 72864 11844 R 496.3 0.4 5:00.33 main
11740 root 20 0 115144 75736 5228 R 98.7 0.5 0:04.26 ab
4207 mysql 20 0 4790288 291612 15756 S 44.9 1.8 31:01.26 mysqld
```


```
Concurrency Level: 1000
Time taken for tests: 4.461 seconds
Complete requests: 3000
Failed requests: 2677
(Connect: 0, Receive: 0, Length: 2677, Exceptions: 0)
Total transferred: 6918669 bytes
HTML transferred: 5772209 bytes
Requests per second: 672.43 [#/sec] (mean)
Time per request: 1487.146 [ms] (mean)
Time per request: 1.487 [ms] (mean, across all concurrent requests)
Transfer rate: 1514.42 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 156 753 286.5 689 1852
Processing: 57 517 166.8 534 1167
Waiting: 9 243 132.5 208 904
Total: 326 1271 353.3 1284 2457

Percentage of the requests served within a certain time (ms)
50% 1284
66% 1355
75% 1384
80% 1481
90% 1696
95% 1965
98% 2169
99% 2209
100% 2457 (longest request)
```
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@lbp0200
这是`-c 20 -n 1000`的结果

```
Concurrency Level: 20
Time taken for tests: 1.383 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 2532000 bytes
HTML transferred: 2152000 bytes
Requests per second: 723.07 [#/sec] (mean)
Time per request: 27.660 [ms] (mean)
Time per request: 1.383 [ms] (mean, across all concurrent requests)
Transfer rate: 1787.92 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 7 19 5.4 18 39
Processing: 2 8 3.9 8 27
Waiting: 1 6 3.3 5 25
Total: 10 27 6.3 27 54

Percentage of the requests served within a certain time (ms)
50% 27
66% 29
75% 30
80% 31
90% 36
95% 40
98% 45
99% 46
100% 54 (longest request)
```
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@Flasky 不求能抗住抢课那个并发量 2333。我们教务系统每逢抢课必挂,抢课脚本得在抢课开始前维护一个 TCP 连接池
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@ClericPy 这个接口逻辑就是从 session 里取用户名,然后 SELECT 一次数据库,这样测试我怀疑数据库缓存也有加成

我换成`-n 3000 -c 1000`结果是这样,fail 还是过多

```
Concurrency Level: 1000
Time taken for tests: 5.023 seconds
Complete requests: 3000
Failed requests: 2421
(Connect: 0, Receive: 0, Length: 2421, Exceptions: 0)
Total transferred: 6381837 bytes
HTML transferred: 5230257 bytes
Requests per second: 597.29 [#/sec] (mean)
Time per request: 1674.237 [ms] (mean)
Time per request: 1.674 [ms] (mean, across all concurrent requests)
Transfer rate: 1240.82 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 380 807 255.4 738 1678
Processing: 151 518 156.7 480 1094
Waiting: 28 264 151.7 223 830
Total: 594 1325 242.7 1277 2621

Percentage of the requests served within a certain time (ms)
50% 1277
66% 1387
75% 1457
80% 1531
90% 1642
95% 1769
98% 1994
99% 2087
100% 2621 (longest request)
```
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@richangfan 你不说我还没注意到 90%请求都失败了.......
24 天前
回复了 whoami9894 创建的主题 问与答 请教一下 ab 压测
@chenset 其实我不太理解的是 rps 700 是个什么级别,假如说 2000 人同时请求的话会不会就挂了
HTML 由 js 动态生成的,还做了混淆
socks5 应用层协议建立在 tcp 之上,先 tcp socket 握手建立连接,socks5 再通过这条连接发送握手包
没问题啊,我的:
文件版本: VMware Workstation 15.0.0.38213
产品版本:15.0.0 build-10134415
我记得我版本是 15.x 呀,明天再确认下
33 天前
回复了 334862132 创建的主题 Go go 语言 channel 在工作场景中的应用
GO 的并发模型核心不就是 channel 吗,不考这个考啥
38 天前
回复了 whoami9894 创建的主题 问与答 XHR 跨域问题
dd
38 天前
回复了 whoami9894 创建的主题 问与答 XHR 跨域问题
@ysc3839
嗯这个我知道,只是实在找不到原因
这个洞现实世界里危害有限
syscall.SetNonblock 然后 select 轮询?不知道 go 的范式是不是这样做
45 天前
回复了 whoami9894 创建的主题 微信 微信小程序签到接口鉴权问题
@also24
我记得开发者工具有测试账号啊,不知道获取的 code 是不是有效
45 天前
回复了 whoami9894 创建的主题 微信 微信小程序签到接口鉴权问题
@fetich
好的,我去学习一下
1  2  3  4  5  6  7  8  9  10 ... 25  
关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   1037 人在线   最高记录 5043   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.3 · 27ms · UTC 19:25 · PVG 03:25 · LAX 11:25 · JFK 14:25
♥ Do have faith in what you're doing.