Solved

Big swap on RedHat 6.1

Posted on 2000-03-23
6
410 Views
Last Modified: 2013-12-15
I need a very large workspace in memory (above 1GB !)
For this pupose I need a big swap file or multiple swap parititions (about 10)
I know linux can handle maximum of 4 swap perititions.
How do I config linux to handle 10 swap par. ?
What's better in this case (file/mul. par.) ?
Any advice is welcome.
0
Comment
Question by:ygal02
6 Comments
 
LVL 2

Expert Comment

by:fremsley
Comment Utility
Are you sure about the maximal 4 swap partitions?

In general swap partitions are considered faster than swap files. If you are creating swap partitions, my advice is to distribute them to different physical drives. Additionally you should put them at the beginning of the drive -- read/write is faster there. One example:

  hda1 (priority 9)
  hda2 (priority 8)
  hdb1 (priority 9)
  hdb2 (priority 8)

if you need even more swap space, you can create swap files and give them a priority smaller than 8.

Hope this helps a bit
0
 
LVL 2

Expert Comment

by:Reinier
Comment Utility
Why would you need 10? The old restriction of 127 Mb max per swapfile/partition dates back to the 2.0 kernel series and no longer applies if you run a 2.2 kernel. I can't remember what the new limit is but I think it is at least 1 Gb.

Partitions are faster than files because there is no filesytem layer needed for accessing them. And you will want to spread the IO over all harddisks. Therefore create one swap partition on every harddisk you have and give them an equal priority and equal size. This will maximize performance. If you have to use more then one swap partition per drive make sure the are lying next to eachother in the physical disk layout. It will also help to put swap between two busy partitions, say /usr and /home. The latter two considerations will minimize disk head seek times.

Performance will still stink though, especially with IDE disks.
0
 
LVL 1

Expert Comment

by:bughead1
Comment Utility
If you only have one disk, you might consider adding a relatively small second disk, say 1.6 GB and putting a couple of 800 MB swap partitions on it.  I think you will have to use fdisk, because disk druid (at least in RH 6.0) isn't updated to reflect the new swap partition sizes that are possible with the 2.2 kernels.

If you are stuck with IDE disks, it might also be worthwhile (if disk size permits) to spread your partitions about to reduce IO.  For example, hda could be partitioned /boot, /usr, swap, /usr/local  and hdb partitioned /, /usr/lib, swap and /home.  If each swap partition is only a tad more than half the size you need, the load will be spread between the disks.

Curious, what is this machine used for?
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 3

Author Comment

by:ygal02
Comment Utility
Thank you all,
I'm getting a new disk tommorow and gonna try your advices.
bughead: the computer need to work with very big matrice on-line, that's the reason...
0
 
LVL 1

Accepted Solution

by:
bughead1 earned 50 total points
Comment Utility
Well, I think the answer has to be to use fdisk and create a larger swap partition than Disk Druid will allow.

The new kernels allow larger swap partitions and Disk Druid hasn't kept up.
0
 
LVL 3

Author Comment

by:ygal02
Comment Utility
Well, all the advices was good.
If it is possible I will grade the other answers also (if someone knows how).
Thank.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now