Jump to content

PHP 7 caching


Recommended Posts

I've asked my hosts time and time again as well as showing them that article above but get told

Quote

The PHP functions need to be supported by cPanel to not be lost on the upgrades and work with cPanels EasyApache, this also helps ensure the stability of your server. These guides are if you have a stand alone Apache install.

 

Link to comment
Share on other sites

  • 2 weeks later...

I am currently running php 7.0.12 with Redis and ofcourse opcache
 

Your best bet is to change hosts or host it yourself if you want it all to work nicely on php7 

The problem with hosts running WHM/CPanel is that updates to PHP 7 are really slow since not all is stable yet, therefore they have to wait till WHM/easyapache decides to release it.

Link to comment
Share on other sites

On 30/10/2016 at 4:14 PM, SteffM said:

I am currently running php 7.0.12 with Redis and ofcourse opcache
 

Your best bet is to change hosts or host it yourself if you want it all to work nicely on php7 

The problem with hosts running WHM/CPanel is that updates to PHP 7 are really slow since not all is stable yet, therefore they have to wait till WHM/easyapache decides to release it.

What php handler do you use with redis and opcache? I ran into problems with opcache and fastcgi, my hosts have suggested dso but have no experience of it.

also with Redis should I use file system or MySQL database?

Link to comment
Share on other sites

I am currently running CentOS 7 with apache and installed the php70u packages:

PHP 7.0.12 (cli) (built: Oct 14 2016 09:23:01) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.12, Copyright (c) 1999-2016, by Zend Technologies

It doens't matter if you use MySQL or File System, they both do their job well enough, but the fastest would be MySQL.
 

Link to comment
Share on other sites

This doens't look weird to me.

You have 58 cache misses and 58 cached scripts, that's how caching works, the first script will always be a miss, the requests afterwards will be serving the cached version.

Either your website doesn't get any traffic or you restarted your webserver.
If you want to see your hits increasing you need more requests and don't be restarting your webserver/changing files.

if you hit F5 a couple of times on your IPB, your cache hits should increase

Link to comment
Share on other sites

No, cache hits never changed from 2. I had opcache online for a few hours before disabling opcache and looking for advice. My site gets quite alot of hits in that time. My host said:

 

B) As you are running CGI as your PHP handler opcache gets emptied on every request as each of them starts there own cache. The other PHP handler that can be used is "dso".

Link to comment
Share on other sites

Are you running your own server (vps/dedi) or is this a shared hosting?

I know back in 2015 there was several discussions with issues with PHP opcache and shared hosting - it was sharing the cache across the various clients and caused issues.

I didn't keep up with it closely as I prefer a high performance setup than a cPanel/WHM setup.

 

Link to comment
Share on other sites

1 hour ago, marklcfc said:

PHP handler opcache gets emptied on every request as each of them starts there own cache

That's quite interesting.


I've never been a fan of shared hosting(except for low-traffic word-press websites), due to the fact you can't customize anything and the shared hosting company has a lot of restrictions.

DSO is the old name of apache's mod_php

I am running mod_php myself, but it's not in a shared hosting environment.
It completely depends on what your shared hosting companies allows you to change in your Apache/PHP configuration
If they say you can switch to mod_php, you can try doing that in your shared web hosting configuration panel right?

 

This are my opcache statistics:

98b98af89e164597b41c26bbd44292bd.png

Link to comment
Share on other sites

I'm on a dedicated server, I didn't change over to dso because as far as I was aware fastcgi was better for forums. Someone told me this:

 

Quote

php-fpm aka FastCGI and opcache work find together.

Using DSO causes memory scaling problems as the number of php instances scales with load rather than being fixed. Better to serve a known fixed number of php pages at a time, rather than attempt to serve upto thousands with no warning or scalability.

CGI means every page, the webserver forks to run a php instance from scratch. It is slow.

suPHP is sudo followed by CGI. It is even slower than CGI.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...