large temporary file make IM perform poor

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

large temporary file make IM perform poor

Post by carbon0404 »

well,I use ImageMagick in my server program,this server will process image from network continuously.When I update the IM from 6.7.6 to 6.8.0-4,I found that there must be several times in one day that It will create some very large temporary files in /tmp,usually thousands of MB.when It write such a large file to disk,it will block the server and from monitor I can some sharp time burr.I cannot figure out the reason,has it changed the policy for write temporary file to write some small data into a large file?or some wrong picture from internet cause it?
My server may process about 4000 images in one minute,all the image are from web online.so by statistics,the second hypothesis is less possible.Can someone give me some recommendation?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: large temporary file make IM perform poor

Post by magick »

carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

Re: large temporary file make IM perform poor

Post by carbon0404 »

Hi Magick:
thanks for recommendation.maybe I should describe more for my server.After read some material from forum,I have compiled and installed the IM with "-with-quantum-depth=8"option,after a night of running,from monitor I can still see some time-consuming burr.I did not get this problem with last IM6.7.6-2.I use the C++ api in multi-thread server.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: large temporary file make IM perform poor

Post by magick »

ImageMagick only creates massive temporary files if the input file has a sizable width or height or if there are hundreds / thousands of frames in the image. As discussed on the web page we referenced, our web interface to ImageMagick pings an image first to ensure it has reasonable dimensions before it tries to read it and in addition it sets reasonable resource limits to avoid denial-of-service with large images.

The only way to properly resolve this issue would be for you to identify which image is causing the large temporary disk requirements. Post a URL to the image, we'll download it and determine if the image is corrupt or if there is a bug in ImageMagick.
carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

Re: large temporary file make IM perform poor

Post by carbon0404 »

magick wrote:ImageMagick only creates massive temporary files if the input file has a sizable width or height or if there are hundreds / thousands of frames in the image. As discussed on the web page we referenced, our web interface to ImageMagick pings an image first to ensure it has reasonable dimensions before it tries to read it and in addition it sets reasonable resource limits to avoid denial-of-service with large images.

The only way to properly resolve this issue would be for you to identify which image is causing the large temporary disk requirements. Post a URL to the image, we'll download it and determine if the image is corrupt or if there is a bug in ImageMagick.
Thank you so much,I see.I have roll back to IM676 and will keep an eye on it.If I got some time-consuming burr again,I will try my best to identify the url cause it and post to u.
Post Reply