forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: hannes on August 18, 2004, 07:39:53 pm

Title: Number of concurrent convert processes
Post by: hannes on August 18, 2004, 07:39:53 pm
Hello

I have been searching through the documentation and the forum seeking for any possibilities to set the number of convert (ImageMagick) processes that are forked during the batch import process. My understanding is so that during import, 4-5 convert processes are created and 4-5 pictures are resized simultaniously. I haven't been able to find anything about this so I wan't to ask if this could be set somewere?

The reason I'm asking is that I've had some problems with Coppermine when importing my big pictures (~3MB JPEGs) when 4 or 5 convert processes are created at the same time, eating up my memory and leaving my machine dead slow in heavy swapping! Even on my 1GHz machine with 360 MB RAM.
Title: Re: Number of concurrent convert processes
Post by: kegobeer on August 19, 2004, 06:10:11 am
File size isn't so much an issue as the number of pixels being manipulated.  Memory needed is calculated like this:

pixel width X pixel height X color base (RGB=3, CMYK=4)

Assuming RGB for the color base, here's memory needed for some common image sizes:

800 x 600 - 1.37 MB
1024 x 768 - 2.25 MB
1200 x 1600 - 5.49 MB

So, let's say you are batch adding 5 images, each one 1200 x 1600, using ImageMagick.  5 processes started, 5 simultaneous resize operations, each resize needed about 5.5 MB of memory....you can see why your machine bogs down.

Remember, you don't actually have 360 MB of RAM for your use: your OS eats up a bunch, other running processes need a bunch, etc.
Title: Re: Number of concurrent convert processes
Post by: Joachim Müller on August 19, 2004, 08:54:02 am
it's one of the drawbacks of ImageMagick: it starts simultaneous processes when batch-adding files. GD behaves nicer and does one at a time (because it's closer integrated into PHP). I'm sorry to say, but the only solutions for your issue are: either use GD instead of ImageMagick, or batch-add less pics in one go.

GauGau
Title: Re: Number of concurrent convert processes
Post by: hannes on August 19, 2004, 01:02:03 pm
Thanks for your quick reply! My pictures are 3008x2000 pix, that gives something like 18 MB per picture. Then resizing 5 picts at one go eats up something like 90 MB! I can see why I've problems :) 

That's although strange that the number of processes cannot be set in one of ImageMagick's config files!?

I'll try GD and see how that'll work.

Thanks again!