Home > Backend Development > PHP Tutorial > How to solve the problem that imagick causes the CPU to surge to 100% when running in multiple threads, solve imagick_PHP tutorial

How to solve the problem that imagick causes the CPU to surge to 100% when running in multiple threads, solve imagick_PHP tutorial

WBOY
Release: 2016-07-12 09:02:25
Original
1003 people have browsed it

Solution to the problem that imagick causes the CPU to surge to 100% when running in multiple threads. Solve imagick

If you install imagic to the /usr/local/imagemagick directory

First use the /usr/local/imagemagick/bin/convert -version command to check whether the output content has multi-threading enabled. The value of Features: is empty or DPC Description It is single-threaded. If the value of Features: is openMP, it means it is multi-threaded. There is a bug in the multi-threaded mode of imagick, which will cause the multi-core CPU usage to instantly surge to 100%. So be sure to use its single-threaded mode. That’s it.

The above is the result displayed when my configuration is correct. If the configuration is not correct, the result below will be 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
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

Features: openMP

The first result is single-threaded mode, and the second result is multi-threaded mode. Because the multi-threaded mode of imagick has a bug, so if you first installed imagick in multi-threaded mode, you must yum remove imagemagick Just uninstall it and reinstall it.

Just add the red font part below during installation ./configure --prefix=/usr/local/imagemagick

--disable-openmp

http://www.bkjia.com/PHPjc/1085570.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1085570.htmlTechArticle
Solution to the problem that imagick causes the CPU to surge to 100% when running in multiple threads. To solve imagick, if you install imagic to The /usr/local/imagemagick directory first uses /usr/local/imagemagick/bin/conv...
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template