Performance Tuning
This is a page about mod_perl tuning, just ignore the perl stuff and look at the apache tweaks in there. They did help me to get our tw.o stable again. 😊
Homepage of mod_limitipconn
Additional apache tuning for sites with much traffic (german)
MinSpareServers 6 MaxSpareServers 8 StartServers 10 # 10 clients should be enough, but for peaks 50 might be good. # depends on your memory, 50 works for 2GB memory MaxClients 50 # dont set this to a value too low: MaxRequestsPerChild 1500
Try to move load from the server, tell clients to cache data:
<IfModule mod_expires.c> <IfModule mod_headers.c> ExpiresActive On ExpiresByType text/html "access plus 1 month" ExpiresByType text/css "access plus 6 month" ExpiresByType text/javascript "access plus 6 month" ExpiresByType image/gif "access plus 6 month" ExpiresByType image/jpeg "access plus 6 month" ExpiresByType image/png "access plus 6 month" <Files ~ "\.(js|css|gif|jpe?g|png)$"> Header append Cache-Control "public" </Files> </IfModule> </IfModule>
Limit connections from one ip to a given number:
<IfModule mod_limitipconn.c> Customlog /var/log/nameofvirtualhost-access-denied.log combined env=LIMITIP <Location /> MaxConnPerIP 10 NoIPLimit img/* </Location> </IfModule>
Homepage: http://www.eaccelerator.net/
Description: A PHP Accelerator & Encoder.
License: GPL-2
eAccelerator is a further development from mmcache PHP Accelerator & Encoder. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated.
License: PHP License, version 2.02
Homepage: http://pecl.php.net/package/APC
A version is available for PHP5
http://www.php-accelerator.co.uk
Benchmark says that smarty gets a real advantage :
http://www.phpinsider.com/benchmarks
BUT that is not really a free software, it's distributed in binary and there is no source. There are some other solutions I have to try out.
2003-06-30 : something strange happened with phpa, it was not working anymore, I had to disable it and re-enable it. I'm inquiring.
Finally : I disabled PHPA because it puts random white pages.
I have gotten quite some memory errors when using PHPA, seems smarty does not like it, and stops with a memory overflow
BTW, apc also doesn't work, same error.
http://turck-mmcache.sourceforge.net
It's a FREE open source PHP accelerator, optimizer, encoder and dynamic content cache for PHP and even faster than commercial Zend Zend Performance Suite.
Remember to follow the installation steps one by one:http://turck-mmcache.sourceforge.net/#install
Do remember to create a temp dir for it, otherwise it will produce blank pages. OK, that's all. I'm sure you will be impressed about the increase in speed. It's nearly 5 times faster!
Environment:
Athlon XP 2100+, 512 MB DDR, Apache 1.3.X, PHP 4.3.0
1st try:
used a shellscript, that does 10 wget runs at a time with wget -r -l 2. All features in tiki are switched on, anonymous group got basic privileges.
Results:
settings | Time taken | max. load |
bare | 7:17 | 11.5 |
Zend accelerator default | 2:23 | 11.6 |
Zend accelerator 128MB | 2:36 | 11.8 |
turck mmcache default | 2:21 | 11.4 |
turck mmcache 128MB | 2:15 | 11.5 |
2nd try:
Used siege. I took the same URLs that wget crawled. 150 concurrent users:
Zend:
Transactions: 16262 hits
Availability: 100.00 %
Elapsed time: 420.17 secs
Data transferred: 59162949 bytes
Response time: 3.44 secs
Transaction rate: 38.70 trans/sec
Throughput: 140807.17 bytes/sec
Concurrency: 133.01
Successful transactions: 16262
Failed transactions: 0
load got up to 110
mmcache:
Transactions: 19360 hits
Availability: 100.00 %
Elapsed time: 423.15 secs
Data transferred: 61369649 bytes
Response time: 2.87 secs
Transaction rate: 45.75 trans/sec
Throughput: 145030.49 bytes/sec
Concurrency: 131.49
Successful transactions: 19360
Failed transactions: 0
load got up to 95.
So mmcache seems to be slightly faster. Be extremly careful while testing. siege crashed my server two times 😎
1) |
15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
2) |
19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
3) |
Tiki birthday |
4) |
17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
5) |
21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
6) |
19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting |