1 (edited by Benjamin 2017-05-05 15:39:35)

Topic: Cannot enable Opcache huge_code_pages on PHP 7.1.4

Hello,

I'm having the same problem as the OP of this thread:
https://forum.remirepo.net/viewtopic.php?pid=8407

The error is:

PHP Warning: Zend OPcache huge_code_pages: madvise(HUGEPAGE) failed: Invalid argument

However, I'm using CentOS 7.3, unlike the OP who was using 6.7, so this problem should not occur.
I know I can disable huge_code_pages, but would like to keep it enabled if possible.

Any idea why this is occurring? I installed a fresh CentOS 7.3 from an OVH template, running their own kernel (4.4.30-mod-std-ipv6-64).
Could this be the reason why? I have an older server with them, same configuration but older kernel (3.10.23-xxxx-std-ipv6-64, not sure whether it's an OVH kernel or a vanilla one), and it works fine there.

Thanks in advance for any help.

Re: Cannot enable Opcache huge_code_pages on PHP 7.1.4

> I know I can disable huge_code_pages, but would like to keep it enabled if possible.

See opcache.ini

; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
; This should improve performance, but requires appropriate OS configuration.
opcache.huge_code_pages=1

> Any idea why this is occurring? I installed a fresh CentOS 7.3 from an OVH template, running their own kernel (4.4.30-mod-std-ipv6-64).
> Could this be the reason why? I have an older server with them, same configuration but older kernel (3.10.23-xxxx-std-ipv6-64,
> not sure whether it's an OVH kernel or a vanilla one), and it works fine there.

So definitively, looks like an issue with OVH kernel (4.4) as standard centos kernel (3.10) works.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Cannot enable Opcache huge_code_pages on PHP 7.1.4

Thank you, Remi.
I'm not sure what the OVH kernel offers on top of the standard one, but I guess I'll keep it as it is and just disable huge pages then.

Cheers,
Benjamin