Installing XCache, accelerating ******************* for PHP
Unzip-o Phpmyadmin-4.0.5-all-languages.zip
MV PHPMYADMIN-4.0.5-ALL-LANGUAGES/USR/LOCAL/APACHE/HTDOCS/PMA
1, Pressure test:
Ulimit-n 3000
Ab-c 100-n http://10.10.37.138/pma/index.php 10 concurrent, 2000 requests
[Email protected] local]# Ulimit-n 3000
[Email protected] local]# ab-c 100-n http://10.10.37.138/pma/index.php
This is apachebench, Version 2.3 < $Revision: 1554214 $>
Copyright 1996 Adam Twiss, Zeus technology LTD, http://www.zeustech.net/
Licensed to the Apache software Foundation, http://www.apache.org/
Benchmarking 10.10.37.138 (Be patient)
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Completed 1400 requests
Completed requests
Completed 1800 requests
Completed requests
Finished requests
Server software:apache/2.4.9 software version
Server address of the hostname:10.10.37.138 request
Server port:80 servers port
Document Path:/pma/index.php
Document length:7794 sizeof bytes URL
Concurrency level:100 Concurrent Request
Time taken for tests:103.874 seconds The duration of the entire test
Complete requests:2000 Altogether 2000 of the requests
Failed requests:0
Total transferred:17925162 bytes contains headers and data
HTML transferred:15588000 bytes data transferred in total
Requests per second:19.25 [#/sec] (mean) number of requests completed per second
Time per request:5193.681 [MS] (mean) each batch (100) requests required
Time per request:51.937 [MS] (mean, across all concurrent requests) every request consumed
Transfer rate:168.52 [kbytes/sec] received transfer rate
Connection times (ms) Connection time
Min MEAN[+/-SD] Median max
connect:0 58.9 0 497 Connection established
processing:2445 5139 1298.0 4850 17286 Request Processing
waiting:2445 5111 1303.1 4820 17285 waits for data to be loaded from disk and corresponding
total:2445 5150 1301.4 4858 17286
Percentage of the requests served within a certain time (MS)
50% 4858
66% 5165
75% 5410
80% 5590
90% 6274
95% 7209
98% 9036
99% 11075
100% 17286 (Longest request)
Sync
2, download xcache-3.1.2.tar.bz2 Baidu Search can
Unpack and compile the installation
[Email protected] php]# man-m man/phpize
/usr/local/php/bin/phpize compiling a third-party extension is all that is required to execute
./configure--enable-xcache--with-php-config=/usr/local/php/bin/php-config
Make && make install
After installation, the following information appears:
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-zts-20100525/
3, Configuration:
[Email protected] xcache-3.1.2]# MKDIR/ETC/PHP.D
[email protected] xcache-3.1.2]# CP xcache.ini/etc/php.d/
[Email protected] xcache-3.1.2]# Vi/etc/php.d/xcache.ini
Extension =/usr/local/php/lib/php/extensions/no-debug-zts-20100525/
4, then do the stress test:
http://10.10.37.138/pma/index.php Refresh several times to build the cache
Perform the test again
Ab-c 100-n http://10.10.37.138/pma/index.php
Requests per second:80.13 [#/sec] (mean)
Time per request:1248.033 [MS] (mean)
Time per request:12.480 [MS] (mean, across all concurrent requests)
Speed before installing the XCache
Requests per second:19.25 [#/sec] (mean)
Time per request:5193.681 [MS] (mean)
Time per request:51.937 [MS] (mean, across all concurrent requests)
Up to three times times faster than the speed.
Requests per second:21.97 [#/sec] (mean)
Time per request:4552.375 [MS] (mean)
Time per request:45.524 [MS] (mean, across all concurrent requests)
For read-more, less-written server types
This article is from the "Linux" blog, so be sure to keep this source http://loveall.blog.51cto.com/8658573/1877884
Compile and install lamp-4 (install XCache for PHP acceleration)