SWAP Question?

Jarl Friis jarl at gavia.dk
Tue Aug 11 11:36:53 UTC 2009

Hakan Koseoglu <hakan at koseoglu.org> writes:

> Hi Michael,
> On Mon, Aug 10, 2009 at 10:28 PM, Michael S. Mason<midnitemac at me.com> wrote:
>> I have a new Dell Server that I am about to install Ubuntu 9.04 Server
>> AMD64 onto. I have 4 GB's of RAM. My question? Is there any need for a
>> SWAP partition with 4GB's of RAM?
> It depends on what you are going to use it for. 4GB of RAM is not much
> for a busy database application, plenty for a very light-weight static
> page serving HTTP server.
> Unless you're extremely short of disk, it is always useful to have a
> swap file at least as big as your physical memory. Historic
> recommendations are usually twice the amount of RAM. 

I agree, swap never hurts. I have a 4GB (planning for 8GB) RAM server
my self, I configured it with 8GB. In your case I would go for 4GB
swap (assuming that disk space is not an issue)

> In reality if you are swapping that much in and out, your server
> performance will be quite severely effected. 

Correct, but in that situation the alternative to have swap available,
would be that the application would hit a memory-shortage and crash
with core dump

> In addition, some hibernation schemes can use swap partition.


More information about the ubuntu-server mailing list