Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-30-2009, 08:39 AM
|
#1
|
Member
Registered: Nov 2009
Posts: 66
Rep:
|
laptop swap, best placement?
Desktops and exotic laptops aside, with 1 drive in a laptop is there a preferred position for the swap partition?
Looking at some install notes and faqs suggests head left->right:
/boot /swap /home /
what about as last: /boot /home / /swap
some backup imaging tools won't do the swap and this makes a same layout restore onto a fresh or wiped hdd tricky at best. Having swap at end precludes that hassle.
whadya think?
|
|
|
11-30-2009, 08:48 AM
|
#2
|
Member
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778
Rep:
|
Quote:
Originally Posted by skola
Desktops and exotic laptops aside, with 1 drive in a laptop is there a preferred position for the swap partition?
Looking at some install notes and faqs suggests head left->right:
/boot /swap /home /
|
this position makes repartitioning easier, but do we repartition our dist "ever day"? not really and you can safely delete swap and make it again.
maybe it would bring some performance benefites. but linux does not uses much swap.
Quote:
what about as last: /boot /home / /swap
some backup imaging tools won't do the swap and this makes a same layout restore onto a fresh or wiped hdd tricky at best. Having swap at end precludes that hassle.
whadya think?
|
i don't even use boot partition, but it may be needed in some places. use it if you want to.
dd + bzip2 is nice way to do back-up whole disk with partition level. but lilo may not like it. grup would like it.
i use this / swap on same disk /home on different disk.
|
|
|
11-30-2009, 09:10 AM
|
#3
|
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669
|
Quote:
laptop swap, best placement?
Desktops and exotic laptops aside, with 1 drive in a laptop is there a preferred position for the swap partition?
|
Swap can be positioned anywhere, be it primary or logical partition it can do the job. However, to my personal preference, considering hardisk head works I always place Swap drive immediately or near the root drive where most disk read/write traffic occur.
Quote:
Looking at some install notes and faqs suggests head left->right:
/boot /swap /home /
what about as last: /boot /home / /swap
|
Positioning Swap in-between / and /home partitions is wise. (By this you have three successive partitions: Partition1 (Root) + Partition2 (Swap) + Partition3 (/home).
Quote:
some backup imaging tools won't do the swap and this makes a same layout restore onto a fresh or wiped hdd tricky at best. Having swap at end precludes that hassle.
whadya think?
|
You don't need backup your Swap partition, only your system and user data. Having swap at the end of hardisk still works; this is a matter of taste.
Hope this helps.
Good luck.
|
|
|
11-30-2009, 06:48 PM
|
#4
|
Member
Registered: Nov 2009
Posts: 66
Original Poster
Rep:
|
ok fair enough you guys thanks
Sure with enough ram swap isn't accessed much. I'm aware of using 'dd' for pure sector copy and in fact a few tools use that under the surface. Playing with some practice installs I recollect one didn't like a slightly resized layout on a restore where the UUID changed.
Actually, thought of another point and maybe stay in this thread.
Have you had 1 or more extra distros sharing a /swap and would that cause trouble if there had been any suspend and then a normal boot trying to 'resume' ?
sounds like just have a 2nd /swap eh?
Last edited by skola; 11-30-2009 at 06:54 PM.
|
|
|
12-01-2009, 12:43 AM
|
#5
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
Quote:
Originally Posted by skola
ok fair enough you guys thanks
Sure with enough ram swap isn't accessed much. I'm aware of using 'dd' for pure sector copy and in fact a few tools use that under the surface. Playing with some practice installs I recollect one didn't like a slightly resized layout on a restore where the UUID changed.
Actually, thought of another point and maybe stay in this thread.
Have you had 1 or more extra distros sharing a /swap and would that cause trouble if there had been any suspend and then a normal boot trying to 'resume' ?
sounds like just have a 2nd /swap eh?
|
Apart from considerations about re-organising/sizing partitions the "best" placement depends on how much I/O is being done to each partition and that depends on how you use your system so best measure it. If you have enough memory, swap is a seldom-used insurance, so not performance critical.
For suspend to work you must have enough free space in swap to accept the contents of memory plus a little. The only way to guarantee this is to have a separate swap for suspend; presumably it must have enough space to accept the contents of memory plus any used swap space. If resume is to work the contents of swap-for-suspend must be untouched after suspend until resume. For a multi-boot system that implies a swap-for-suspend partition for each bootable OS.
|
|
|
12-01-2009, 07:29 AM
|
#6
|
Member
Registered: Nov 2009
Posts: 66
Original Poster
Rep:
|
ok ta, confirmed my suspicions
|
|
|
All times are GMT -5. The time now is 02:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|