Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit PHP’s realpath-cache-size, and realpath-cache-ttl for Drupal #134

Open
mstenta opened this issue Oct 15, 2018 · 3 comments
Open

Edit PHP’s realpath-cache-size, and realpath-cache-ttl for Drupal #134

mstenta opened this issue Oct 15, 2018 · 3 comments
Labels
Request Request for image modification or feature

Comments

@mstenta
Copy link

mstenta commented Oct 15, 2018

Drupal.org's official documentation recommends overriding PHP's default realpath-cache-size and realpath-cache-ttl to "noticeably decrease Drupal's initial page generation times."

https://www.drupal.org/docs/7/managing-site-performance/tuning-phpini-for-drupal

I am currently adding the following lines to my Dockerfile that inherits from drupal:7 to accomplish this:

# Set recommended realpath_cache settings.
# See https://www.drupal.org/docs/7/managing-site-performance/tuning-phpini-for-drupal
RUN { \
    echo 'realpath_cache_size=4096K'; \
    echo 'realpath_cache_ttl=3600'; \
  } > /usr/local/etc/php/conf.d/realpath_cache-recommended.ini

Would it be worth including these in the official Docker Hub images? If so, I would be happy to provide a pull request.

@wglambert wglambert added the Request Request for image modification or feature label Oct 15, 2018
@tianon
Copy link
Member

tianon commented Oct 25, 2018

This does seem reasonably sane to include by default since it's a recommendation directly from Drupal upstream, although I can't seem to find that same content in the Drupal 8 documentation -- any idea where it might have moved to or why it might have been removed?

@mstenta
Copy link
Author

mstenta commented Oct 26, 2018

Good question @tianon - My guess is that the Drupal 8 documentation simply hasn't caught up to include everything that is in the Drupal 7 docs. That said, I think this suggestion is just as relevant (if not more) to Drupal 8.

Notably, the Symfony documentation has the same recommendation (Drupal 8 is built on Symfony), with an even higher realpath_cache_size suggestion: https://symfony.com/doc/current/performance.html

@mstenta
Copy link
Author

mstenta commented Apr 19, 2020

Updated my description above to use Symfony's recommended 4096K value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

3 participants