PIL and ImageMagick scalability

Fredrik Lundh fredrik at pythonware.com
Tue Dec 27 10:13:52 CET 2005


Sebastjan Trepca wrote:

> I have a question about image processing. We have a website which will
> process a lot of images a day.It will be running Apache(worker) with
> mod_python. My question is what should we use for processing. If we
> use PIL the processing will be done with the same process that handles
> other requests and that will probably slow them down when there will
> be a peak.

recent versions of PIL release the GIL for all long-running operations,
so a threaded design might good enough for your purpose.

> If we use ImageMagick you create new process that does the
> image processing which probably uses multiple CPUs better and is more
> scalable, right?

alternatively, you could just fork the Python process, and run each
PIL (or PythonMagick) job in a separate copy of the main process.

</F>






More information about the Python-list mailing list