apc.stat performance impact
The APC documentation says about the apc.stat option:
On a production server where you rarely change the code, turning stats off can produce a significant performance boost.
Did anyone ever benchmark this and cares to share the results?
Groups:
Login to post comments
I never tried it, but this
I never tried it, but this part here sends up a warning flag:
So in other words if I have a module and do a:
include(mymodule.inc.php");Then it will cause problems. This is kind of a common practice. Those includes would have to be changed to something like:
include (drupal_get_path("module","mymodule").'/mymodule.inc.php');I can see where there would be a performance boost, especially depending on the number and size of modules you run, but I would definitely give it a thorough testing before going live with it.
Drupal 7
We have not seen anything measurable from this settings so far.
Up until Drupal 6, we used:
<?phpinclude_once './includes/something.inc';
?>
However, in Drupal 7 we have this code in index.php:
<?phpdefine('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
?>
getcwd() returns the absolute path.
All the includes/requires after that use DRUPAL_ROOT
So we may see a benefit from that in Drupal 7, provided contrib modules use:
<?phpinclude (DRUPAL_ROOT . '/' . drupal_get_path("module","mymodule").'/mymodule.inc.php');
?>
Anyone has time for a benchmark?
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
intoxination got it right. I
intoxination got it right. I tested this once and got "realpath error" errors in the log file (can't remember the exact error), so had to turn it back off. There's a post by 2bit.com where he mentioned there was not a significant improvement in his tests (link?).