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: | Anatol Belski | Date: | Mon, 14 Sep 2015 20:05:11 +0000 |
| 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 |
||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-88188@lists.php.net to get a copy of this message | ||
Hi Dmitry,
> -----Original Message-----
> From: Dmitry Stogov [mailto:dmitry@zend.com]
> Sent: Monday, September 14, 2015 12:58 PM
> To: Anatol Belski <ab@php.net>; Kalle Sommer Nielsen <kalle@php.net>;
> Rasmus Lerdorf <rasmus@lerdorf.com>; Xinchen Hui <xinchen.h@zend.com>;
> Nikita Popov <nikita.ppv@gmail.com>; Zeev Suraski <zeev@zend.com>; Andi
> Gutmans <andi@zend.com>; PHP Internals <internals@lists.php.net>
> Subject: [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 possible to
>
> The effect of this patch is really exiting to keep it disabled by default... :)
>
> $ perf stat -e instructions,iTLB-loads,iTLB-load-misses,cycles
> sapi/cgi/php-cgi -d opcache.enable_huge_code_pages=0 -T 10000
> /var/www/html/bench/wordpress-3.6/index.php > /dev/null
>
> 191,778,620,621 instructions # 0.81 insns per
> cycle
> 178,497,016
> iTLB-loads
> 87,351,276 iTLB-load-misses # 48.94% of all iTLB
> cache hits
> 238,136,402,797
> cycles
>
> 110.221114219 seconds time elapsed
>
> $ perf stat -e instructions,iTLB-loads,iTLB-load-misses,cycles
> sapi/cgi/php-cgi -d opcache.enable_huge_code_pages=1 -T 10000
> /var/www/html/bench/wordpress-3.6/index.php > /dev/null
>
> 191,780,181,536 instructions # 0.83 insns per
> cycle
> 39,017,004
> iTLB-loads
> 41,631,359 iTLB-load-misses # 106.70% of all iTLB
> cache hits
> 231,287,491,307
> cycles
>
> 107.742837269 seconds time elapsed
>
> May be we should enable this by default in RC (may be also file cache) and make
> decision based on feedback?
>
The file cache feature has proven itself as stable already, IMHO it should be built by default in
RC3.
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. Then it can be easy enable and give one more
intermediate step for pre testing and go into RC4 completely if ok. What do you think?
Regards
Anatol