12,000개 파일의 라라벨을 하루 가동한 결과
* memory usage 
total memory: 256.00MB 
used memory: 32.53MB 
free memory: 221.07MB 
wasted memory: 2.39MB (0.94%) 
* opcache statistics 
number of cached files: 982 
number of hits: 4,717,114 
number of misses: 1,149 
blacklist misses: 0 
number of cached keys: 1,870 
max cached keys: 32,531 
* interned strings usage 
buffer size: 12.00MB 
used memory: 3.89MB 
free memory: 8.11MB 
number of strings: 53,502
//--------------------------------- 
* php.ini 수정 
https://wiki.mikejung.biz/PHP_OPcache 
zend_extension=php_opcache.dll 
opcache.enable=1 
opcache.enable_cli=1 
opcache.memory_consumption=128 
opcache.interned_strings_buffer=16 
opcache.max_accelerated_files=20000 
opcache.save_comments=1 
;opcache.revalidate_freq=30 
;opcache.max_wasted_percentage=10 
;opcache.validate_timestamps=0 
;opcache.fast_shutdown=0 
//----------------------------- 
* opcache 캐시 정보 지우기 
opcache_reset() 
- 커맨드 라인 명령어로는 불가능, php 파일내에서 함수 명령으로만 가능 
//----------------------------- 
- 라라벨에서 artisan 명령어로 opcache 제어하는 패키지 
https://github.com/appstract/laravel-opcache 
composer require appstract/laravel-opcache 
Clear OPcache: 
php artisan opcache:clear 
Show OPcache config: 
php artisan opcache:config 
Show OPcache status: 
php artisan opcache:status 
//--------------------------------- 
* GUI 
 amnuts/opcache-gui  
https://github.com/amnuts/opcache-gui 
composer require amnuts/opcache-gui 
//--------------------------------- 
* 한 페이지 GUI 소스 
rlerdorf/opcache-status  
https://github.com/rlerdorf/opcache-status 
//-------------------- 
https://github.com/PeeHaa/OpCacheGUI 
composer require peehaa/opcachegui 
- 라라벨과 맞지 않음 
//---------------------------------------------- 
// 참고 
* Make your Laravel App Fly with PHP OPcache 
https://medium.com/appstract/make-your-laravel-app-fly-with-php-opcache-9948db2a5f93#.bjrpj4h1c 
'Code > PHP' 카테고리의 다른 글
| [php] PHP 7.4의 새로운 기능 (0) | 2020.03.12 | 
|---|---|
| [php] PHP 7.4에서 삭제예정으로 정해진 기능(Deprecated) (0) | 2020.03.12 | 
| [php] composer 사용법 (속도 향상 방법) (0) | 2020.03.11 | 
| [php] composer 1.10으로 업그레이드 후 dump-autoload 경고 메시지 (0) | 2020.03.11 | 
| 라라벨 7 새기능 (0) | 2020.03.10 | 



