Web Server Speed :)

r.stefanov

New Member
NullByte каза:
nginx is the best option, no doubt. With php-fpm or another parser, well we can talk about it http://www.predpriemach.com/images/smilies/icon_smile.gif

If we compare suphp, dso, cgi and the old fcgi, php-fpm (fastcgi), we will see a few times more economically CPU usage and a way more easy ways for optimization. RAM is not in the business, because the servers now are running 700+, the entry level and the suphp difference is minimal. Even there is no need to deal with other stuff…

nginx, cpanel with apache plus php-fpm = pure win = safety


Personally, no one can make me think that any other solution can offer better results. I’m playing with apache/php-fom and nginx/php-gpm since a lot of time. We will talk about a shared environment. If we talk about a server without a panel, nginx + php-fpm equals to 18000 queries in a second through a VPS with a quad-core CPU and 1024 memory. The site is Wordpress based and it is my biggest record for now. People from freenode sometimes can show results of 25 000 rps. This is without Varnish, no cache additives. Only fastcgi caching from Nginx, without any extras. With the standard combo you can get no more than 300? On many of the low-level services you will even get under 50. Here’s an small example


Код:
Benchmarking predpriemach.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        LiteSpeed
Server Hostname:        predpriemach.com
Server Port:            80

Document Path:          /
Document Length:        414 bytes

Concurrency Level:      10
Time taken for tests:   28.204 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      631000 bytes
HTML transferred:       414000 bytes
[U][B][FONT=Arial Black]Requests per second:    35.46 [#/sec] (mean)[/FONT][/B][/U]
Time per request:       282.036 [ms] (mean)
Time per request:       28.204 [ms] (mean, across all concurrent requests)
Transfer rate:          21.85 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      122  139  20.1    131     259
Processing:   122  141  30.6    131     647
Waiting:      122  140  29.9    130     647
Total:        245  280  36.9    270     843

Percentage of the requests served within a certain time (ms)
  50%    270
  66%    282
  75%    291
  80%    299
  90%    322
  95%    347
  98%    380
  99%    394
 100%    843 (longest request)

There is a reason for all people to wait for the show the whm module. I hope when I’m ready with the cpanel patch to have the opportunity for a video demonstration.
 
Последно редактирано от модератор:

coolice

Owner
Checking speed / performence of my server

It is not that real as you talk about the Litespeed situation. It’s like that because we have Per Client Throttling and the golden rule is 100% safe here – it works right above the standard level of the forum. When something is tested it should be fully unlocked while we have some limitation so the work of our users is fine.

http://web.archive.org/web/20130316132915/http://www.litespeedtech.com/how-tos.html#qa_dos

http://www.litespeedtech.com/docs/webserver/config/security

I agree about da nginx cache. It is configured to work like a micro cache, which is great. Today I’ve made one like it and I’m very satisfied. (without kloxo on a ubunto server ;) )

Here are a few tests: :)

http://forum.mratwork.com/viewtopic.php?f=4&t=19486
I can say 8 queries on the apache and the other combos without caching on 616 mb VPS (I think we can see this is amazon micro cloud vps by the ram)



Код:
[B]Code:[/B]

-------------------------------------------------
No.  Web Server                 requests/second
-------------------------------------------------
 1.  Apache                               8.04
 2.  Hiawatha                             8.76
 3.  Lighttpd                             8.74
 4.  Nginx                                8.89
 5.  Nginx + microcache *)              514.75
                                      4,089.80
                                     11,213.65

 6. Hiawatha-proxy                        8.82
 7. Lighttpd-proxy                        8.65
 8. Nginx-proxy                           8.42     
 9. Nginx-proxy + microcache *)         278.59
                                      3,066.68
                                     10,992.15

10. Hiawatha + Trafficserver **)          7.84
11. Hiawatha + Varnish *)               307.93
                                      10794.71
                                      10897.40
-------------------------------------------------

Note:

1. System: (with little mod/fix)

   A. Kloxo-MR: 6.5.1.a-2013100403

   B. OS: CentOS release 6.4 (Final) x86_64

   C. Apps:
      1. MySQL: mysql-5.5.34-1.el6.x86_64
      2. PHP: php53u-5.3.27-1.ius.el6.x86_64
      3. Httpd: --uninstalled--
      4. Lighttpd: --uninstalled--
      5. Hiawatha: --uninstalled--
      6. Nginx: --uninstalled--
      7. Cache: --uninstalled--
      8. Dns: nsd-3.2.15-5.el6.x86_64
      9. Qmail: qmail-toaster-1.03-1.3.27.mr.el6.x86_64
         - with: courier-imap-toaster-4.1.2-1.3.14.mr.el6.x86_64

   D. Php-type (for Httpd/proxy): php-fpm_event

   E. Memory:
                   total       used       free     shared    buffers     cached
      Mem:           616        491        124          0         10        259
      -/+ buffers/cache:        222        394
      Swap:            0          0          0


2. All testing in local

3. Testing with step:
        yum install httpd-tools -y
        sh /script/clearcache3
        sh /script/restart-all
        ab -n 1000 -c 10 http://bugfix.potissima.com/

4. *)  testing 3 x running 'ab -n 1000 -c 10 http://bugfix.potissima.com/' 
       with idle between testing less then 10 seconds (according to caching time for 'microcache')
   **) look like still something trouble with Trafficserver where no cache effect; the same result for Squid Cache Proxy

5. Testing application: Wordpress 3.6.1 + Mesocolumn Theme
 
Последно редактирано от модератор:

Firefly

Well-Known Member
Web Server Speed

This looks so complicated. Good job to you boys for the understanding of them!
 
Последно редактирано от модератор:

r.stefanov

New Member
Web Server Performance Comparison

Mount the cache in the memory and tweak it through fstab. You will see a lot of new differences. :wink:
 
Последно редактирано от модератор:

NullByte

Active Member
Web Server Speed

http://tools.pingdom.com/fpt
Another tool to try, predpriemach is given as a second and a half, which is awesome compared to the average of 8-15 seconds of loading time of other websites.
 
Последно редактирано от модератор:

mlazarov

Active Member
Web server speed comparison

@r.stefanov, try LiteSpeed – you can download the trial from their website. Imagine the speed of nginx+php+all options of apache (.htaccess for example) in one. It works better on the tests, but the negative side is that the service is paid.

The benchmark you’ve put is not correct because:

1. "Non-2xx responses: 1000".

2. You benchmark your own internet connectivity. Benchmarking should be done on a local network if you don’t want to test your connectivity with the server. In your test we can see between 120 and 260 ms just for the connection while the average for processing of a whole website is 282.

I can’t see what you can prove with this ab test? Do the same with nginx/apache on the same forum for comparison. It is not correct to compare your test with a different installation of a different software. Also the forum has a serious background of database queries which needs a lot of time. Nothing in common! The test should be done like this:

1. Testing the same php source code on different web servers

2. It is required to show the statistics for serving a static file

It is important the test environment to be the same (hardware, software and internet connectivity)
:)
 
Последно редактирано от модератор:

r.stefanov

New Member
How To Optimize Apache Web Server Performance

@r.stefanov, try LiteSpeed – you can download the trial from their website. Imagine the speed of nginx+php+all options of apache (.htaccess for example) in one. It works better on the tests, but the negative side is that the service is paid.

The benchmark you’ve put is not correct because:

1. "Non-2xx responses: 1000".

2. You benchmark your own internet connectivity. Benchmarking should be done on a local network if you don’t want to test your connectivity with the server. In your test we can see between 120 and 260 ms just for the connection while the average for processing of a whole website is 282.

I can’t see what you can prove with this ab test? Do the same with nginx/apache on the same forum for comparison. It is not correct to compare your test with a different installation of a different software. Also the forum has a serious background of database queries which needs a lot of time. Nothing in common! The test should be done like this:

1. Testing the same php source code on different web servers

2. It is required to show the statistics for serving a static file

It is important the test environment to be the same (hardware, software and internet connectivity)
:)

The non 2xx response is a bug in ab. There is enough information for in the web. My connection is more than fast and this is not a factor for me in that case. If I run it through a server in Canada the result will be the same.

htaccess is an unnecessary function. Litespeed is also none in my likes, I’ve done some tests with it and it is paid. It works fast, but I’ve achieved way bigger results without it.

This test should be taken as a must. It is basic test that doesn’t prove more that how bloated are some servers (when we talk about simple competitive queries). If coolice lets me, I will run a paid test by two benchmark apps which will simulate 10000+ visitors with a given behavior (login/logout, post, get, different ip’s and so on), but this is not necessary.

P.S. - In the pas we’ve tried something on the forum with coolice and the cpu was falling way too much with a single siege test. This means there is something which doesn’t work like it should. I can’t run a website behind nginx even in a local network when I have 1G connection without putting flood zone.
 
Последно редактирано от модератор:

mlazarov

Active Member
Web Server Speed

Your connection is not fast, because you have 120-260ms from you to the server. I am not talking about the speed in mb/s, I’m talking about latency.

If you deduct this time you will get a 40-110 ms in the place of 160-350. You will achieve 4 times more if you do this on your local server.
 
Последно редактирано от модератор:

Unwise

Well-Known Member
Tools of the trade for performance and load testing - Web Servers

I’ve never made benchmark tests for the performance but I like the apache compiled with itk. This way the apache works like any other apache, without any complicated proxy maneuvers. Also every vhost can get an individual user. I combine it with mod_cband (limit of the number of parallel connections) and iptables (defends from the dirty flood).
 
Последно редактирано от модератор:

Горе