Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a server with 16GB ram with RH Enterprise AS 4 update 3 installed. I wanted to create swap files totaling 2 x memory so I created four 8 GB swap files on 4 drives. However, most documentation seems to say that a swap file should not be larger than 2GB. I found an article on RHN (Article ID: 7794) that says the documentation is wrong and larger swap files are permitted. It does not say whether or not RH will use the swap properly when over 2 GB. What is the best practice?
have you monitored your server's performance and memory usage? does the memory exceed 100% (or even come remotely close to that)? if it is often near 100% or more then you definetly need some swap space (i could never comprehend a need for 32GB (!) swap space, above your 16GB physical memory).
i think the amount of swap space you need is dependant on the load of the system. also, remember that swap space is just hard disk space used to 'fake' RAM and is _extremely_ slower and may actually slow down your system.
the best practice is to not use the swap space at all.(the hard drive is much slower than ram.) the 2x ram thing is a holdover from long ago when ram was expensive and not much of it would fit on the main board.
there is no hard and fast rule but you could consider:
The old "swap == 2 x RAM" is probably irrelevant in most cases these days. And you certainly wouldn't want to be swapping large chunks.
For i86 architetures, the generic limit is 2 Gig per swap extent - up to a total of 32 extents.
I believe RH introduced a source update at ES3 (and later) to remove the 2 Gig limit.
All your allocated space will be used if you did the mkswap at that release.
I finally called Red Hat support and ended up talking to one of their performance people. The documentation is incorrect. Swap files larger than 2 GB are allowed IF the Red Hat driver is installed instead of a 3rd party driver. You can check whether or not the system sees all the swap with the command 'free'. In the end, I have 2 8GB swap files so it equals the amount of memory. The swap files are on two different drives. The other thing is that fstab should not specify a priority for the swap files.
I wouldn’t recommend creating swap space over or under 2 GB. If you require more physical memory purchase it. The system won’t use it if configured and tuned properly and if it does excessively providing you’re running a database you’re bound to crash or the poor performance may send you looking elsewhere for employment. I’m the lead responsible for the Linux support at our organization and backup DBA. We use RHEL#AS for database servers on Linux. In regards to decent sized databases at our organization residing on Linux one is approximately 600 GB residing in Informix IDS 10.UC4 and the other 350 GB residing in Oracle 9.0.6. Oracle is currently running on 32-bit RHEL3AS and will remain that was until migrating to 10G early next year then it will reside on 64-bit RHEL4AS. Informix was just migrated within the last 30 days to RHEL4AS 64-bit. Neither database has ever used swap on 32 or 64 bit RHEL.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.