Solved

Big swap on RedHat 6.1

Posted on 2000-03-23
6
414 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
ID: 2648581
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
ID: 2648620
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
ID: 2653770
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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 3

Author Comment

by:ygal02
ID: 2654089
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
ID: 2682315
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
ID: 2683152
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Centos 7 User to Start Apache, MariaDB, LDAP 5 48
expectj telnet failing 5 45
VMware Workstation 12 Player 16 132
Linux Real Time Memory on Distinct 24 Cycle 7 29
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

828 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