php opcache

If you're not using any other opcode caching mechanism then enabling opcache will definitely improve things.

You need to enable opcache separately. First you need to install it. If you're using binary packages install phpXY-opcache where XY is PHP version (56, 71). Then you'll need to specify additional parameters in your php.ini files like:

Code:
opcache.memory_consumption=32M
opcache.validate_timestamps=0

and there are many more. You can verify those settings by simply creating php info file with:

Code:
<?php
phpinfo();
?>

and calling it from your browser.
 
I'm using PHP v5.65....Does that mean I don't need to think about OPCache?

My experience is with Debian and CentOS servers running Apache + PHP, so if masteroman has personal experience with OPCache on *BSDs, I'd go with his instructions.

On Linux, servers running PHPv5.5+ don't need to install new packages, they just need to enable the module. I assumed that's the case with *BSD as well.

Search for your .../mods-available/ directory and see if it's already there. Or run php -i | grep -i cache to see if it's listed as 'disabled.'
 
Back
Top