ZenphotoCMS Forum
imagick memory usage - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: imagick memory usage (/thread-10069.html)



imagick memory usage - micheall - 12-06-2012

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:

Quote:Installation information
Zenphoto version 1.4.3-BETA [10286] (Official build)
Current locale setting: enUS.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:




imagick memory usage - kagutsuchi - 14-06-2012

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.




imagick memory usage - micheall - 17-06-2012

So, since the instances are separated it's causing mass memory usage. A shame oh wells.




imagick memory usage - acrylian - 18-06-2012

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.




imagick memory usage - micheall - 20-06-2012

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.