LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-10-2007, 10:31 PM   #1
mm3000
Member
 
Registered: Jul 2004
Location: Victoria, OZ
Distribution: Slackware x64_Current
Posts: 82

Rep: Reputation: 15
partition order


I have a just a quick question about my partitions. I have setup like this:
Device ID System
/dev/hda1 82 Swap
/dev/hda2 5 Extended
/dev/hda3 83 root
/dev/hda4 83 user
/dev/hda5 83 home

So I wanted to know if having swap as the hda1 and then root on the extended (hda3) will cause me any trouble done the track? Should I reformat to have root as hda1? I have only just installed so a reformat should not be a problem, if I have to.
 
Old 08-10-2007, 10:41 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Nope - that is no problem, and in fact there is no requirement for any primary partition(s) with Linux. Do it as you wish.
 
Old 08-11-2007, 01:29 AM   #3
mm3000
Member
 
Registered: Jul 2004
Location: Victoria, OZ
Distribution: Slackware x64_Current
Posts: 82

Original Poster
Rep: Reputation: 15
great news, thanks
 
Old 08-11-2007, 07:19 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Quote:
Originally Posted by mm3000
I have a just a quick question about my partitions. I have setup like this:
Device ID System
/dev/hda1 82 Swap
/dev/hda2 5 Extended
/dev/hda3 83 root
/dev/hda4 83 user
/dev/hda5 83 home

So I wanted to know if having swap as the hda1 and then root on the extended (hda3) will cause me any trouble done the track? Should I reformat to have root as hda1? I have only just installed so a reformat should not be a problem, if I have to.
Hi,

No problem. Just a note, when you place the swap at the front of the disk, the access time should be better. If you place the swap at the end of the drive then the latency will increase.
 
Old 08-11-2007, 07:43 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by onebuck
Hi,

No problem. Just a note, when you place the swap at the front of the disk, the access time should be better. If you place the swap at the end of the drive then the latency will increase.
Why?? I would have thought that a call to the drive would simply position the read head(s) from their current position. Once the head is positioned, then it would would take at most one turn of the platter to get to the data.
I would have assumed that the time to access an arbitrary point on the disk would be random, but within a defined range.
 
Old 08-11-2007, 07:54 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
For 2.6 (well, actually 2.5+) kernels this is no longer an issue. If it ever was.
The I/O schedulers are asynchronous, and swap uses the same (disk) driver as normal I/O - this is also the reason swap datasets are no longer at a performance penalty as compared to swap partitions.

Can't comment on 2.4 kernels - never looked at the code.
 
Old 08-11-2007, 08:48 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Quote:
Originally Posted by pixellany
Why?? I would have thought that a call to the drive would simply position the read head(s) from their current position. Once the head is positioned, then it would would take at most one turn of the platter to get to the data.
I would have assumed that the time to access an arbitrary point on the disk would be random, but within a defined range.
Hi,

When speaking of the disk, the mechanical aspects of the subsystem still apply. We cannot get by the fact of the mechanical latency of a hard disk system. The only way around would be to use a ram based system. This would be cost prohibitive for the normal user. With the ram based (ramdisk) then you would be relying solely on the handler.

As for the;
Quote:
Once the head is positioned, then it would would take at most one turn of the platter to get to the data.
I would have assumed that the time to access an arbitrary point on the disk would be random, but within a defined range
Hopefully the subsystem cache will assist here.
 
Old 08-11-2007, 09:34 AM   #8
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
If you have a modern system .. you probably don't need Swap either ...

A question btw, (probably should have started a new thread but what the hell)

Isn't swap just some part of the memory stored onto the hardDisk. Then how come on my computer it shows that out of 1GB Ram , around 400MB RAM is used physical memory whereas 600 MB is swap?
 
Old 08-11-2007, 10:11 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by onebuck
Hi,

When speaking of the disk, the mechanical aspects of the subsystem still apply. We cannot get by the fact of the mechanical latency of a hard disk system. The only way around would be to use a ram based system. This would be cost prohibitive for the normal user. With the ram based (ramdisk) then you would be relying solely on the handler.

As for the;

Hopefully the subsystem cache will assist here.
This all makes sense...but it does not address the specific question of why swap at the beginning of the disk would be faster than at the end.
 
Old 08-11-2007, 10:18 AM   #10
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by pixellany
This all makes sense...but it does not address the specific question of why swap at the beginning of the disk would be faster than at the end.
Please see gargamel's post #23 and links in this thread: http://www.linuxquestions.org/questi...=569065&page=2

Brian
 
Old 08-11-2007, 10:34 AM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by BCarey
Please see gargamel's post #23 and links in this thread: http://www.linuxquestions.org/questi...=569065&page=2

Brian
Take home messages:
1. It is far more complex than simply saying beginning or end of the drive.
2. It depends on the design of the drive
3. The normal user will never see the difference
 
Old 08-11-2007, 11:38 AM   #12
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Quote:
Originally Posted by pixellany
Take home messages:
1. It is far more complex than simply saying beginning or end of the drive.
2. It depends on the design of the drive
3. The normal user will never see the difference
Hi,

[1] Yes it is. But to understand the basics of the HD subsystem for both electronics and mechanical does require a little background. Not everyone is up to speed with the designs of the HD. This Partitioning Primer is rather simplistic (plus old) but can be used to convey the basic idea. Another link with a HD, How fast is your disk? that test compares three type of HD. Mechanical is always going to be the limiting factor for HD subsystems, notice the rotation speeds for the above test link.

Quote:
Test;

'The above numbers are actually the same data presented in another way. Random access time is a metric that represents the typical time it takes disk to go read a random block. If you have disk manufacturers data with you, that time should be close to the sum of the manufacturers average seek time and average latency time. They declare average seek time as a typical time to move head arm from one position to another, and average latency time is time needed for wanted data block to come below the head (disk is constantly rotating, right?). Is the calculation right for your disk?'
[2] as stated we were speaking generally.

[3] Not necessarily so. That will depend on the age, design and even how the 'normal user' has the subsystem setup. Especially if the 'normal user' defaults to his/her distro defaults for the subsystem. The optimization for the drive should default to the drives abilities/configuration but not always true thus the 'normal user' may or may not see the performance difference.

This could go on and on. I don't want to waste more time on the issue. There are loads of manufacture data for HD systems that can be used to understand the methods in detail that we have discussed generally. I would suggest for those interested to go to their drives manufacture website and read some of the white papers or technical data sheet(s). Real informative but can be lengthy as well as boring to some.

Last edited by onebuck; 08-12-2007 at 06:52 AM.
 
Old 08-11-2007, 09:27 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Mmmm - let's say you put your swap on the "fastest" bit of the disk. On the same disk you have your mp3's, your logs, your shared executables ...
The heads are going to be all over the place - where's the benefit for swap ???.
Besides which, calculate your I/O rate on your swap; on most systems it is so close to insignificant as to not even be worth worrying about.

Not to mention the consolidation of (physical) I/O done by the I/O schedulers. I/O is not issued immediately, and it is also not issued in the order received. See the article on iostat on the site referenced above - note the comment (on the screenshots page) on the elevator (scheduler) doing its job.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying partition layout & partition order rm_-rf_windows Linux - General 3 06-28-2007 05:16 AM
How do you change partition order from say hda2 to hda1, where hda1 does not exist r00tb33r Linux - Software 6 04-09-2007 11:33 PM
What order and how do I ..... adds2one Slackware 4 08-31-2005 11:53 PM
partition order dr_zayus69 Linux - Hardware 5 01-07-2005 08:29 AM
which to order? i m gr8 Linux - Newbie 6 04-17-2004 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration