Re: Memory usage for gm.exe
Bob Friesenhahn <[email protected]> Fri, 4 Feb 2011 11:03:37 -0600 (CST)
| Newsgroups | gmane.comp.video.graphicsmagick.tools |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 4 Feb 2011, Frans Coetzee wrote: > > I'm using the gm-tools to convert pdf files to tiff files in batch and > I've noticed that in some cases the memory usage for gm.exe increases to > approximately 1.5 gigs. Is this normal or can the memory usage be > pre-defined to a lower number? The problem with using GM to read multi-page PDF files is that Ghostscript will convert all of the PDF files to PNM format temporary files and then GraphicsMagick will read those files before it writes anything. This approach does not scale well. As far as limiting memory goes, you should look into the -limit option as well as equivalent environment variables (MAGICK_LIMIT_MEMORY ). See "http://www.graphicsmagick.org/GraphicsMagick.html#envi" For example gm convert -limit memory 500mb infile.pdf outfile.tiff Note that when the memory is limited, disk files are used to make up the difference. These disk files may require a lot of temporary disk space. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb