If an email server sometimes runs out of memory, it may not be memory bound. Swapping can be a symptom that the system has run out of something else, which has caused processes to back up on the server. This problem eventually leads to memory exhaustion.
I/O-bound email servers are a common occurrence. Generally, fixing this problem requires adding disks, upgrading storage systems, or upgrading filesystems.
Often, if a system is network bound, it will be impractical to upgrade the network in the short term. Instead, the email server may need to be upgraded to support deep queues and many concurrent processes.
When a server becomes saturated, very often the best option is to just let it work its way out of a jam, rather than trying to find some way to reduce its load. If a server cant handle the load being thrown at it, the demand for its services wont decrease in the short term. The email will keep coming.
Many tools are useful for determining why a server might run slowly.
Email applications tend to log a lot of information. This logged information is valuable for assisting in performance tuning, but the logging process itself consumes resources.