opcache 설치 설정

운영자 | 기사입력 2015/11/26 [05:14]
PHP >
필자의 다른기사 보기 인쇄하기 메일로 보내기 글자 크게 글자 작게
opcache 설치 설정
 
운영자   기사입력  2015/11/26 [05:14]

http://pecl.php.net/get/zendopcache-7.0.5.tgz
===================================================
wget http://pecl.php.net/get/zendopcache-7.0.5.tgz
=================================================
압출풀기

tar xvfz zendopcache-7.0.5.tgz
===========================================
소스 디렉토리로 이동

cd zendopcache-7.0.5

==================================================

che-7.0.5]# /home/php/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
================================================

[root@aqa zendopcache-7.0.5]# ./configure --with-php-config=/home/php/bin/php-config

=========================================================================================================

make

================================================================================================
make install
Installing shared extensions: /home/php/lib/php/extensions/no-debug-zts-20060613/

=======================================================================================================

ls -al /home/php/lib/php/extensions/no-debug-zts-20060613/
total 456
drwxr-xr-x. 2 root root 4096 Nov 26 13:34 .
drwxr-xr-x. 3 root root 4096 Nov 26 13:34 ..
-rwxr-xr-x. 1 root root 454721 Nov 26 13:34 opcache.so

===========================================================================

php.ini 추가

 


zend_extension="/home/php/lib/php/extensions/no-debug-zts-20060613/opcache.so"
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1

 

 


=======================================================================

/home/apache2/bin/ab -n 100 -c 100 http://localhost:80/
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done


Server Software: Apache/2.4.10
Server Hostname: localhost
Server Port: 80

Document Path: /
Document Length: 48074 bytes

Concurrency Level: 100
Time taken for tests: 0.177 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 4824100 bytes
HTML transferred: 4807400 bytes
Requests per second: 565.90 [#/sec] (mean)
Time per request: 176.709 [ms] (mean)
Time per request: 1.767 [ms] (mean, across all concurrent requests)
Transfer rate: 26659.85 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 4 87 48.9 88 148
Processing: 24 85 48.3 86 168
Waiting: 4 66 45.8 63 148
Total: 170 172 0.7 172 173

Percentage of the requests served within a certain time (ms)
50% 172
66% 172
75% 172
80% 172
90% 173
95% 173
98% 173
99% 173
100% 173 (longest request)

===================================================================
/home/apache2/bin/ab -n 100 -c 100 http://localhost:80/
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done


Server Software: Apache/2.4.10
Server Hostname: localhost
Server Port: 80

Document Path: /
Document Length: 48100 bytes

Concurrency Level: 100
Time taken for tests: 0.117 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 4826700 bytes
HTML transferred: 4810000 bytes
Requests per second: 853.11 [#/sec] (mean)
Time per request: 117.218 [ms] (mean)
Time per request: 1.172 [ms] (mean, across all concurrent requests)
Transfer rate: 40212.03 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 4 51 30.2 51 105
Processing: 8 62 30.5 63 110
Waiting: 2 56 31.0 57 104
Total: 113 114 0.3 114 114

Percentage of the requests served within a certain time (ms)
50% 114
66% 114
75% 114
80% 114
90% 114
95% 114
98% 114
99% 114
100% 114 (longest request)


======================================================================

트위터 트위터 페이스북 페이스북 카카오톡 카카오톡
기사입력: 2015/11/26 [05:14]  최종편집: ⓒ iwav
 
 
PHP 많이 본 기사