Thursday, July 23, 2009

Paging vs RAM

My network get hammered with anywhere between 50,000 to 125,000 SMTP connections per hour (on a 50 mailbox network). Though more then 99% of all connections drop early using email reputation services, my server work hard around the clock and from time to time require some personal attention.
To help the poor guy (I’m really attached to this server as we spend many hours together) Monitoring the performance over few weeks I decided to boost its memory and help it reduce the processing time during peaks.
The DL320 G5 server already had 2GB of RAM and the page file set to the max limitation of 4095MB. Should I add RAM or overcome the limit?

In order to get a decision we have to start with the basic question: What is a page file?
In simple words (you can also read here) paging is a way in which the OS can store data and retrieve it in addition to the main memory component.
32-bit Windows 2003 servers have a 4095MB paging limit. let me explain:
In a 32-bit computer, the memory addresses are 32 bits long and stored as binary numbers. There are approximately 4 billion possible different 32-bit binary numbers (2^32) which represent 4GB.
While RAM work faster and has a low cost (4GB for a DL320 is sold around $60) it has a solid limit of 4GB while paging limitation can be tweaked.

Most applications will eat as much memory as you let them where 4GB again is set to be the limit per process. This server only run one application therefore I decided to go with 2 steps and let it work for couple of weeks, monitor again and check the performance change:
First and easy I got an extra memory and upgraded my RAM to 4GB.
As expected I saw an immediate boost in performance but let’s not jump to conclusions and wait,. I want to see how the application behave over time.
The second step was defragging the page file. No, not the standard disk defrag you might run once in a while – that would not affect the page file. I used PageDefrag – a Sysinternals (now part of Microsoft) tool that does just this one task. If you don’t know it by now you should get familiar with it since it is a great tool.

The reason I try to avoid changing the page file size limit is simple: I like to keep it simple and original as possible. While adding RAM keep with the intended specs for the server changing the size limit would be a step toward more problems. You can never know how a regular out of the box program that was built for a 4GB limit would behave with additional memory. Most programs will have no problems but once in a while you’ll start seeing weird behavior and we all know that a familiar problem even if it's repeating and annoying is better then any new problem...


  1. I would also look into web based spam filtering which would reduce your incoming smtp traffic. I'm assuming a ton of that traffic is spam. I use anti spam services from which reduced the load on my servers and reduced the threat of spyware infiltrating the network from incoming email.

  2. I'm in a process, checking this with my vendor - Verizon.
    they use MessageLabs services which I know from our other services (see in this post:
    there is obviously the cost issue which I have to figure out but overall I think it is a good deal - not only they do the hard work, I spare the bandwidth!