Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88205 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6992 invoked from network); 15 Sep 2015 06:58:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2015 06:58:55 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.213.54 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.213.54 mail-vk0-f54.google.com Received: from [209.85.213.54] ([209.85.213.54:36092] helo=mail-vk0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/71-28087-9A1C7F55 for ; Tue, 15 Sep 2015 02:58:50 -0400 Received: by vkfp126 with SMTP id p126so73292280vkf.3 for ; Mon, 14 Sep 2015 23:58:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5O3oEqh32+FiAH8A5ExXNjCoD/Y84CLmVur2JXLyuiA=; b=S8lo5gcxAHyT2mWHZZ5RZtA/QGrEdZrDisxUnarIuRy2C1o4rYjTF7zXga+uvEphzk rz0sL3CB9DZShaj25yIKCijAAEyB6GZsN30hwPOO2Cq5Tds/kmcwECJb7DAho+afH2DW +IzS8K9A7EYl6ZO24jCwfxMzmTqjvyChzgCCXCxTLiAA03P2Qw6kEPXsdoKSomAxHCjz NeaEKJ5fhYn6O/vCpDHgoJAQYOVrg9zbvlOWjfW7Kcxq5YKVCbNOAPQt9IYIRznbP8l1 SZJoIRYqD4wPXEExMNJAER/3tNF6YKVe4Gc41yh46schXGlhpKfdJzG+7nE6ca2p/NmN EoPw== X-Gm-Message-State: ALoCoQnq7XqrM6sndrnTrR/hg/qlrY/Cul3WhynmycVskQbOQdKEeLZgkI1Ty06CIVXA3yooKlAQyRt555mSv+0+Btsl7bwYr9h6nRzsyRvRwXFBTNh7iDhI1EbLXP/j+3DHZINcZPnSAt1o3feg3uGD7RA76C2nsfa+YOCucbqhXTCe/eqpnoM= MIME-Version: 1.0 X-Received: by 10.31.16.38 with SMTP id g38mr17568536vki.83.1442300327094; Mon, 14 Sep 2015 23:58:47 -0700 (PDT) Received: by 10.103.29.195 with HTTP; Mon, 14 Sep 2015 23:58:47 -0700 (PDT) In-Reply-To: <55F774F1.3040502@lerdorf.com> References: <031201d0ef28$abcec710$036c5530$@belski.net> <035401d0ef32$440361e0$cc0a25a0$@belski.net> <55F774F1.3040502@lerdorf.com> Date: Tue, 15 Sep 2015 09:58:47 +0300 Message-ID: To: Rasmus Lerdorf Cc: Anatol Belski , Anatol Belski , Kalle Sommer Nielsen , Xinchen Hui , Nikita Popov , Zeev Suraski , Andi Gutmans , PHP Internals Content-Type: multipart/alternative; boundary=001a11431e76a80a3c051fc3b6ba Subject: Re: [PHP-DEV] Re: [PHP-CVS] 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: dmitry@zend.com (Dmitry Stogov) --001a11431e76a80a3c051fc3b6ba Content-Type: text/plain; charset=UTF-8 On Tue, Sep 15, 2015 at 4:31 AM, Rasmus Lerdorf wrote: > On 09/14/2015 02:13 PM, Anatol Belski wrote: > > > > > >> -----Original Message----- > >> From: Dmitry Stogov [mailto:dmitry@zend.com] > >> Sent: Monday, September 14, 2015 10:37 PM > >> To: Anatol Belski > >> Cc: Anatol Belski ; Kalle Sommer Nielsen ; > >> Rasmus Lerdorf ; Xinchen Hui ; > >> Nikita Popov ; Zeev Suraski ; Andi > >> Gutmans ; PHP Internals > >> Subject: Re: [PHP-DEV] Re: [PHP-CVS] 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 > >> > >>> > >>> With the new huge memory pages feature I'd suggest a bit softer - > >>> enabling its building, but setting opcache.enable_huge_code_pages=0 by > >> default. > >> > >> > >> OK. > >> > >> > >>> Then it can be easy enable and give one more intermediate step for pre > >>> testing and go into RC4 completely if ok. > >> > >> > >> In general we may get build problems on some platforms... > >> > >> > >>> What do you think? > >>> > >> > >> I didn't get, do you like to delay this for RC4? or enable it at > compile time and > >> disable at run-time by default for RC3? > >> I agree with both. > >> > > I was suggesting the latter - build and disable at run-time. With RC4 I > meant - as it's run-time enabled by default currently, that could be turned > on by default in RC4 if everything was well in RC3. > > > > Regarding possible build issues you mention - probably some magic in > config.m4 could disable huge pages? I wasn't aware, but probably yep - like > FreeBSD or OSX likely to not to have the sys/prctl.h . This could be a > reason for delaying till RC4, but it's actually easy solved doing some test > compilation in config.m4 . I'd see build + disable on run-time in RC3 as a > better move because it turns the test circle earlier which is good > considering there are only 4 RCs to go yet. > > As long as we fail gracefully when compiled with hugepage support and > then run on a system that doesn't have any hugepages configured. These > days the build box and the production execution box are rarely the same > machine. > Yeah. This is transparent solution. At first it's disabled by default by opcache.huge_code_pages=0. At second, it should work without problem if OS doesn't provide huge pages. > > 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. Thanks. Dmitry. > > -Rasmus > > --001a11431e76a80a3c051fc3b6ba--