php / php/php-src

The WordPress code base has outgrown the defaults for opcache.memory_consumption and opcache.interned_strings_buffer

Open
#21,423 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The WordPress code base has been growing, and it's now too big for the OPcache default sizes.

In php8.3 (on Ubuntu at any rate), the defaults, as you know, are (in MiB):

opcache.memory_consumption=128 
opcache.interned_strings_buffer=8

WordPress 6.9.4 and 7.0beta4 both run these caches completely full for relatively simple sites. That means a typical WordPress site isn't getting all the benefit of caching, which hammers performance and frustrates server operators and site owners.

I respectfully suggest you double the memory_consumption default in future releases. And triple the interned_strings_buffer default. If you can do it, this change will, as it spreads out, save lots of server power and it will reduce carbon emissions.

(I'm working on a Site Health Check feature for WordPress to inform site owners about this issue. It's harder to communicate with server operators.)

https://github.com/rlerdorf/opcache-status shows the problem clearly on any site.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the OPcache configuration defaults for opcache.memory_consumption and opcache.interned_strings_buffer in the PHP source; the issue does not identify a file or test. Review the reported PHP 8.3 values and use the linked opcache-status tool to reproduce cache usage. Done means the proposed defaults are evaluated and covered by the relevant configuration tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.