Disks are slow!
Bob Friesenhahn <[email protected]> Fri, 4 Sep 2009 13:57:53 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.core |
|---|---|
| Message-ID | <[email protected]> |
Many people have noticed that GraphicsMagick performance sometimes goes south once it needs to use temporary files to store the image pixels. Sometimes I am able to improve the situation via algorithmic improvements, but other times the algorithm is inherently random access and can't be helped. Most desktop computers come with slow SATA disks with a long rotational latency and long seek time. We are talking 12ms (or more) per random I/O. Expensive SAS disks improve performance quite a lot but they are smaller, and (of course) expensive! Yesterday I did a little experiment on my Windows system. I set the MAGICK_TMPDIR environment variable so that GraphicsMagick temporary files were sent across a CIFS (Samba) share to a Unix server with lots of RAM. Connectivity is gigabit ethernet so file transfer speed is perhaps 60MB/second. It seems that CIFS does not issue many sync requests so storage in the server remained memory based. A test of file rotate by 90 degrees showed a 30X speed improvement even with the (relatively) slow ethernet and Samba. An emerging trend in computing is Solid State Disk (SSD). While originally introduced for digital cameras and laptop computers, there are now "enterprise" SSDs available which can store 30GB or more, and should last quite a few years, even when used as a temporary file store (FLASH based SSDs wear out due to repeated writes). The cool thing about these SSDs is that since they are not rotating media and don't have any head to seek, a small 2-1/2" form factor SATA device (e.g. Intel X25-E) can handle 1K to 5K writes per second. People who are using GraphicsMagick to manipulate huge images should benefit greatly by using a high-grade SSD as a temporary file store for GraphicsMagick. Of course, if your system can fit enough RAM, performance will be as good as it can get if the image fits in RAM and avoids any filesystem storage. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july