X64 for Imaging Purposes: What’s the Catch?

posted by Max on 27 November 2007, 22:36

Long gone are the times when 64 bit memory addressing was the prerogative of Itanium, SPARC, RISC processors, PowerPC, etc. Now almost every desktop PC is built on the x86-64 architecture, let alone servers. x64 has become cheap, opening new horizons for a variety of applications. Surely, those who already run (or are about to run) x64 platforms have long-term thinking: taking the pains to migrate to x64 today will pay off manifold in the long run.

Migrating to x64 becomes an especially sensible issue when it comes to image processing. If you haven’t dealt with anything larger than 5000x5000 pixels, you would not probably be reading this article. Otherwise, you might witness your applications throw ‘out of memory’ errors from time to time – and think about lifting the 2-Gb-per-process curse. Install more memory (if necessary) and switch to x64 platform – it’s often just as simple as that. This was essentially the main idea behind porting Graphics Mill to x64 here at Aurigma.

However, the (often seemingly) cumbersome and costly nature of migrating to x64 is often the key factor in saying ‘no’ to the natural solution to the problem. So, developers are forced to find roundabouts for ‘out of memory’ troubles. Some of those ‘remedies’ are highly performance taxing and are fraught with development and debugging implications. These often outweigh the possible benefits. Also, the added development\debugging cost would often exceed the cost of migration of an entire farm to x64.

On the other hand, more and more applications and services are ported to x64 and some are native x64 – and those are no longer limited to scientific computing and complex mathematical modeling tasks. In fact, x64 for servers has become an industry standard for quite a while. So, if having a legacy 32 bit application prevents you from switching your IIS permanently to 64 bit, I would reply with a marketer-standard call to action: ‘Think big – go x64!’, or even more pesky – ‘Enlarge your address space now!’.

So, what are the costs of saying bye-bye to ‘out of mem’? For Graphics Mill for .NET, it means replacing a couple of DLLs in the API. If you ask me, I would say it’s certainly worth a try at the least. Eventually, it’s up to you to decide whether to ‘stay x86 and reinvent the page file’ or ‘harness the brute raw power of x64’ (I think I’ll can those two for future use).

Graphics Mill x64 Beta is available

posted by Dmitry on 17 November 2007, 16:46

From the first version of Graphics Mill for .NET our customers report our technical support department with “out of memory” problem. The problem arises when somebody tries to handle images of large size. And the most annoying moment that errors take places sometimes, it means that the application worked with the file yesterday but today you get “out of memory” when you try to open it.

Mainly this issue is based on the limitation of Windows architecture. It is well known that 32bit Windows provides a process with 2 GB of address space only. 2GB of memory per process is not so much for image processing. Say we need to load RGB image of 10000x7500 pixels. It requires about 225MB of memory – and it is almost 1/8 of available memory for a process. Moreover the address space is always fragmented. And it is not guaranteed that memory manager will find a memory block of enough size. As a result we will get “out of memory” problem.

Microsoft has released x64 family of operation systems which are good way to get rid of memory limitation problem. All previous versions of Graphics Mill work on these operating systems perfectly because Microsoft included backward compatibility with 32bit code. But to get all advantages of operating system and support more than 2GB of memory, we needed to adopt source code and recompile Graphics Mill with 64bit option of C++ compiler. Now we are on the finish line. 64bit version of Graphics Mill passes the major part of unit tests and we are ready to give Graphics Mill x64 publicity.

Graphics Mill x64 is available as beta version. The new beta would certainly be of interest to developers of memory critical solutions, such as high-demand pre-print preparation and document imaging systems. To download Graphics Mill x64 Beta you need to sign up for beta testing program on our site in beta testing section.

Graphics Mill x64 Beta requires the following:

  • If you have Windows Vista or Windows Server 2008 which includes II7.0, you need to make sure that you have the optional "IIS 6 Management Compatibility" option installed within IIS7 before installing Graphics Mill x64.
  • You need to install Microsoft Visual C++ 2005 SP1 Redistributable Package (x64). You can download it from Microsoft site.

We appreciate any feedback concerning the functionality and runtime of Graphics Mill x64. Relevant reports and requests will be considered and answered with highest priority.