Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-30-2008, 10:58 AM   #1
LQ Newbie
Registered: Dec 2002
Location: Brazil
Posts: 26

Rep: Reputation: 15
Swap size for a 16Gb RAM database/application server

Hi, folks!

I'm preparing a RHEL5 server with 16Gb RAM to be a database/application server (DB2/SAP) at our company, and I would like to know if there is an ideal size for swap partition for this kind of scenario.

Thanks in advance.

Old 04-30-2008, 11:29 AM   #2
Registered: Apr 2008
Location: North Versailles, PA
Distribution: Ark Linux
Posts: 63

Rep: Reputation: 15
With that amount of RAM, I don't really think a swap partition is necessary, unless you're going to load up almost as many programs as you've got RAM (in which case, a small swap of say, 128MB to 2GB would do, depending on how much memory you plan on using). If you plan on using suspend-to-disk/hibernate (which is NOT needed on a server since a server is generally always on), you'll need a swap partition large enough to hold all 16GB worth of RAM PLUS how much video card memory you have (again, generally not needed on a server).
Old 04-30-2008, 01:56 PM   #3
Senior Member
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,064

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Originally Posted by Reginald0 View Post
I would like to know if there is an ideal size for swap partition for this kind of scenario.
Well, there is. Its just a shame we can't know what it is.

Even with this amount of RAM, I think I would always want some swap space so that if the worst happens and it does run out of ram, it slows down rather than does anything more abrupt. In that case, the fault is going to be easier to debug.

Depending on the databases, the working set of data could be quite large. this would influence the amount of ram that is optimal for the application. If, however, totalling up the programs and the working sets of data you come to a result that is quite clearly less than the amount of ram ('worst case' memory usage), you could quite happily decide on a small amount of ram, which in this context might be a couple of gig. If the worst case memory usage is pushing closer to the amount of ram (or even if it exceeds the amount of ram - and I don't even want to think about what you might be doing to cause this situation), you'd probably be better pushing the swap up a bit - say 8 G or more.

With the cost of disk space these days, if you are in any way uncertain, provision for too much rather than too little. You could even initially partition the system with a couple of different swap partition sizes and decide which to use finally based on testing (but, by the time you've created the swap partitions, you'd probably just leave them as swap, wouldn't you?).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC 6 - missing RAM - Intel S5000PSL Board - 16GB RAM meofcourse Linux - Hardware 11 12-20-2007 03:21 AM
Swap double size of the RAM zillah Fedora 3 12-24-2005 07:13 AM
Swap double size of the RAM zillah Solaris / OpenSolaris 3 11-22-2005 11:30 AM
Why should you give the size of the swap disk as twice the size of RAM vmniza Linux - Newbie 3 09-17-2004 02:13 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration