just trying to give some back to the community here:
i've been playing with settings for a while now, in attempt to optimize a site. i noticed that SMF in 2.0.x (mine is 15) doesn't recognize the zend accelerator's (somewhat) new name (OPCache)... but that's okay- you don't require SMF to handle it- you can set it up outside and let it handle the entire webspace you manage...
after testing this thing for a good bit, these are the settings and the actual entry to make... MOST php builds above 5.4 come with OPCache as part of it.. unless you went out of your way (or your server managers did) to keep from loading OPcache, it's on there...
in your php.ini or your .user.ini (depending on how you're set up) copy and paste this snippet:
zend_extension=opcache.so
opcache.memory_consumption=264
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
opcache.use_cwd=1
opcache.load_comments=1
opcache.save_comments=1
opcache.revalidate_path=1
opcache.validate_timestamps=1
this is a safe place to start with OPCache... check out the php documentation for each line if you have any concerns. you should notice a nice bump in your load speed after the caches start populating. use this with memcached for another nice bump, (IF memcached is available) and by adding this snippet (also to php.ini or .user.ini depending on how your server is set up) :
extension=memcached.so
session.save_handler="memcached"
session.save_path="127.0.0.1:11211"
this passes sessions AWAY from the flat file on your server and passes it to the memcached server, and hands it off to the user to store on their machines- making retrieving the cache faster and cleaner, and for reducing the weight of your page.
you're system will be happy with your work.. however, there is yet more to do... you should set up expires for your cache globally...
exit the php.ini or .user.ini and navigate to your .htaccess.
this config works nicely:
# One year for image files
<filesMatch ".(jpg|jpeg|png|gif|ico)$">
Header set Cache-Control "max-age=31536000, public"
</filesMatch>
# One month for css and js
<filesMatch ".(css|js)$">
Header set Cache-Control "max-age=2628000, public"
</filesMatch>
what you've just done ^ is pretty evident with the notes provided, but in other terms you just told users to cache images for a year, and css and javascript for a month. this takes a huge chunk out of what they have to download each time they arrive at your site.. using the settings in OPCache 'revalidate freq' and 'validate timestamp' set reasonably, your users will collect and store items that don't often change while not hording files that do change often enough.
there is yet another two items that work well with this... one is the http2 protocol and the other is using the 'push' it provides. if there is any interest in this i can come back and include it here from a post i made earlier. all of these, together, make for a pretty swift conversation- like old friends talking as opposed to meeting someone for the first time and having to negotiate all the formalities.
all of these functions work well with SMF- with the caveat "You're mostly done with implementation and development", as IF you interject this as presented, your users will possibly have to dump their cache's in order to see any added functionality (just as performed by .js) or style (such as changes you've made to .css files) - and, if you recycled the names of images for the same location with a new image, users (or you) may not see it until the cache is cleared. so... if you're in 'sitting back and relaxing, just tweaking here and there and maintaining mostly' mode, these changes will be awesome.
thanks y'all!!!!