hi!
i have
Version: ImageMagick 6.7.5-3 2012-02-23 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
installed
my linux is gentoo (i've compiled from source)
when i call convert image.jpg -scale 50% image-small.jpg everything goes ok but
when i call convert image.jpg -resize 64x64 image-small.jpg all my server cpus jump up to 100% and this process take upto 10 seconds
is something wrong with imagemagick/server or it has to be like i described?
thanx in advance
cpu overloading
Re: cpu overloading
Add --disable-openmp to your configure script command line and rebuild / reinstall ImageMagick. Also add -define jpeg:size=64x64 to your convert command line (e.g. convert -define jpeg:size=64x64 image.jpg -resize 64x64...).
Re: cpu overloading
in fact, i've got this results because of small investigation why server hang during picture uploading with carrierwave+rmagick gems for my ruby on rails app...
in this case i do not know how to add -define jpeg:size=64x64 to rmagick incapsulated commands... is it only one possible solution, or is it only an assumption?
thanx again for quick answer
in this case i do not know how to add -define jpeg:size=64x64 to rmagick incapsulated commands... is it only one possible solution, or is it only an assumption?
thanx again for quick answer
Re: cpu overloading
i reinstalled imagemagick several times with --disable-openmp key, but no luck
then i uninstalled imagemagick first and made configure/make/install again and it works now!
openmp - is evil..
then i uninstalled imagemagick first and made configure/make/install again and it works now!
openmp - is evil..
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: cpu overloading
It is a 'good' evil... in moderation... as it is with most things evil (like broccoliokliv wrote:openmp - is evil..

But if you let the evil gather in large groups it starts to warp the universe in very unexpected ways.
On its own openmp is a good idea. But only if you don't use it with other openmp processes, or even a large number of other cpu bound processes. It is not for example a good idea to have it enabled for web servers, which can run a single PHP script, many many times in parallel.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/