我的服务器可以有多less用户?

我被告知切换到nginx或至less到mpm_worker。 但是,真的,我怎么估计,如果我的服务器是不是真的超载,即使使用mpm_prefork?

我的系统是:

  1. GCP 1 CPU + 3,75GB
  2. Debian 8
  3. Apache 2.4与mpm_prefork
  4. 清漆caching,Memcache

一些php.ini设置

max_execution_time = 30 max_input_time = 60 memory_limit = 1536M 

一些其他各种标准的apache模块,没有fastcgi和没有php-fpm。

 <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 250 MaxConnectionsPerChild 0 </IfModule> KeepAlive Off 

我有大约20个小WordPress的博客。

那么,我可以在所有网站上共同使用多less个并发用户? 我不需要确切的数字。 我想知道是十几岁还是十几岁? 可能不是10000s。 但是,如果在线时间相当于250次 – 我认为现在还是很好的。

另外,我应该将内存限制设置为3GB? 或者让左边的2GB被清漆使用是个好主意?

 Completed 1000 requests Finished 1000 requests Server Software: Apache/2.4.10 Server Hostname: sochi.asp.sale Server Port: 443 SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256 Document Path: / Document Length: 199165 bytes Concurrency Level: 100 Time taken for tests: 12.041 seconds Complete requests: 1000 Failed requests: 0 Total transferred: 199546499 bytes HTML transferred: 199165000 bytes Requests per second: 83.05 [#/sec] (mean) Time per request: 1204.067 [ms] (mean) Time per request: 12.041 [ms] (mean, across all concurrent requests) Transfer rate: 16184.28 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 12 711 1471.9 307 6868 Processing: 23 492 960.2 253 7588 Waiting: 2 302 957.0 76 7043 Total: 35 1203 2005.6 524 7629 Percentage of the requests served within a certain time (ms) 50% 524 66% 534 75% 608 80% 644 90% 7164 95% 7186 98% 7188 99% 7189 100% 7629 (longest request) 

在猜测,可能不到100,然后开始放缓。 作为参考,我本周负载testing了一个客户服务器。 规格是:4核4GB内存2核心litespeed与lsapi处理程序PHP 7 MariaDB 10只是一个真正的编码网站。

在最慢的页面上,它可能需要300个并发连接,然后才开始加载每页4秒以下。

当没有负载时,它正在~50ms TTFB

在说,我不是太熟悉Nginx +清漆可以处理什么,所以你可能会得到类似的结果。 不过,我build议添加额外的核心,并拒绝了PHP的内存限制。 如果一个简单的WordPress博客需要超过256M,那么有些地方是错误的。

最容易find的方法是自己加载testing – > https://httpd.apache.org/docs/2.4/programs/ab.html

考虑到你有清漆,它可以很容易地> 1000,如果:

  • 您已正确configuration清漆(VCL)
  • 博客没有太多的dynamic性质(即不是Woocommerce动力商店) – 大多是静态的文章。