: This article mainly introduces how to determine that imagick causes a CPU spike to 100% during multi-thread running. if you are interested in PHP tutorials, refer to it. If you install imagic in the/usr/local/imagemagick Directory
First, run the/usr/local/imagemagick/bin/convert-version command to check whether multithreading has been enabled for the output content. if the Features: value is null or the DPC indicates a single thread, if Features: the value is openMP, it indicates multithreading. the multi-thread mode of imagick has a bug, which causes the cpu usage of multiple cores to soar to 100% instantly. therefore, you must use its single-thread mode.
The above is the result displayed when I configured it correctly. If no configuration is correct, the following result is displayed.
|
Version: ImageMagick 6.8.9-10 Q16 x86_64 2015-12-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: openMP
|
The first result is the single-thread mode, and the second result is the multi-thread mode, because the multi-thread mode of imagick has bugs, therefore, if you are using the multi-threaded imagick mode at the beginning, yum remove imagemagick must be used to uninstall it and re-install it.
You only need to add the following red font to the installation.
./Configure -- prefix =/usr/local/imagemagick -- disable-openmp
The above describes how to determine how imagick causes a CPU spike to 100% during multi-thread running, including some content, and hope to help friends who are interested in PHP tutorials.