Composite memory issues
Posted: 2007-02-21T23:30:01-07:00
I have an issue with 'composite' taking a ridiculous amount of time. The images are not overly huge. They have widths and heights in the range of 7,000-10,000 pixels. From searching the archives of this site I see that ImageMagick has been used for images much larger than this, so I expect the software to work fine for my application. All other operations on images of the same size work well; these are operations like annotate, compositing much smaller images, lines, etc. It is only a composite of one large image on top of another that takes up to six hours to run.
I am hoping someon can give me a tuning suggestion.
I am using the Q16 version. Doing some calculations, using 4 channels per pixel at 16 bits per channel, both images should take around one gig of memory which is less than my physical RAM. It really does not seem to me that this should be all that complicated. It just amounts to reading both images into memory and transferring pixels from one image to another. It should take almost no time to run other than the reading and writing of images.
Running 'identify -list resource' gives the following:
File Area Memory Map Disk
------------------------------------------------
768 1.95gb 1.95gb 1.95gb 4.000eb
I read the architecture page, but it does not really give suggestions for how the different settings should be set relative to one another. Should 'memory' be set to physical RAM minus an amount for the OS, or should physical RAM + swap be used? What should 'area' be set to relative to 'memory'?
When I run 'top' I can see the 'composite' initially starts out using a lot of CPU but then drops down to a few percent and seems to not do much. The process' memory is sometimes up to 2G. Memory goes up to around 1G. Both images should fit inside of of the 1G. I just fail to see how a simple composite can take so long when the everything should fit in RAM.
Any help or suggestions would be much appreciated.
I am hoping someon can give me a tuning suggestion.
I am using the Q16 version. Doing some calculations, using 4 channels per pixel at 16 bits per channel, both images should take around one gig of memory which is less than my physical RAM. It really does not seem to me that this should be all that complicated. It just amounts to reading both images into memory and transferring pixels from one image to another. It should take almost no time to run other than the reading and writing of images.
Running 'identify -list resource' gives the following:
File Area Memory Map Disk
------------------------------------------------
768 1.95gb 1.95gb 1.95gb 4.000eb
I read the architecture page, but it does not really give suggestions for how the different settings should be set relative to one another. Should 'memory' be set to physical RAM minus an amount for the OS, or should physical RAM + swap be used? What should 'area' be set to relative to 'memory'?
When I run 'top' I can see the 'composite' initially starts out using a lot of CPU but then drops down to a few percent and seems to not do much. The process' memory is sometimes up to 2G. Memory goes up to around 1G. Both images should fit inside of of the 1G. I just fail to see how a simple composite can take so long when the everything should fit in RAM.
Any help or suggestions would be much appreciated.