Efficient server configuration for imagemagick

I am operating a system with heavy image editing processed by imagemagick.

Now for a new server I was wondering which system requirements are most important to boost performance of imagemagick and image editing such as converting and composing gifs, jpgs and pngs.

The resolution of the images is usually between 800x400 and 1980x1080 px. Multiple images may be processed at the same time.

I was thinking that a lot of (fast) RAM would be most important but then even full hd in 32bit only takes around 8MB, so maybe CPU is more important?

Any insights are highly appriciated!

Update:
htop shows that CPU is the most probably the bottleneck.
Since imagemagick needs a lot of resources I could imagine that I would hit CPU limits with one server pretty quickly. Any ideas how I could balance the load dynamically (there could be huge peaks)? Something like Amazon Web Services but quicker since images are rendered on the fly?


Processing such small images (and 1920x1080 is small) doesn't require much memory, CPU is dominant.

You need lots of CPU power, if you have many pictures to convert at a time, running the conversions in parallel is a good idea. Also, because it's easy to run it in parallel having CPU with more cores vs higher frequency will give you higher performance. You just need to make sure to run many jobs at the same time.

In other words, look for machines with minimal amount of memory (4-8GB) and many cores or even many CPUs. If you're using Amazon, then High-CPU Instances is what you're looking for. For very large load, it may be good idea to look at cluster instances.

Depending on the specific number of conversion requests, you may have better luck scaling horizontally - getting more machines and spreading your load over them. But that depends on your exact use case, collocation costs or VM costs, etc.


I've done photobooth project, based on opensource software, we use ImageMagick for image processing. We've experimented with both x86 and ARM v6/v7 platforms. Different image sizes, different effects, combining of images etc. We've tested with 256 RAM for both old x86 PC and ARM (Raspberry Pi). CPU was the bottleneck and we were practically unable to use 1 core for instant processing - it was taking about 30 secs to complete on ARMv6, 10 secs on P3 and 1 sec for 1 GHz newest Core. It's a CPU. If you are running ImageMagick apps from command line, then you should check /tmp, which is usually tmpfs/shared memory. For us it was taking about 64MB per one large print image, combined from four jpegs from Canon cameras. If you are running several processes at once - just add more cores.

How to balance the load? Depends on your configuration, how your system works. Do you use web services, running ImageMagick with php or have your own programs etc... Please clarify...


From htop it looks like the CPU would be the bottleneck. It goes up to 100% work load ...

If your CPU is pegging and everything else is at nominal values then you need to add More CPU.