Jump to content

2 disks - where to put swap?


Guest taplon
 Share

Recommended Posts

Guest taplon

People say its better to put the swap partition on a separate disk (one can read the other write at the same time). :juggle:

 

I have two harddisks with same 3G free space on both. Do i put the swap partition with root or with home partition? wich needs more read/write swap?

:thanks:

Link to comment
Share on other sites

i would say: put it on the root-hdd. almost every app is run from the root-partition, the /home partition only links to root and stores some relevant data for some apps (e.g. personal config files). thus, putting the swap near root is better imho.

Link to comment
Share on other sites

Actually, if I use the reasoning of two hard drives, it would go on the drive not being used, which would be next to /home, not /. However, if you have adequet ram, say 256MB or more, the swap would be rarely used. It is an interesting idea, nevertheless.

Link to comment
Share on other sites

Indeed an intersting question.

 

Personally, I have mine sat on the spare drive (the logic being that there is a much lower load on the drive, therefore much quicker access to the swap. Indeed, this second drive also acts as my dual-boot windows drive, so I have windows, mandrake and swap on it, and fedora, /home & /etc on my first drive.

 

This logic only really works because they are both Matrox drives (thus 133 on the bus). If they were slower drives, I don't think there would have been much point. Therefore, I'd say if your using a fast ata connection to the drives (or indeed, if the box is new enough, sata), stick the swap on the second drive..

 

 

#blimey thats convoluted!

Link to comment
Share on other sites

My 2 cents:

I guess you have 2 IDE controllers, so a first approach is to put one HD on each in order to balance the load. For example, create your root partition on HD 1 (/dev/hda) and /home on HD2 (/dev/hdc).

 

Then swap should be on the least used HD. Unless you're doing a lot of R/W in your home partition, / will be the most frequently accessed partition (all programs, logs and conf files are here). So my guess would be to create the swap partition on the second disk, near /home.

 

Now if disks have different speeds, put swap on the fastest.

 

But again, under normal conditions, Linux should not use swap too often. If it becomes too frequent, (easy check with 'free'), then get more RAM.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...