Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88210 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20809 invoked from network); 15 Sep 2015 09:50:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2015 09:50:00 -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.41 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.213.41 mail-vk0-f41.google.com Received: from [209.85.213.41] ([209.85.213.41:34214] helo=mail-vk0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 24/83-28087-7C9E7F55 for ; Tue, 15 Sep 2015 05:49:59 -0400 Received: by vkhf67 with SMTP id f67so76006643vkh.1 for ; Tue, 15 Sep 2015 02:49:55 -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=BRNnktaTTc3olecSb6JFLkwO/OhTBTqsgUEaXQ6HkZE=; b=Kgb1SqQ0gRQRgkPIGKZI3uE/X3MsAx8gu6a839suQRjh8PBdkWeRRnDOCZ3zS8iXHi Fxg/8dmXkID87CnI+23tQEcWPv/Q3qaH77hPfhUZgKRM70uwzJtl+4J2fesUiA01sxLB tE1NK5EB/tYJYgkcIqas82mOiF5gGm4SzCRFmCW6oqNDu93CO4LNqwTtPQyo3MAxh9Cr L8pTFh/8ICqUXlYHtyNMm1F5hovJTSCjdXuYf35WeskEh6jv847o4d923sUODvLUhVoT PzOjw/wvi9mNlnqKR3qmiUb+09qVqJ0HyTBZGkOd/WCPUxNSaKCVDLBGXkyl7XZH1mR7 7PIA== X-Gm-Message-State: ALoCoQk8aFoOjkOYKPwoYD2xYWv5BP9yHLzJGJJZ6xJRbigAWE4hCU+dOLOXC4iujVOWo2b2KaCZTHJFQuZniVO9RqvGlgOo70k2R6nScqlD4lN/Pxlp+KYvcdC9yrtMws/fLxrQc0+ELo9WvMzldUCw6wAvicUYkKVS9f6gLOu5YFyVaAoc1W4= MIME-Version: 1.0 X-Received: by 10.31.158.205 with SMTP id h196mr19609080vke.11.1442310595607; Tue, 15 Sep 2015 02:49:55 -0700 (PDT) Received: by 10.103.29.195 with HTTP; Tue, 15 Sep 2015 02:49:55 -0700 (PDT) In-Reply-To: <55F7D5B6.8070407@lerdorf.com> References: <031201d0ef28$abcec710$036c5530$@belski.net> <035401d0ef32$440361e0$cc0a25a0$@belski.net> <55F774F1.3040502@lerdorf.com> <55F7D5B6.8070407@lerdorf.com> Date: Tue, 15 Sep 2015 12:49:55 +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=001a11415a8eb51c1a051fc61a96 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) --001a11415a8eb51c1a051fc61a96 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 15, 2015 at 11:24 AM, Rasmus Lerdorf wrote: > On 09/14/2015 11:58 PM, Dmitry Stogov wrote: > > On Tue, Sep 15, 2015 at 4:31 AM, Rasmus Lerdorf > > 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//smaps Actually, PHP may use huge pages for Zend MM, opcache SHM and now for a part of PHP code segment. Thanks. Dmitry. > > -Rasmus > > --001a11415a8eb51c1a051fc61a96--