Topic: Cannot enable Opcache huge_pages on PHP 7.0.1

Reloading php-fpm: [17-Dec-2015 05:02:39] NOTICE: PHP message: PHP Warning:  Zend OPcache huge_code_pages: mmap(HUGETLB) failed: Cannot allocate memory (12) in Unknown on line 0


PHP 7.0.1 (cli) (built: Dec 16 2015 15:31:55) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies


OS : CentOS release 6.7 (Final)

Thanks for the help remi

Re: Cannot enable Opcache huge_pages on PHP 7.0.1

Just set "opcache.huge_code_pages=0" in 10-opcache.ini (which is the default value in the provided configuration)

This seems to not be supported on EL-6, probably because old kernel/glibc.
Works as expected on Fedora and EL-7

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_pages on PHP 7.0.1

In next build, the related option will be removed from default configuration to avoid confusion.

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_pages on PHP 7.0.1

I did disabled it remi

I also did a yum upgrade and here is my kernel

2.6.32-573.8.1.el6.x86_64

Can you confirm that this is the latest kernel , if not then i would have to reboot the server just to confirm ?

How much of a performance boost is huge pages ?

Re: Cannot enable Opcache huge_pages on PHP 7.0.1

> Can you confirm that this is the latest kernel , if not then i would have to reboot the server just to confirm ?

kernel-2.6.32-573.12.1.el6.x86_64 is the latest, but update won't solve this.

> How much of a performance boost is huge pages ?

A few % (small gain), but haven't run benchmark myself.

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_pages on PHP 7.0.1

Then i guess huge pages isn't for me .I am not going to change OS just for small gains

Hopefully future kernel updates would allow huge pages ...