php-build/php-buildとかmadumlao/phpenvで、コンパイルするときに"-j4"オプションを付けて高速化する方法
make
するときに -j4
オプションを付けるために、 phpenv
する前に、 export PHP_BUILD_EXTRA_MAKE_ARGUMENTS=-j4
する。
実例
AMD A8-3870 APU
だけど、6分くらいで終わったみたい。CPU使用率は100%に張り付いてたし、ちゃんと4コア使えてるみたいだった。
1コアの場合の時間を計測していないので、比較対象がない。
こんな感じになった
[ndxbn@sandbox:~]phpenv versions
[ndxbn@sandbox:~]export PHP_BUILD_EXTRA_MAKE_ARGUMENTS=-j4
[ndxbn@sandbox:~]echo $PHP_BUILD_EXTRA_MAKE_ARGUMENTS # 確認用
-j4
[ndxbn@dev1:~]time phpenv install 7.0.11
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 7.0.11 into /home/suzuki_k/.anyenv/envs/phpenv/versions/7.0.11
[Skipping]: Already downloaded and extracted https://secure.php.net/distributions/php-7.0.11.tar.bz2
[Preparing]: /tmp/php-build/source/7.0.11
[Compiling]: /tmp/php-build/source/7.0.11
[xdebug]: Installing version 2.4.1
[xdebug]: Compiling xdebug in /tmp/php-build/source/xdebug-2.4.1
[xdebug]: Installing xdebug configuration in /home/suzuki_k/.anyenv/envs/phpenv/versions/7.0.11/etc/conf.d/xdebug.ini
[xdebug]: Cleaning up.
[Info]: Enabling Opcache...
[Info]: Done
[Info]: The Log File is not empty, but the Build did not fail. Maybe just warnings got logged. You can review the log in /tmp/php-build.7.0.11.20161012163940.log
[Success]: Built 7.0.11 successfully.
real 6m23.305s
user 12m54.380s
sys 3m10.226s
Author And Source
この問題について(php-build/php-buildとかmadumlao/phpenvで、コンパイルするときに"-j4"オプションを付けて高速化する方法), 我々は、より多くの情報をここで見つけました https://qiita.com/ndxbn/items/33554de7ed9133b26713著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .