making bbPress (and WordPress) work better!

PHP

How to build HHVM 3.22 master trunk on CentOS 7

HHVM 3.20, 3.21 and 3.22 are still faster than PHP 7.2 especially with many connections under load, however as of October 2017 there still are no official pre-compiled HHVM packages for CentOS 7.x so we need to revisit how to build it by hand, which is not too difficult, just takes most servers awhile to assemble

There are instructions on the HHVM wiki for CentOS7 but they are a year out of date now.

The process is straightforward, first we need to not only make sure we have all the libraries we need but also the development libraries and most recently a newer version of the GCC compiler, we will use GCC 6.3 found in the official SCL Devtoolset-6 for CentOS 7 (trusted because it is built by Redhat/CentOS)

(more…)


PHP 7 Opcache adds Huge Pages support for extra performance

The PHP 7 opcache (open sourced by Zend, which replaced APC) gets a little performance boost from the added support of Huge Pages by Dmitry Stogov:

Added an experimental ability to move PHP code pages (PHP TEXT segment) into
HUGE pages.

; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
; This should improve performance, but requires appropriate OS configuration.
;opcache.huge_code_pages=1

Note that PHP must first be compiled with the appropriate configure option:

./configure --enable-huge-code-pages  (... etc.)

Essentially, Huge Pages (on OS that support them) reduces the size of the index that has to be searched to find allocated memory by allowing larger chunks of memory to be claimed instead of smaller blocks.

See the Debian wiki for a better explanation of huge pages:
https://wiki.debian.org/Hugepages

This will have to benchmarked to prove if it really enhanced performance and by how much (I suspect low single digits but everything helps).

Also new to PHP 7 will be a file-based cache for the opcache which can be used as either the primary or a secondary cache level: (more…)


PHP 5.4 reaches End-of-Life, PHP 7.0 release schedule filled, PHP 7.1 Branched

PHP 5.4 hit EOL yesterday (end of life). There will not be any further security updates for it. You should be using PHP 5.6 anyway, it is slightly faster.

http://php.net/supported-versions.php#layout-content

Meanwhile PHP 7.1 has now received its own branch and the rest of the release candidate schedule has been filled out on the timetable:

https://wiki.php.net/todo/php70#timetable

Sep 17 2015 PHP7 RC 3
Oct 01 2015 PHP7 RC 4
Oct 15 2015 PHP7 RC 5
Oct 29 2015 PHP7 RC 6
Nov 12 2015 PHP7 Final

So every other Thursday through November will bring more and more stability to PHP 7.0 which will be the most important PHP release since PHP 4


CURL broken in CentOS 7 / RHEL7 for past year

If you suspected maybe WordPress and other PHP apps were slower to ping/trackback sites and other fetches under CentOS 7 than CentOS 6, you aren’t imagining things.

Apparently libCurl (and therefore Curl in PHP) has been broken for over a year now without RedHat applying the available patch and pushing an update.

https://bugs.centos.org/view.php?id=8076

https://bugzilla.redhat.com/show_bug.cgi?id=1130239

patch: https://github.com/bagder/curl/commit/d529f388 (note July 2013)

(more…)


PHP 7.0 Final will ship November 12th 2015

Very exciting to see the PHP team set the date for the PHP 7.0 final (gold) release.

https://wiki.php.net/todo/php70#timetable

Thursday November 12th – 90 days from today, mark your calendars!

It will be as if millions of servers cried out as their loads were cut in half.

The first PHP 7.0 release candidate will ship August 20th, 2015 (this coming Thursday!)

All changes to PHP 7.0 now are stabilization/fixes only (feature frozen).

In 30 days, on September 14th 2015, the PHP team will start the PHP 7.1 master trunk branch as PHP 5.4 is marked “end of life”

If you need legacy code support, be sure to read my post on how to put mysql functions back into PHP 7.0


WordPress 4.3 benchmark: HHVM 3.9 vs PHP 7.0

A casual Sunday morning benchmark for August 9th 2015 using latest builds:

1000 Front Pages of WordPress (virtually stock default install)
HHVM 11.99, 11.83, 11.81, 11.78, 11.85 seconds
PHP7 11.18, 10.95, 10.85, 10.96, 10.88 seconds

Using
WordPress trunk 4.3 RC2
HHVM trunk 3.9-dev
PHP trunk 7.0 RC1
(on CentOS 7)
(more…)


How to put MySQL functions back into PHP 7

PHP 7 will go “release candidate” on August 20th 2015 which is very exciting because it will instantly be twice as fast as PHP 5.6 (and all previous versions). PHP7 gives HHVM a run for the money and takes 5 minutes to compile instead of hours for HHVM.

But there is a catch – if you have any legacy code that uses the mysql_* functions, they will stop working entirely in PHP 7. Not just a warning, not just deprecated, but gone, fatal.

However, it is easy to get them back without using a wrapper or modifying your code…
(more…)