Want more timely Centmin Mod News Updates?
Become a Member

Sysadmin Stress Test ApacheBench

Discussion in 'System Administration' started by Pawel4IT, May 2, 2020.

  1. Pawel4IT

    Pawel4IT New Member

    8
    0
    1
    May 1, 2020
    Ratings:
    +1
    Local Time:
    10:01 PM
    Hi everyone,
    I would like to subject my site with wordpress to a stress test
    The site is hosted on my virtual server with hyper-v, entirely dedicated to centminimod
    While I have no problem stressing, on another server, for the centminimod server I cannot start the test
    I also disabled CSF
    For stress use:
    Server with centminimod:
    Code:
    root@linuxbck:/home/paolo# ab -n 10 -c 10 http://centos7mod3.com/
    This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/
    
    Benchmarking centos7mod3.com (be patient)...apr_pollset_poll: The timeout specified has expired (70007)
    Total of 1 requests completed
    
    Server no centminimod:
    Code:
    root@linuxbck:/home/paolo# ab -n 10 -c 10 http://examplecentos.com/
    This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/
    
    Benchmarking examplecentos.com (be patient).....done
    
    
    Server Software:        nginx/1.14.1
    Server Hostname:        examplecentos.com
    Server Port:            80
    
    Document Path:          /
    Document Length:        49032 bytes
    
    Concurrency Level:      10
    Time taken for tests:   6.411 seconds
    Complete requests:      10
    Failed requests:        0
    Total transferred:      493370 bytes
    HTML transferred:       490320 bytes
    Requests per second:    1.56 [#/sec] (mean)
    Time per request:       6411.031 [ms] (mean)
    Time per request:       641.103 [ms] (mean, across all concurrent requests)
    Transfer rate:          75.15 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        1    1   0.0      1       1
    Processing:  4263 5126 929.1   5120    6410
    Waiting:     2958 4114 1234.5   4539    5666
    Total:       4264 5127 929.1   5120    6411
    
    Percentage of the requests served within a certain time (ms)
      50%   5120
      66%   5497
      75%   6294
      80%   6295
      90%   6411
      95%   6411
      98%   6411
      99%   6411
     100%   6411 (longest request)
    root@linuxbck:/home/paolo#
    

     
  2. eva2000

    eva2000 Administrator Staff Member

    44,425
    10,144
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,693
    Local Time:
    6:01 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    If you disable CSF Firewall, whitelisted ports won't be whitelisted and maybe blocked, so ensure CSF Firewall is running. ApacheBench may not be able to connect to your server if CSF Firewall is disabled.

    Are you getting ApacheBench error on server that doesn't have Centmin Mod installed which trying to test a remote server with Centmin Mod installed ?

    I'd ensure Centmin Mod Nginx Wordpress site is fully working first and that Nginx and PHP-FPM are running.

    From ApacheBench server run these commands
    Code (Text):
    curl -I http://centos7mod3.com/
    curl -Ik https://centos7mod3.com/
    

    From Centmin Mod server run these commands including cminfo commands Upgrade - Nginx - Insight Guide - cminfo command explained some reveal server IP if which you may want to mask
    Code (Text):
    curl -I http://centos7mod3.com/
    curl -Ik https://centos7mod3.com/
    

    Code (Text):
    virt-what
    lscpu
    

    Code (Text):
    free -mlt
    php-config
    

    Code (Text):
    cminfo | grep -v 'ip: ' | sed -n '/Centmin Mod Quick Info:/,/Site Nginx Vhost Accounts:/p'
    

    Code (Text):
    cminfo phpstats
    

    Still on Centmin Mod server, try testing using Siege load tester which is installed
    Code (Text):
    siege -b -c10 -r10 http://centos7mod3.com/

    Code (Text):
    siege -b -c10 -r10 https://centos7mod3.com/

    For posting code or output from commands to keep the formatting, you might want to use CODE tags for code How to use forum BBCODE code tags :)
     
  3. Pawel4IT

    Pawel4IT New Member

    8
    0
    1
    May 1, 2020
    Ratings:
    +1
    Local Time:
    10:01 PM
    I thank you for the precious info
    Code (Text):
    root@linuxbck:/home/paolo# ab -n 10 -c 10 https://centos7mod3.com/
    This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/
    
    Benchmarking centos7mod3.com (be patient).....done
    
    
    Server Software:        nginx
    Server Hostname:        centos7mod3.com
    Server Port:            443
    SSL/TLS Protocol:       TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
    TLS Server Name:        centos7mod3.com
    
    Document Path:          /
    Document Length:        48992 bytes
    
    Concurrency Level:      10
    Time taken for tests:   5.922 seconds
    Complete requests:      10
    Failed requests:        0
    Total transferred:      493790 bytes
    HTML transferred:       489920 bytes
    Requests per second:    1.69 [#/sec] (mean)
    Time per request:       5922.190 [ms] (mean)
    Time per request:       592.219 [ms] (mean, across all concurrent requests)
    Transfer rate:          81.43 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:       15   19   1.4     19      19
    Processing:  3979 4735 663.9   4604    5902
    Waiting:     1461 2893 1383.6   2568    5383
    Total:       3998 4754 664.5   4623    5922
    
    Percentage of the requests served within a certain time (ms)
      50%   4623
      66%   4633
      75%   4639
      80%   5918
      90%   5922
      95%   5922
      98%   5922
      99%   5922
     100%   5922 (longest request)
    root@linuxbck:/home/paolo#
    

    I discovered the problem ... I have to use https and not http

    Code (Text):
    This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/
    
    Benchmarking centos7mod3.com (be patient)...apr_pollset_poll: The timeout specified has expired (70007)
    Total of 1 requests completed
    root@linuxbck:/home/paolo#
    

    Thank you