我有一个 Ubuntu 10.10 服务器,有足够的 RAM、带宽和 CPU。当从 Apache 和 nginx 提供静态文件时,我看到延迟分布中有一种奇怪的、可重复的模式。因为这个问题对两个 http 服务器都很常见,我想知道我是否配置错误或调整不当 Ubuntu 的网络或缓存参数。
ab -n 1000 -c 4 http://apache-host/static-file.jpg
:
Percentage of the requests served within a certain time (ms)
50% 5
66% 3007
75% 3009
80% 3011
90% 9021
95% 9032
98% 21068
99% 45105
100% 45105 (longest request)
Run Code Online (Sandbox Code Playgroud)
ab -n 1000 -c 4 http://nginx-host/static-file.jpg
:
Percentage of the requests served within a certain time (ms)
50% 19
66% 19
75% 3011
80% 3017
90% 9021
95% 12026 …
Run Code Online (Sandbox Code Playgroud)