Creating a large sprite using ImageMagick via PHP Consumes 100% processor

So, I have this:

exec("cd $upload_directory && convert \\( +append -limit memory 1 -limit map 1 *.jpg \\) -strip -trim -interlace Plane -quality 60 output.jpg

The working process:

  • The user uploads a * .zip file containing about 30 2048x1152 images each
  • Application unpacks zip file
  • The application takes pictures and makes a big sprite from all of them
  • The application then redirects to another page for processing.

Now the problems are creating a large sprite. It consumes 100% CPU (according topto the server), it fails when there are many images. The process also displays Killedwithout any additional error messages.

Now I’m sure that I can solve this by throwing more muscles on the server, but I have the feeling that the one I have is not the most effective.

What can I try to mitigate the problem?

+3
1

. - . , . . IO, CPU Memory. - Photoshop, , . - .

, . , . 32- , , .

, !

+1

All Articles