0

I was told to switch to nginx or at least to mpm_worker. But really, how can I estimate if my server is not really overloaded even with mpm_prefork?

My system is:

  1. GCP 1 CPU + 3,75GB
  2. Debian 8
  3. Apache 2.4 with mpm_prefork
  4. Varnish cache, Memcache

Some php.ini settings

max_execution_time = 30
max_input_time = 60
memory_limit = 1536M

Some other various standard apache modules, without fastcgi and without php-fpm.

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

KeepAlive Off

And I have about 20 small wordpress blogs on it.

So how many concurrent users can I take all together on all sites? I don't need exact numbers. I want to understand if it's 10s 100s or 1000s? Probably not 10000s. But if it's something like 250 same time online - I think It's still good for now.

Also, should I set the memory limit to 3GB? OR let the left 2GB to be used by varnish is a good idea?

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)

2 Answers2

0

At a guess, probably less than 100 before it starts slowing down. For reference, I load tested a customers server this week. The specs were: 4core 4GB RAM 2 core litespeed with lsapi handler PHP 7 MariaDB 10 And just a really well coded site.

It could take 300 concurrent connections on the slowest page, before it started loading slower than 4 seconds per page.

When not under load it was getting ~50ms TTFB

In saying that, I'm not overly familiar with what Nginx+varnish can handle, so you may get similar results. However I'd recommend adding extra cores, and turning down that PHP memory limit. If a simple wordpress blog needs more than 256M, then something is wrong.

Easiest way to find out is to load test yourself -> https://httpd.apache.org/docs/2.4/programs/ab.html

Will
  • 14
0

Considering that you have Varnish it can easily be > 1000 if:

  • You have configured Varnish (VCL) properly
  • The blogs do not have much of dynamic nature (i.e. not Woocommerce powered stores) - mostly static articles.