imagick memory usage

So... I'm not sure where the error is.

I have read time and time again how imagick is the better image processor, so I decided to switch to it. I set the imagick memory limit to 64mb which should be sufficient for my usage.

With gd as the image processor my server on average ran at around 600mb of memory usage, I switched to imagick and immediately I shot up to 1200mb and climbing steadily as I browse.

Is imagick not releaseing the memory? Does it serialize it's memory usage? For instance an album page with 24 thumbs on it, is it using the 64mb limit 24 times?

Here's my current setup, only difference in the before after is enabling imagick:

Installation information
Zenphoto version 1.4.3-BETA [10286] (Official build)
Current locale setting: en_US.UTF8
?Current gallery theme: zpskeleton
PHP version: 5.4.3
Graphics support: PHP Imagick library 3.1.0RC2
ImageMagick 6.6.5-10 2010-11-26 Q16 http://www.imagemagick.org
supporting: 3fr, a, ai, art, arw, avs, b, bgr, bgra, bmp, bmp2, bmp3, brf, c, cal, cals, canvas, caption, cin, cip, clip, cmyk, cmyka, cr2, crw, cur, cut, dcm, dcr, dcx, dds, dng, dot, dpx, epdf, erf, fax, fits, fractal, fts, g, g3, gif, gif87, gradient, gray, group4, hald, histogram, hrz, icb, ico, icon, info, inline, ipl, isobrl, j2c, jng, jp2, jpc, jpeg, jpg, jpx, k, k25, kdc, label, m, map, mat, matte, miff, mng, mono, mpc, mrw, msl, msvg, mtv, mvg, nef, null, o, orf, otb, pal, palm, pam, pattern, pbm, pcd, pcds, pcl, pct, pcx, pdb, pdfa, pef, pes, pfm, pgm, pgx, picon, pict, pix, pjpeg, plasma, png, png24, png32, png8, pnm, ppm, preview, psb, psd, ptif, pwp, r, radial-gradient, raf, ras, rgb, rgba, rgbo, rla, rle, scr, sct, sfw, sgi, sr2, srf, stegano, sun, svg, svgz, tga, thumbnail, tiff, tiff64, tile, tim, uil, uyvy, vda, vicar, vid, viff, vst, wbmp, wpg, x, x3f, xbm, xc, xcf, xpm, xps, xv, xwd, y, ycbcr, ycbcra, yuv
PHP memory limit: 96M (Note: Your server might allocate less!)
MySql version: 5.5.25
Database name: inthemdl
Table prefix: zp_
Spam filter: simple
CAPTCHA generator: zenphoto
65 active plugins:

65 active filters:

Comments

  • Thanks to a spammer, this caught my eye. :)

    Each Zenphoto image is processed on a separate HTTP request to `i.php`. This is the nature of how Zenphoto works. Depending on your server's method of PHP deployment (e.g. `mod_php` vs. `fastcgi`, threaded vs. forked), this will determine how the server spawns processes/threads for processing images. Imagick's memory limit option directly exposes the corresponding ImageMagick resource limit option. The ImageMagick docs state that the limits are enforced for each ImageMagick instance, which I take to mean that it is per-process. So the given limit is for each individual image, not a cumulative resource, if I understand correctly.
  • So, since the instances are separated it's causing mass memory usage. A shame :( oh wells.
  • acrylian Administrator, Developer
    I actually understood that one after another is processed as it is not cumulative? Maybe there is room for improvement here and there. On my live test site I don't really see a difference between GD and Imagick, maybe Imagick a little more speeded but not measured. But of course I cannot test a really big gallery with thousands of fine data resolution images.
  • It might also be the way the php is configured as he stated, so I might play around with what renders my php scripts. But that'll be for something later down the road.
Sign In or Register to comment.