Re: Should root partition be first partition?

2010-02-10 Thread Michael Powell
b. f. wrote:

 On 2/8/10, Jerry McAllister jerr...@msu.edu wrote:
 On Mon, Feb 08, 2010 at 02:37:30PM -0500, b. f. wrote:
[snip]
 If you're laying out a new disk, you may as well take a few minutes
 and get the most out of it, even if you're not going to invest in a
 lot of new hardware.

 The system nowdays does all that figuring for you and manages
 boundaries reasonably.

 jerry

 
 That does not seem to be the conclusion of those who contributed to
 the thread I cited, although reasonably is open to interpretation.

This will become more critical with the upcoming transition from 512K to 4K 
sector size. Indeed, I believe it was initial investigations for 
implementation of this and/with comparison against other OS methods. The 
large performance differences witnessed led to a deeper, more retrospective 
look at current approaches based on 512K sectors as well. 

-Mike



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Should root partition be first partition?

2010-02-09 Thread Garance A Drosihn

At 8:09 AM -0600 2/8/10, Peter Steele wrote:
I've set up a system with gpart and have the swap partition first 
followed by root, var, and so on. This works fine but I've seen 
documents that always have root first, then swap. Is there any 
reason that root should be the first partition or can it follow swap 
space?


In the world of MBR partitioning, there is some situation where it's
important that the root partition be 'a'.  Unfortunately, I don't
remember what it was.  Probably something having to do with the boot
loader.  I do remember running into it once when I had the root
partition as 'd' by mistake.  But that was several years ago, so
I don't remember the details.

In any case, I would not expect the same problems to come up once
you're using gpart partitioning.

--
Garance Alistair Drosehn=   g...@gilead.netel.rpi.edu
Senior Systems Programmer   or  g...@freebsd.org
Rensselaer Polytechnic Instituteor  dro...@rpi.edu
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Should root partition be first partition?

2010-02-08 Thread Peter Steele
I've set up a system with gpart and have the swap partition first followed by 
root, var, and so on. This works fine but I've seen documents that always have 
root first, then swap. Is there any reason that root should be the first 
partition or can it follow swap space?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Should root partition be first partition?

2010-02-08 Thread Jerry McAllister
On Mon, Feb 08, 2010 at 08:09:48AM -0600, Peter Steele wrote:

 I've set up a system with gpart and have the swap partition first followed 
 by root, var, and so on. This works fine but I've seen documents that always 
 have root first, then swap. Is there any reason that root should be the 
 first partition or can it follow swap space?

It should work, but there are so many things that might assume
to have / (root) as the first partition on a bootable drive that
maybe it is best to just stick with that convention.

jerry


 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Should root partition be first partition?

2010-02-08 Thread Matthew Seaman
On 08/02/2010 14:09, Peter Steele wrote:
 I've set up a system with gpart and have the swap partition first
 followed by root, var, and so on. This works fine but I've seen
 documents that always have root first, then swap. Is there any reason
 that root should be the first partition or can it follow swap space?

The root partition should always be the 'a' partition, but it doesn't
have to be the first in physical order on the disk (ie. starting at
cylinder 0).  So long as partitions don't overlap (with the historical
exception of the 'c' partition, which should cover the whole drive) you
can put them in any order and starting at any offset.  You can even
leave gaps between partitions if you want, but that is pretty crazy
since it just wastes some of the available space.

There have been quite a lot of recommendations on how to lay out a disk
for best performance, based on the observation that disk access times
vary depending on how far away the data is from the spindle, and the
expected usage patterns for the partition.  Like any such advice, it
has tended to become less valid over time.  Modern disks really don't
have any physical meaning to the Cylinder/Head/Sector style addressing
schemes[*] nowadays -- and you're pretty much bound to be using LBA
style addressing anyhow.  Also, machines nowadays have so much RAM that
(a) swap is hardly ever used and (b) access to popular files is
frequently answered out of VM caches rathe than needing disk IO.

If your application is so demanding that you really need to squeeze out
the last drop of IO performance, then you're much better off investing
in fast SAS drives, a decent HW RAID controller with BBU and extra RAM.

Otherwise, don't sweat it.  Lay out the disks in a way that makes sense
to you, and carry on with your life...

Cheers,

Matthew

[*] But this still pops up in sysinstall, at the cost of much
bewilderment for the uninitiated.

-- 
Dr Matthew J Seaman MA, D.Phil.  7 Priory Courtyard, Flat 3
Black Earth Consulting   Ramsgate
 Kent, CT11 9PW
Free and Open Source Solutions   Tel: +44 (0)1843 580647



signature.asc
Description: OpenPGP digital signature


RE: Should root partition be first partition?

2010-02-08 Thread Peter Steele
The root partition should always be the 'a' partition, but it doesn't have to 
be the first in physical order on the disk (ie. starting at cylinder 0).  So 
long as partitions don't overlap (with the historical exception of the 'c' 
partition, which should cover the whole drive) you can put them in any order 
and starting at any offset.  You can even leave gaps between partitions if you 
want, but that is pretty crazy since it just wastes some of the available 
space.

I should clarify that I am using GPT partitions, not MBR, so in fact there is 
no 'a' partition and in fact no bsd label at all. My partitioning looks like 
this:

# gpart show ad4
=   34  490234685  ad4  GPT  (234G)
 34 161  freebsd-boot  (8.0K)
 50   671088642  freebsd-swap  (32G)
   67108914   671088643  freebsd-swap  (32G)
  134217778   104857604  freebsd-ufs  (5.0G)
  144703538   251658245  freebsd-ufs  (12G)
  16986936257925576  freebsd-ufs  (2.8G)
  175661919  2831155207  freebsd-ufs  (135G)
  458777439   314572808  freebsd-ufs  (15G)

Partition 4 (ad4p4) is the root partition. This works fine, but I was just 
wondering why I've seen layouts with root first, then swap, then var, etc. The 
only problem I've had is that I cannot find a way to tell the boot loader to 
boot from an alternate drive since it seems to expect MBR partitioning when 
using a reference such as 4:ad(4,a)/boot/loader. That's a separate issue though.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Should root partition be first partition?

2010-02-08 Thread b. f.
 You can even
leave gaps between partitions if you want, but that is pretty crazy
since it just wastes some of the available space.

There have been quite a lot of recommendations on how to lay out a disk
for best performance, based on the observation that disk access times
vary depending on how far away the data is from the spindle, and the
expected usage patterns for the partition.  Like any such advice, it
has tended to become less valid over time.  Modern disks really don't
have any physical meaning to the Cylinder/Head/Sector style addressing
schemes[*] nowadays -- and you're pretty much bound to be using LBA
style addressing anyhow.  Also, machines nowadays have so much RAM that
(a) swap is hardly ever used and (b) access to popular files is
frequently answered out of VM caches rathe than needing disk IO.


Layout is still important, and leaving some blank space may not be so
crazy.  Here I'm thinking not so much of ordering (although one would
probably be best served by the recommended default ordering), but of
alignment, size, raid/stripe/concat configuration, and file system
block and fragment size selection.  Witness the (as much as tenfold)
performance difference from simple changes, highlighted in the recent
thread entitled 'File system blocks alignment' on freebsd-arch@ during
December 2009 - January 2010, beginning with:

http://lists.freebsd.org/pipermail/freebsd-arch/2009-December/009770.html

If you're laying out a new disk, you may as well take a few minutes
and get the most out of it, even if you're not going to invest in a
lot of new hardware.

b.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Should root partition be first partition?

2010-02-08 Thread Jerry McAllister
On Mon, Feb 08, 2010 at 02:37:30PM -0500, b. f. wrote:

  You can even
 leave gaps between partitions if you want, but that is pretty crazy
 since it just wastes some of the available space.
 
 There have been quite a lot of recommendations on how to lay out a disk
 for best performance, based on the observation that disk access times
 vary depending on how far away the data is from the spindle, and the
 expected usage patterns for the partition.  Like any such advice, it
 has tended to become less valid over time.  Modern disks really don't
 have any physical meaning to the Cylinder/Head/Sector style addressing
 schemes[*] nowadays -- and you're pretty much bound to be using LBA
 style addressing anyhow.  Also, machines nowadays have so much RAM that
 (a) swap is hardly ever used and (b) access to popular files is
 frequently answered out of VM caches rathe than needing disk IO.
 
 
 Layout is still important, and leaving some blank space may not be so
 crazy.  Here I'm thinking not so much of ordering (although one would
 probably be best served by the recommended default ordering), but of
 alignment, size, raid/stripe/concat configuration, and file system
 block and fragment size selection.  Witness the (as much as tenfold)
 performance difference from simple changes, highlighted in the recent
 thread entitled 'File system blocks alignment' on freebsd-arch@ during
 December 2009 - January 2010, beginning with:
 
 http://lists.freebsd.org/pipermail/freebsd-arch/2009-December/009770.html
 
 If you're laying out a new disk, you may as well take a few minutes
 and get the most out of it, even if you're not going to invest in a
 lot of new hardware.

The system nowdays does all that figuring for you and manages
boundaries reasonably.

jerry


 
 b.
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Should root partition be first partition?

2010-02-08 Thread b. f.
On 2/8/10, Jerry McAllister jerr...@msu.edu wrote:
 On Mon, Feb 08, 2010 at 02:37:30PM -0500, b. f. wrote:

  You can even
 leave gaps between partitions if you want, but that is pretty crazy
 since it just wastes some of the available space.
 
 There have been quite a lot of recommendations on how to lay out a disk
 for best performance, based on the observation that disk access times
 vary depending on how far away the data is from the spindle, and the
 expected usage patterns for the partition.  Like any such advice, it
 has tended to become less valid over time.  Modern disks really don't
 have any physical meaning to the Cylinder/Head/Sector style addressing
 schemes[*] nowadays -- and you're pretty much bound to be using LBA
 style addressing anyhow.  Also, machines nowadays have so much RAM that
 (a) swap is hardly ever used and (b) access to popular files is
 frequently answered out of VM caches rathe than needing disk IO.


 Layout is still important, and leaving some blank space may not be so
 crazy.  Here I'm thinking not so much of ordering (although one would
 probably be best served by the recommended default ordering), but of
 alignment, size, raid/stripe/concat configuration, and file system
 block and fragment size selection.  Witness the (as much as tenfold)
 performance difference from simple changes, highlighted in the recent
 thread entitled 'File system blocks alignment' on freebsd-arch@ during
 December 2009 - January 2010, beginning with:

 http://lists.freebsd.org/pipermail/freebsd-arch/2009-December/009770.html

 If you're laying out a new disk, you may as well take a few minutes
 and get the most out of it, even if you're not going to invest in a
 lot of new hardware.

 The system nowdays does all that figuring for you and manages
 boundaries reasonably.

 jerry


That does not seem to be the conclusion of those who contributed to
the thread I cited, although reasonably is open to interpretation.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Should root partition be first partition?

2010-02-08 Thread Bruce Cran
On Monday 08 February 2010 14:09:48 Peter Steele wrote:
 I've set up a system with gpart and have the swap partition first followed
  by root, var, and so on. This works fine but I've seen documents that
  always have root first, then swap. Is there any reason that root should be
  the first partition or can it follow swap space?

It may partly be historical: old PCs couldn't boot from past 504MB due to the 
1023 cylinder limitation so /boot had to be first on the disk. 

-- 
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org