1

We are using phpThumb for image resize, crop and other supported operations in PhpThumb. We have configured PhpThumb to use ImageMagick(convert in turn). However, we are observing that convert command is taking too much time and hence it's degrading performance.We are observing that performance get's degraded with increase in image file-size and more number of concurrent requests on live/production server. We tried various options to improve performance, but none of these options are working.Following is ImageMagick configuration,

convert -list configure
Path: /usr/local/imagemagick-talos-6.9.1/lib/ImageMagick-6.9.1//config-Q16/configure.xml

CC             gcc -std=gnu99 -std=gnu99
CFLAGS         -I/usr/include/OpenEXR -I/usr/include/freetype2 -g -O2 -Wall -mtune=core2 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH     /usr/local/imagemagick-talos-6.9.1/lib/ImageMagick-6.9.1/modules-Q16/coders
CONFIGURE      ./configure  '--prefix=/usr/local/imagemagick-talos-6.9.1' '--disable-openmp' 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig'
CONFIGURE_PATH /usr/local/imagemagick-talos-6.9.1/etc/ImageMagick-6/
COPYRIGHT      Copyright (C) 1999-2015 ImageMagick Studio LLC
CPPFLAGS       -I/usr/local/imagemagick-talos-6.9.1/include/ImageMagick-6
CXX            g++
CXXFLAGS       -g -O2 -pthread
DEFS           -DHAVE_CONFIG_H
DELEGATES      bzlib djvu mpeg fftw fontconfig freetype jng jpeg lcms openexr pango png ps tiff webp x xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-gvc=no --with-rsvg=no --with-wmf=no --with-perl=no
DOCUMENTATION_PATH /usr/local/imagemagick-talos-6.9.1/share/doc/ImageMagick-6
EXEC-PREFIX    /usr/local/imagemagick-talos-6.9.1
EXECUTABLE_PATH /usr/local/imagemagick-talos-6.9.1/bin
FEATURES       DPC Cipher
FILTER_PATH    /usr/local/imagemagick-talos-6.9.1/lib/ImageMagick-6.9.1/modules-Q16/filters
HOST           x86_64-unknown-linux-gnu
INCLUDE_PATH   /usr/local/imagemagick-talos-6.9.1/include/ImageMagick-6
LDFLAGS        -L/usr/local/imagemagick-talos-6.9.1/lib
LIB_VERSION    0x691
LIB_VERSION_NUMBER 6,9,1,4
LIBRARY_PATH   /usr/local/imagemagick-talos-6.9.1/lib/ImageMagick-6.9.1
LIBS           -llcms2 -ltiff -lfreetype -ljpeg -lpng12 -ldjvulibre -lfftw3 -lfontconfig -lwebp -lXext -lXt -lSM -lICE -lX11 -lbz2 -lIlmImf -lImath -lHalf -lIex -lIlmThread -pthread -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lz -lm
NAME           ImageMagick
PCFLAGS        -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX         /usr/local/imagemagick-talos-6.9.1
QuantumDepth   16
RELEASE_DATE   2015-08-05
SHARE_PATH     /usr/local/imagemagick-talos-6.9.1/share/ImageMagick-6
SHAREARCH_PATH /usr/local/imagemagick-talos-6.9.1/lib/ImageMagick-6.9.1/config-Q16
SVN_REVISION   18701
TARGET_CPU     x86_64
TARGET_OS      linux-gnu
TARGET_VENDOR  unknown
VERSION        6.9.1
WEBSITE        http://www.imagemagick.org
Path: [built-in]

FEATURES
NAME           ImageMagick
QuantumDepth   16

Please guide us if we are missing anything to improve performance. We are running it on Apache server.We don't want to compromise image quality using QuatumDepth=8.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

0 Answers0