[opensuse] swap file placement
To get ready for my project, on my test box I wiped out the hard drive and installed the live CD. I noticed the placement of the swap file was first. What is the reasoning behind this? (I've always set mine up as /, swap, /home - that way there's less head movement and better performance - my thinking) -- Duaine Hechler Piano, Player Piano, Pump Organ Tuning, Servicing & Rebuilding Associate Member of the Piano Technicians Guild Reed Organ Society Member St. Louis, MO 63034 (314) 838-5587 dahechler@charter.net www.hechlerpianoandorgan.com -- Home & Business user of Linux - 9+ years -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2008/05/30 08:31 (GMT-0500) Hechler Family apparently typed:
To get ready for my project, on my test box I wiped out the hard drive and installed the live CD.
I noticed the placement of the swap file was first. What is the reasoning behind this?
Where is the fastest part of a HD? What should be on the fastest part of the HD? AFAIK, the answers are usually start & swap.
(I've always set mine up as /, swap, /home - that way there's less head movement and better performance - my thinking)
Did the live CD not permit you to specify that? -- ". . . . in everything, do to others what you would have them do to you . . . ." Matthew 7:12 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Felix Miata wrote:
On 2008/05/30 08:31 (GMT-0500) Hechler Family apparently typed:
<snip>
(I've always set mine up as /, swap, /home - that way there's less head movement and better performance - my thinking)
Did the live CD not permit you to specify that?
Yes, with an override. I've never done a default install before, that's why this came up. -- Duaine Hechler Piano, Player Piano, Pump Organ Tuning, Servicing & Rebuilding Associate Member of the Piano Technicians Guild Reed Organ Society Member St. Louis, MO 63034 (314) 838-5587 dahechler@charter.net www.hechlerpianoandorgan.com -- Home & Business user of Linux - 9+ years -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2008-05-30 at 08:31 -0500, Hechler Family wrote:
I noticed the placement of the swap file was first. What is the reasoning behind this?
(I've always set mine up as /, swap, /home - that way there's less head movement and better performance - my thinking)
Yep, but that's not always true. Measure the speed and see... in my case (seagate 300GB class) it was faster at around 1/3 of the space. Dunno why they place swap first. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIQBHhtTMYHG2NR9URApvuAJ4gZ27JUx07anRjIcOtIkox/5F67gCfQrv1 7u9XDTDlNxXJwqEzCvNZbhM= =XajY -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
The Friday 2008-05-30 at 08:31 -0500, Hechler Family wrote:
I noticed the placement of the swap file was first. What is the reasoning behind this?
(I've always set mine up as /, swap, /home - that way there's less head movement and better performance - my thinking)
Yep, but that's not always true. Measure the speed and see... in my case (seagate 300GB class) it was faster at around 1/3 of the space.
Yeah, I can understand the speed advantage but that means more head/arm movement. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 30 May 2008 10:48:49 -0500 Hechler Family <dahechler@charter.net> wrote:
Carlos E. R. wrote:
The Friday 2008-05-30 at 08:31 -0500, Hechler Family wrote:
I noticed the placement of the swap file was first. What is the reasoning behind this?
(I've always set mine up as /, swap, /home - that way there's less head movement and better performance - my thinking)
Yep, but that's not always true. Measure the speed and see... in my case (seagate 300GB class) it was faster at around 1/3 of the space.
Yeah, I can understand the speed advantage but that means more head/arm movement.
Swap file placement really depends on how the system will be used. If you have a layout with: /, /home, /application-data set up as partitions, and most of your I/O is going to /application-data, then you probably want to put the swap closer to /application-data. I usually place it between / and /home. I've seen some defaults where the swap and /boot are defined the primary partitions where /, /home, and other file systems are allocated as logical partitions. Personally, I never allocate primary partitions. I always use logical partitions for everything. -- -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix PGP key id: 537C5846 PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
On 2008/05/30 17:00 (GMT-0400) Jerry Feldman apparently typed:
I never allocate primary partitions. I always use logical partitions for everything.
That's fine as long as you're not a multibooter, but it can make life more difficult than necessary to install your bootloader in the preferred location if you are. http://en.opensuse.org/SDB:Prefered_bootloader_options I doubt I have any disks that I installed anything on that have fewer than 4 primaries. -- ". . . . in everything, do to others what you would have them do to you . . . ." Matthew 7:12 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 30 May 2008 17:11:47 -0400 Felix Miata <mrmazda@ij.net> wrote:
That's fine as long as you're not a multibooter, but it can make life more difficult than necessary to install your bootloader in the preferred location if you are. http://en.opensuse.org/SDB:Prefered_bootloader_options
I doubt I have any disks that I installed anything on that have fewer than 4 primaries.
Putting the boot loader in a primary does make sense. I usually install SuSE as a dual boot with it's predecessor. The bottom line is that the stage1 must be addressable from the MBR. If you are dual booting with Windows, Windows is usually installed in one or 2 primaries. So, if you use Part 1 and 2 for Windows (C and D), Part 3 for /boot, then you generally need Partition 4 for the extended. But, for the most part, Linux file systems can exist very nicely in logical partitions, and these are more flexible than primaries, although LVM is more flexible than using hard partitions. If I were to do a complete reinstall I would use LVM and allocate my backups either to a USB drive or a separate non-LVM drive. -- -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix PGP key id: 537C5846 PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
On 2008/05/31 08:28 (GMT-0400) Jerry Feldman apparently typed:
Felix Miata wrote:
I doubt I have any disks that I installed anything on that have fewer than 4 primaries.
... if you use Part 1 and 2 for Windows (C and D), Part 3 for /boot, then you generally need Partition 4 for the extended.
In addition to those 4 primaries, most of my disks have at least 3 times that many logicals. A primary is every/any partition defined in the partition table that lives in the tail end of the MBR. That makes "the" extended a primary.
But, for the most part, Linux file systems can exist very nicely in logical partitions, and these are more flexible than primaries
To every modern PC OS, there is no difference between a primary and a logical. The only difference between them is the location of their definitions on disk. Definition location on disk is only relevant to boot loaders and partitioners, not operating systems. To a legacy OS like doz 9x, the difference between logical and primary can make a difference, but that's only due to its legacy of design roots in antiquity leading to a stupid crutch to handle LBA addressing on disks >8G. That difference is avoided by using M$'s special 0Fh partition type instead of the usual 05h for the extended table entry. -- ". . . . in everything, do to others what you would have them do to you . . . ." Matthew 7:12 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
<snip>
Swap file placement really depends on how the system will be used. If you have a layout with: /, /home, /application-data set up as partitions, and most of your I/O is going to /application-data, then you probably want to put the swap closer to /application-data. I usually place it between / and /home.
I've seen some defaults where the swap and /boot are defined the primary partitions where /, /home, and other file systems are allocated as logical partitions. Personally, I never allocate primary partitions. I always use logical partitions for everything. Thanks to all. I was beginning to think along the same lines - it depends on your going to use the system. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, May 30, 2008 at 5:14 PM, Duaine & Laura Hechler <dahechler@charter.net> wrote:
Thanks to all. I was beginning to think along the same lines - it depends on your going to use the system.
I generally put swap at the front of the drive because it's easier to calculate the space for the rest of the drive. While there may be a performance hit depending on location, I doubt that it's too excessive. Heck, on my desktop with 2GB RAM, it never even touches the swap anyway. I've been half tempted to just eliminate it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, May 30, 2008 at 2:22 PM, Larry Stotler <larrystotler@gmail.com> wrote:
On Fri, May 30, 2008 at 5:14 PM, Duaine & Laura Hechler <dahechler@charter.net> wrote:
Thanks to all. I was beginning to think along the same lines - it depends on your going to use the system.
I generally put swap at the front of the drive because it's easier to calculate the space for the rest of the drive. While there may be a performance hit depending on location, I doubt that it's too excessive. Heck, on my desktop with 2GB RAM, it never even touches the swap anyway. I've been half tempted to just eliminate it. --
Your choice makes the most sense, do it based on simplicity and spend the time saved figuring out how to scam enough ram to make the whole point moot. Swap doesn't get used all that heavily on a system with enough ram. -- ----------JSA--------- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 30 May 2008 15:21:03 -0700 "John Andersen" <jsamyth@gmail.com> wrote:
On Fri, May 30, 2008 at 2:22 PM, Larry Stotler <larrystotler@gmail.com> wrote:
On Fri, May 30, 2008 at 5:14 PM, Duaine & Laura Hechler <dahechler@charter.net> wrote:
Thanks to all. I was beginning to think along the same lines - it depends on your going to use the system.
I generally put swap at the front of the drive because it's easier to calculate the space for the rest of the drive. While there may be a performance hit depending on location, I doubt that it's too excessive. Heck, on my desktop with 2GB RAM, it never even touches the swap anyway. I've been half tempted to just eliminate it. --
Your choice makes the most sense, do it based on simplicity and spend the time saved figuring out how to scam enough ram to make the whole point moot.
Swap doesn't get used all that heavily on a system with enough ram.
Agreed here. Another option is to use a file instead of a physical partition. While this option is available, I think it is a bad idea. -- -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix PGP key id: 537C5846 PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
Jerry Feldman wrote:
On Fri, 30 May 2008 15:21:03 -0700 "John Andersen" <jsamyth@gmail.com> wrote:
Thanks to all. I was beginning to think along the same lines - it depends on your going to use the system. I generally put swap at the front of the drive because it's easier to calculate the space for the rest of the drive. While there may be a
On Fri, May 30, 2008 at 5:14 PM, Duaine & Laura Hechler <dahechler@charter.net> wrote: performance hit depending on location, I doubt that it's too excessive. Heck, on my desktop with 2GB RAM, it never even touches the swap anyway. I've been half tempted to just eliminate it. -- Your choice makes the most sense, do it based on simplicity and spend the time saved figuring out how to scam enough ram to make
On Fri, May 30, 2008 at 2:22 PM, Larry Stotler <larrystotler@gmail.com> wrote: the whole point moot.
Swap doesn't get used all that heavily on a system with enough ram.
Agreed here. Another option is to use a file instead of a physical partition. While this option is available, I think it is a bad idea.
A very bad idea for primary swap, although I have used swap files for "emergency" swap space. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2008-05-30 at 15:21 -0700, John Andersen wrote:
Swap doesn't get used all that heavily on a system with enough ram.
It is needed for hibernation. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIQU97tTMYHG2NR9URAm9BAJ99pTyk/EmgxzgQkrpKo9JHHYCDbgCeP0J2 yoql4vQ7n03iEr5WMMLsY18= =/sHm -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2008-05-30 at 17:00 -0400, Jerry Feldman wrote:
I've seen some defaults where the swap and /boot are defined the primary partitions where /, /home, and other file systems are allocated as logical partitions. Personally, I never allocate primary partitions. I always use logical partitions for everything.
Then, you should be aware that you have only 11 logical partitions available. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIQHcutTMYHG2NR9URAqQyAJ0Ws3v6b5h8V46kpKu/xaOMeIb3nQCfc9A4 T5vQbOSz9qWu3MSd5yekSHk= =RSek -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 30 May 2008 23:52:45 +0200 (CEST) "Carlos E. R." <robin.listas@telefonica.net> wrote:
The Friday 2008-05-30 at 17:00 -0400, Jerry Feldman wrote:
I've seen some defaults where the swap and /boot are defined the primary partitions where /, /home, and other file systems are allocated as logical partitions. Personally, I never allocate primary partitions. I always use logical partitions for everything.
Then, you should be aware that you have only 11 logical partitions available.
I don't think that is correct. The information that I have is that it is a much larger number. I've seen things like 64 and unlimited. However, I have seen the number 15 (that corresponds to your 11 logicals and 4 primaries), but I would think that it would be more of a power of 2 number. I have also seen 255 used (0 - 255). But, after reading more about the structure of the partition table, I would state there is no limit since the EBR (Extended Boot Record) is a chain. AFAIK, GRUB is limited to 255, but that does not limit the number of data partitions, only root partitions. But, really, anything over a half dozen starts to become unwieldy. Again, IMHO, LVM is more flexible. -- -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix PGP key id: 537C5846 PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2008-05-31 at 08:56 -0400, Jerry Feldman wrote:
Then, you should be aware that you have only 11 logical partitions available.
I don't think that is correct. The information that I have is that it is a much larger number. I've seen things like 64 and unlimited.
Yes, you have seen, past tense. You will not see them in the future, libata does not support them. The disk themselves support unlimited numbers of partitions, but the operating system doesn't. Currently, Linux is more limited in this respect that Windows: you are limited to a total 15 partitions per disk, of which 1..4 are primaries, and 5..15 are logical. Number 0 is the entire disk (that's where 2^4 comes into).
But, really, anything over a half dozen starts to become unwieldy.
Not really. It has its uses.
Again, IMHO, LVM is more flexible.
And some disadvantages. It is not portable, for instance. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIQU85tTMYHG2NR9URAvbqAJ4lHBoj8po/NTm/QSt7THJ/yUlQ6gCgllbo +nqdIHBDr/H78ld72SqcLEY= =dfqh -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 31 May 2008 15:14:33 +0200 (CEST) "Carlos E. R." <robin.listas@telefonica.net> wrote:
Yes, you have seen, past tense. You will not see them in the future, libata does not support them. The disk themselves support unlimited numbers of partitions, but the operating system doesn't. Currently, Linux is more limited in this respect that Windows: you are limited to a total 15 partitions per disk, of which 1..4 are primaries, and 5..15 are logical. Number 0 is the entire disk (that's where 2^4 comes into).
I was thinking in terms of the hardware and partition tables, not Linux device mappings. I stand corrected in that you can only have 15 numbered partitions 1 - 15. And as you mentioned, LVM is not portable. -- -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix PGP key id: 537C5846 PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB CA3B 4607 4319 537C 5846
On 2008/05/31 09:52 (GMT-0400) Jerry Feldman apparently typed:
"Carlos E. R." wrote:
Yes, you have seen, past tense. You will not see them in the future, libata does not support them.
Just because libata does not support them doesn't mean you won't see partitions beyond #15. It has been proposed that libata's next rewrite will exclude the arbitrary SCSI limit. In the meantime, kpartx and device mapper can be used to access them if you can figure out how they work. AFAIK, there are no installers that include this facility.
The disk themselves support unlimited numbers of partitions, but the operating system doesn't. Currently, Linux is more limited in this respect that Windows: you are limited to a total 15 partitions per disk, of which 1..4 are primaries, and 5..15 are logical. Number 0 is the entire disk (that's where 2^4 comes into).
I was thinking in terms of the hardware and partition tables, not Linux device mappings. I stand corrected in that you can only have 15 numbered partitions 1 - 15.
The number usable for filesystems through libata is actually 14. One of 1-4 has to be an extended for any logicals to exist. More than 15 can certainly exist; they just can't be accessed directly via libata.
And as you mentioned, LVM is not portable.
No small limitation for multibooters. -- ". . . . in everything, do to others what you would have them do to you . . . ." Matthew 7:12 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (8)
-
Carlos E. R.
-
Duaine & Laura Hechler
-
Evens Garde
-
Felix Miata
-
Hechler Family
-
Jerry Feldman
-
John Andersen
-
Larry Stotler