下記の環境でOPcacheを導入してみました。
しかし、ほぼ効果がないように感じています。
そういうものでしょうか?
それとも、何か設定が悪いのか、ご教示いただければと思います。
OS:Amazon Linux AMI release 2017.09 PHP:PHP 7.1.25 フレームワーク:CakePHP 3.5.5 OPcache:php71-opcache.x86_64.7.1.28-1.38.amzn1
OPcache設定 /etc/php.d/10-opcache.ini opcache.enable=1 opcache.enable_cli=1
OPcache実施前 ※Document Pathはセキュリティ上の理由からクリアしてます
# ab -n 200 -c 20 http://localhost/xxxxxxxx This is ApacheBench, Version 2.3 <$Revision: 1796539 $> 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) Completed 100 requests Completed 200 requests Finished 200 requests Server Software: Apache/2.4.27 Server Hostname: localhost Server Port: 80 Document Path: / Document Length: 0 bytes Concurrency Level: 20 Time taken for tests: 58.840 seconds Complete requests: 200 Failed requests: 0 Non-2xx responses: 200 Total transferred: 97200 bytes HTML transferred: 0 bytes Requests per second: 3.40 [#/sec] (mean) Time per request: 5884.049 [ms] (mean) Time per request: 294.202 [ms] (mean, across all concurrent requests) Transfer rate: 1.61 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 3 11.1 0 48 Processing: 5103 5612 655.0 5440 9029 Waiting: 101 605 654.4 439 4024 Total: 5103 5615 663.5 5440 9077 Percentage of the requests served within a certain time (ms) 50% 5440 66% 5796 75% 5949 80% 6028 90% 6250 95% 6612 98% 8392 99% 8436 100% 9077 (longest request)
OPcache実施後 ※Document Pathはセキュリティ上の理由からクリアしてます
# ab -n 200 -c 20 http://localhost/xxxxxxxx This is ApacheBench, Version 2.3 <$Revision: 1796539 $> 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) Completed 100 requests Completed 200 requests Finished 200 requests Server Software: Apache/2.4.27 Server Hostname: localhost Server Port: 80 Document Path: / Document Length: 0 bytes Concurrency Level: 20 Time taken for tests: 54.347 seconds Complete requests: 200 Failed requests: 0 Non-2xx responses: 200 Total transferred: 97200 bytes HTML transferred: 0 bytes Requests per second: 3.68 [#/sec] (mean) Time per request: 5434.728 [ms] (mean) Time per request: 271.736 [ms] (mean, across all concurrent requests) Transfer rate: 1.75 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 3 10.4 0 42 Processing: 5027 5193 621.9 5036 8832 Waiting: 26 188 621.9 31 3830 Total: 5027 5196 630.6 5036 8874 Percentage of the requests served within a certain time (ms) 50% 5036 66% 5040 75% 5051 80% 5072 90% 5200 95% 5774 98% 7914 99% 8862 100% 8874 (longest request)
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。