Convert very slow. Help my.

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Aliens85

Convert very slow. Help my.

Post by Aliens85 »

ImageMagick-6.6.0

1.jpg: image 3264x2448 - 2.8MB

Debian 5, VDS 300MHz 64MB:
# apt-get update
# apt-get dist-upgrade
# time convert -resize 100x75 1.jpg 2.jpg
real 0m0.622s
user 0m1.392s
sys 0m0.084s
Processor in top: 2%

Debian 5, VDS 1GHz 512MB:
# apt-get update
# apt-get dist-upgrade
# time convert -resize 100x75 1.jpg 2.jpg
real 0m2.653s
user 0m4.723s !!!!!!!!!!!!!
sys 0m0.097s
Processor in top: 200% !!!!!!!!!!!!

Help my please. My site offline!!!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Convert very slow. Help my.

Post by magick »

Type
  • convert -version
Does it mention OpenMP as one of the features? If so that could be the source of the slow-down. There is one or two releases of libgomp that cause ImageMagick to slow down significantly rather than speed it up as intended.

If that is not the problem, post a URL to your image and the command you used. We'll see if we can reproduce the timing you're getting.
Aliens85

Re: Convert very slow. Help my.

Post by Aliens85 »

# convert -version
Version: ImageMagick 6.6.0-4 2010-03-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP

image: http://www.idemvgorod.ru/1.jpg
Aliens85

Re: Convert very slow. Help my.

Post by Aliens85 »

I do now?
Aliens85

Re: Convert very slow. Help my.

Post by Aliens85 »

# dpkg -s libgomp1
Package: libgomp1
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 84
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: i386
Source: gcc-4.4
Version: 4.4.4-7
Depends: gcc-4.4-base (= 4.4.4-7), libc6 (>= 2.6)
Description: GCC OpenMP (GOMP) support library
GOMP is an implementation of OpenMP for the C, C++, and Fortran 95 compilers
in the GNU Compiler Collection.
Homepage: http://gcc.gnu.org/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Convert very slow. Help my.

Post by magick »

Install ImageMagick-devel if you don't have it already. Now download the latest ImageMagick source from ftp://ftp.imagemagick.org/pub/ImageMagick. Now type:
  • tar xvfz ImageMagick-6.6.3-2.tar.gz
    cd ImageMagick-6.6.3-2
    ./configure --disable-openmp
    make
    make install
That puts ImageMagick in /usr/local/{bin,lib,share}. Now rerun your command as /usr/local/bin/convert. Do you get reasonable timing on the command now?
Aliens85

Re: Convert very slow. Help my.

Post by Aliens85 »

# time convert -resize 100x75 1.jpg 2.jpg
real 0m1.267s
user 0m1.198s
sys 0m0.070s
cpu not load!

Thanks, Thanks, Thanks, Thanks, Thanks, Thanks, Thanks, :D :D :D :D :D :D :D :D :D :D :D
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert very slow. Help my.

Post by fmw42 »

# time convert -resize 100x75 1.jpg 2.jpg
This probably will not make a difference now, but correct syntax is:

convert 1.jpg -resize 100x75 2.jpg

see http://www.imagemagick.org/Usage/basics/#cmdline

In the future, this may be important.
Aliens85

Re: Convert very slow. Help my.

Post by Aliens85 »

command [options] input_image output_image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert very slow. Help my.

Post by fmw42 »

Aliens85 wrote:
command [options] input_image output_image
options before the input are special cases for types such as PDF where you must specify something that is not stored in the image, such as density or you need to change the colorspace from cmyk to rgb when opening the image when you don't have the correct profiles or gs device. Most options are specified in the second [options] field below:

command [options] input_image [options] output_image
Aliens85

Re: Convert very slow. Help my.

Post by Aliens85 »

thank you :)
littke
Posts: 1
Joined: 2012-07-06T02:25:04-07:00
Authentication code: 13

Re: Convert very slow. Help my.

Post by littke »

I was able to solve this without recompiling by using the solution found in this thread: http://www.daniloaz.com/en/617/systems/ ... agemagick/
Post Reply