Jump to content
Sign in to follow this  
Guest anon

/Swap on other drive

Recommended Posts

Guest anon

I read somewhere ( can't rem where) that if you install Linux on one drive, but put the swap on your second drive, there's an improvement in speed/performance. I tried this and it works better/faster, but I can't figure out why it should. Anyone know?

Share this post


Link to post
Share on other sites

My wording may be weird but....the hd heads don't have to bounce around as much reading partitions and swap, but rather sits at the swap waiting to do it's job, so it's already there, which frees up the hd heads on the partition hd to just reading the info. The diff is especially noticable with dual ide channels. How's that :?: :roll:

Share this post


Link to post
Share on other sites

Another way to look at it is that you have 2 hard drives providing data at the same time vs one that has to switch between the swap and the other partitions. When it broils down to it, a hard drive only gets a finite set of data at a time. With 2 drives accessing data, you get double that..

Share this post


Link to post
Share on other sites
Guest anon

Thanks bvc, I had to read it four times to understand, but I think I have got it :lol: So the hd heads on the second drive are already sitting at swap waiting. Interesting picture come to mind. I know little about hard drives so your answer prompts another question. If the heads are sitting at /swap on the second drive, then it doesn't matter where on the drive you put the swap?

Share this post


Link to post
Share on other sites

Actually no, the heads when not being used move back to the beginning of the drive....SORRY!, should have said that earlier. This is why it's always recommended to put the swap as close to the beginning as possible and why data is accessed/moved faster when at the beginning of the drive. Putting a swap at the end of a hd wouldn't give you much of a boost, if at all.

Share this post


Link to post
Share on other sites
This is why it's always recommended to put the swap as close to the beginning as possible and why data is accessed/moved faster when at the beginning of the drive. Putting a swap at the end of a hd wouldn't give you much of a boost, if at all.

 

thanks bvc, i got this backwards. but since im dual booting, the swap can only be relocated in the middle of the drive. i gather this would get a little boost over placing the swap partition in the end of the drive?

 

ciao!

Share this post


Link to post
Share on other sites

Depends on how big of a drive, the rpm of the drive, and is the swap going to be used by an OS on a different drive???. If the OS is on the same hd as the swap there won't be much of a diff, if at all, because the heads are still going to have to bounce between partition data and swap data. If the swap is on a diff hd and the hd is fast (like 7200rpm) then moving the swap from the end of a big 30GB+ to the middle may give a little boost. Did that make sense?

Share this post


Link to post
Share on other sites

Oh course it's better to have a larger amount of ram so that you use a swap partition less, this should give a bigger increase in performance than the swap alteration. It is a lot more expensive though.

Share this post


Link to post
Share on other sites

Be aware that in case of a diskcrash, or just exchange, your system will not have a swap....

 

Also, I have not seen any swap used since I put in my second 512MB stick... :)

 

Another thing to keep in mind is that with 2 drives, you also have 2 cashes on the drives, normal size is 2MB nowadays, so you double that to 4MB...

Share this post


Link to post
Share on other sites
Guest JaseP

There are lots of benefits to having multiple drives. You just have to be carefull, in that installing a new copy of Mandrake, the install routine does not like certain combinations (at least the old install routine didn't), like for example; Primary HD and CD-ROM on Primary IDE Line, secondary HD on secondary IDE line. You can usually switch afterwards with an edit to the appropriate config files, but that is usally a big pain in the rumpus.

 

I keep the swap on the boot drive just to avoid problems with losing one HD. I back up my data on the secondary HD in case of a bad physical crash of the primary HD.

 

One key point is that no matter how you do it, in terms of one HD or two, make sure your /home partition is seperate from your root and /usr partitions, so that when you have to upgrade or re-install or whatever, your user data is intact. Also it's helpful to use a journalized file system like EXT3 or ReiserFS on the boot drive and on the data drives. Crashes on an EXT2 partition are a real pain in the arse to recover from.

Share this post


Link to post
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...
Sign in to follow this  

×
×
  • Create New...