Skip to content

Conversation

@garak
Copy link
Contributor

@garak garak commented Nov 29, 2025

According to Paul Dragoonis' talk delivered at the SymfonyCon yesterday, using a non-prime number forces PHP to calculate the next one, adding a small overhead.
References:

I'm not sure if we want to also add a note in Symfony doc to explain the reason

@carsonbot carsonbot added this to the 6.4 milestone Nov 29, 2025
@carsonbot carsonbot changed the title improve value for opcache.max_accelerated_files improve value for opcache.max_accelerated_files Nov 29, 2025
@javiereguiluz
Copy link
Member

This is true ... but reading https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.max-accelerated-files seems that not all primes are valid. It must be one of this specific set:

{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }

@OskarStark OskarStark changed the title improve value for opcache.max_accelerated_files improve value for opcache.max_accelerated_files Nov 29, 2025
@garak garak force-pushed the fix-max-acc-files branch from 006d43c to 5ceff6d Compare November 29, 2025 10:59
@Spomky
Copy link
Contributor

Spomky commented Nov 29, 2025

This is true ... but reading https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.max-accelerated-files seems that not all primes are valid. It must be one of this specific set:

{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }

Correct, except 1048793 that is greater than 1,000,000 and The maximum value is 1000000 (I don't know why 1048793 is listed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants