Re: Re: com php-src: Added an experemental ability to move PHP code pages (PHP TEXT segment) into HUGE pages. PHP should be configured and built with
--enable-huge-code-pages, OS should be configured to provide huge pages. It's possibl

From: Date: Tue, 15 Sep 2015 09:49:55 +0000
Subject: Re: Re: com php-src: Added an experemental ability to move PHP code pages (PHP TEXT segment) into HUGE pages. PHP should be configured and built with
--enable-huge-code-pages, OS should be configured to provide huge pages. It's possibl
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-88210@lists.php.net to get a copy of this message
On Tue, Sep 15, 2015 at 11:24 AM, Rasmus Lerdorf <rasmus@lerdorf.com> wrote: > On 09/14/2015 11:58 PM, Dmitry Stogov wrote: > > On Tue, Sep 15, 2015 at 4:31 AM, Rasmus Lerdorf <rasmus@lerdorf.com > > <mailto:rasmus@lerdorf.com>> wrote: > > Redhat enables THP by default and has for a while, but I know lots of > > admins that disable this feature right away on production machines. I > > don't think it is default on Ubuntu, but at least they have hugepage > > tools to make it easy to configure. And from a quick look at Debnian > > (jessie) it wasn't obvious how to get hugepages working. I don't see > a > > package for hugeadm offhand. The kernel supports it, obviously, but > you > > need to take some steps to configure them. > > > > > > PHP prefers using regular Huge Pages and may fail back to THP > > (Transparent Huge Pages). > > So THP don't have to be enabled. > > > > > > > > Which means we also need to spend a bit of time documenting how to > > enable hugepages at the OS level for the various operating systems > to go > > along with this feature. > > > > > > Right. Manual OS configuration is required. See > > https://wiki.debian.org/Hugepages#Enabling_HugeTlbPage > > Steps (3) and (4) are optional. > > Yup. I did get it working here. Perhaps it would be a good idea to add a > row to the phpinfo() OpCache section indicating whether huge pages are > currently being used. It would make it easier to debug. I know you can > check /proc/meminfo directly, but it isn't obvious what exactly is using > the hugepages from that. > It's possible to get detailed information form /proc/<pid>/smaps Actually, PHP may use huge pages for Zend MM, opcache SHM and now for a part of PHP code segment. Thanks. Dmitry. > > -Rasmus > >

« previous php.internals (#88210) next »