Home > Backend Development > PHP Tutorial > lnmp - Doubts about PHP7 GCC PGO compilation

lnmp - Doubts about PHP7 GCC PGO compilation

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-09-03 00:14:10
Original
1858 people have browsed it

Read what Brother Niao wrote about making your PHP7 faster (GCC PGO, and then start compiling it yourself.

sapi/cgi/php-cgi -T 100 /var/www/htdocs/wordpress/index.php >/dev/nul
In this step,

sapi/cgi/php-cgThis file cannot be found in /php-7.0.10/sapi/cgi

Then, since it is actually lnmp, should I use a file under sapi/fpm/ for training?

But novices really don’t know how to play this step. After searching, there are no foreign devil tutorials, and almost all of them are copied from Brother Niao's articles. The official PHP website also has instructions for this method. . .

Reply content:

Read what Brother Niao wrote about making your PHP7 faster (GCC PGO, and then start compiling it yourself.

sapi/cgi/php-cgi -T 100 /var/www/htdocs/wordpress/index.php >/dev/nul
In this step,

sapi/cgi/php-cgThis file cannot be found in /php-7.0.10/sapi/cgi

Then, since it is actually lnmp, should I use a file under sapi/fpm/ for training?

But novices really don’t know how to play this step. After searching, there are no foreign devil tutorials, and almost all of them are copied from Brother Niao's articles. The official PHP website also has instructions for this method. . .

Steps to compile PHP7 with GCC PGO optimization
Use PGO (Profile Guided Optimization) to optimize specific scenarios based on profile data, which can bring a 10% performance improvement.
1. First compile PHP7 for the first time, and let it generate profile data executable file, where prof-gen is a parameter unique to PHP7's Makefile:
make prof-gen
2. Use php-cgi to run the WordPress homepage 100 times to generate some profile information in the process:
sapi/cgi/php-cgi -T 100 /home/huixinchen/local/www/htdocs/wordpress/index.php >/dev/null
3. Compile the PGO optimized executable file according to the profile information:

<code>make prof-clean
make prof-use && make install</code>
Copy after login

Among them, sapi/cgi/php-cgi is a binary program compiled for the first time. After make prof-gen, you can see it in the directory php-src/sapi/cgi/.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template