LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 11-11-2009, 06:53 AM   #1
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Rep: Reputation: 15
Root and Swap Partitioning


Usually I just do the default partitioning set-up but I'm going to be doing a fresh install of openSUSE 11.2 soon and want to set it up manually.

This is on my laptop and I have 4GB of RAM so I was just going to match that size for the swap partition...that reasonable?

Do I need to partition two more times for the / (root) partition and the /home partition? or can I just do the / partition for the remainder of the hdd space and that would include my /home in it?

If I do separate into 3 partitions (swap, / , /home), how large should I make the root one? I'm not sure what goes to that... installed applications in the desktop? what about programs running in wine?

Thanks

- Chris
 
Old 11-11-2009, 07:13 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
This is on my laptop and I have 4GB of RAM so I was just going to match that size for the swap partition...that reasonable?
That would be a waste of space. With 4GB of RAM, I've never given swap more than 2GB.
Quote:
Do I need to partition two more times for the / (root) partition and the /home partition? or can I just do the / partition for the remainder of the hdd space and that would include my /home in it?
If you just specify /, it will include your home partition. It's always a good idea to have a separate /home partition.

Quote:
If I do separate into 3 partitions (swap, / , /home), how large should I make the root one? I'm not sure what goes to that... installed applications in the desktop? what about programs running in wine?
I've never made my / partition bigger than 15-20GB. It should be enough for your home use. You can read about the contents of the root partition (/) here.

When it comes to wine, the default installation directory is /home/username/.wine/Program\ Files/
So if you plan to install a lot of windows games, etc. make sure it's big enough. Or you can always manually specify the directory that wine is supposed to use.

HTH
 
Old 11-11-2009, 07:49 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by CT_0000 View Post
This is on my laptop and I have 4GB of RAM so I was just going to match that size for the swap partition...that reasonable?
Depends on what you run on that system.

Are you using 32 bit Linux or 64 bit?

I assume on a laptop you aren't running large, usually idle, background services. Those would be one reason for large swap space.

In a 64 bit system, there might be some video editing or similar (by memory use) applications that would need large swap space. In 32 bit, that is less likely.

Will you be using suspend to disk? I'm not sure what parts of ram need to be moved to swap for suspend. I think it should be designed so only pages with no other backing go into swap for suspend, which wouldn't significantly increase your required swap size. But I don't use it and I'm not sure it is designed correctly.

Probably 4GB is more than you need, so if you have better use for some of that disk space, you might want to cut it. But maybe 4GB is less than you need for some very untypical use of a 4GB ram laptop. I don't know how you will be using that system.

Quote:
can I just do the / partition for the remainder of the hdd space and that would include my /home in it?
That will probably be easiest and best for the current install. Whether it is better or worse from the point of view of preparing for some future partial reinstall (for upgrade) is a complex question. I would suggest the single / partition including /home

Last edited by johnsfine; 11-11-2009 at 07:54 AM.
 
Old 11-11-2009, 08:06 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
If you suspend to disk, I would personally make the swap 4GB. I have allocated 20GB for my root partition and after 3 years it's at about 20% used; this is including all updates and upgrades and some extra installed software. And I use the rest of my disk for my home partition (80GB).
 
Old 11-11-2009, 08:35 AM   #5
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Original Poster
Rep: Reputation: 15
It's a 320GB HDD so I don't mind 2GB swap vs 4GB. Its a 64-Bit version that is going to be running. I will be using the suspend / hibernate functions on the laptop. Suspend will use less memory while hibernate will use more memory but almost no battery life right?

I could make a separate /home and root partition but wouldn't just making a root partition of the remaining hdd space include everything on my system and extend the life of the hdd? (I read somewhere that partitioning less will help with that).
 
Old 11-11-2009, 08:39 AM   #6
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Original Poster
Rep: Reputation: 15
I guess I did not really know the advantages of having a separate /home partition but just found a list and find it very advantageous.

So on a 320GB hdd, that really only houses games and music, would a 4GB Swap, 20GB root, and remainder /home seem good? I rather partition more to swap and root just to be safe than not enough at all.
 
Old 11-11-2009, 09:29 AM   #7
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by CT_0000 View Post
Usually I just do the default partitioning set-up but I'm going to be doing a fresh install of openSUSE 11.2 soon and want to set it up manually.

This is on my laptop and I have 4GB of RAM so I was just going to match that size for the swap partition...that reasonable?

Do I need to partition two more times for the / (root) partition and the /home partition? or can I just do the / partition for the remainder of the hdd space and that would include my /home in it?

If I do separate into 3 partitions (swap, / , /home), how large should I make the root one? I'm not sure what goes to that... installed applications in the desktop? what about programs running in wine?

Thanks

- Chris
Hi chris,you have enough RAM,so you dont need to make SWAP ,as its complete waste of space for you.

You should give more space to /home ,/ need not to be more.
 
Old 11-11-2009, 10:22 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by CT_0000 View Post
I guess I did not really know the advantages of having a separate /home partition but just found a list and find it very advantageous.

So on a 320GB hdd, that really only houses games and music, would a 4GB Swap, 20GB root, and remainder /home seem good? I rather partition more to swap and root just to be safe than not enough at all.
If you want to be really safe you need a separate swap space for hibernating, to be sure it has enough space for the memory contents even when the system has paged out some to swap.

If you plan on running more than one distro (or may want to pilot a same-distro upgrade before committing to it) you might also like to have a separate /boot for all OSes to share and leave space for each OS' root.
 
Old 11-11-2009, 10:55 AM   #9
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Original Poster
Rep: Reputation: 15
I'm not really going to pilot any distro's. If I test any before committing I would use a live cd to load it without making any changes. Would I need a separate /boot for that?
 
Old 11-11-2009, 12:51 PM   #10
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Live CDs live on their own and will not affect the installed OS.

Quote:
Hi chris,you have enough RAM,so you dont need to make SWAP ,as its complete waste of space for you.
Not when you use suspend to disk.
 
Old 11-11-2009, 12:53 PM   #11
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Original Poster
Rep: Reputation: 15
That's what I thought, alright Thanks!
 
Old 11-11-2009, 01:14 PM   #12
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by CT_0000 View Post
I'm not really going to pilot any distro's. If I test any before committing I would use a live cd to load it without making any changes. Would I need a separate /boot for that?
No. A live CD does not use the file systems although it will make them available (as long as it supports the particular file system types such as ext3 etc.). But is booting a live CD sufficient assessment of a new OS?
 
Old 11-11-2009, 01:17 PM   #13
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
In a 64 bit system, there might be some video editing or similar (by memory use) applications that would need large swap space. In 32 bit, that is less likely.
Why is that? Why would it be less likely on a 32-bit system?
 
Old 11-11-2009, 01:18 PM   #14
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
If you are going to hibernate a lot, I would have a swap of a little larger than the amount of ram in the system (with 4GB of ram I would have a 5GB swap). A lot of the goofiness that occurs with hibernating just goes away when you do this.

Discounting hibernating, the amount of swap you need is highly dependent on what you are using the machine for. IF you deal with a lot of large files (video/photo/etc) swap can be of real importance. If you keep a lot of applications up all the time it can also help a lot. If you are just doing WP and general browsing then you do not need much/any swap.

IF you are going to (or even may) run VMware (or other VM) I would bump your / partition up to 30GB. My system is using 23/30GB but VMware is 11GB of that.

Remember, if you get a couple of months down the road and discover that you never use any swap, it is fairly trivial to shut swap off and recover the disk space. The reverse (adding more swap later) is a far more complicated task.
 
Old 11-11-2009, 01:34 PM   #15
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by sycamorex View Post
Why is that? Why would it be less likely on a 32-bit system?
A number of video editing programs have fallback strategies for when they are trying to work on more data than the virtual address limits of 32 bit allow. So they may automatically select a strategy that uses less memory and more file I/O.

In 64 bit, there is no practical limit on virtual memory size (there are limits, but they are higher than "practical" limits). It is more efficient to use virtual memory, even if that forces the kernel to page the running application to the swap partition, then to have the application itself manage some kind of pseudo paging by file I/O.

If a program is trying to use memory that heavily, but you don't have enough swap space, then depending on how the program is coded, the program might fall back to a less efficient mode or the kernel might cause that program or some unrelated process to fail due to lack of memory.

I don't think the issue I just described is common yet. I think it will become more common as more developers get used to working on 64 bit systems and taking advantage of the opportunities of 64 bit. For quite a long time, good developers ought to preserve the ability of those programs to run slower (and need less swap space) on 32 bit systems. The 32 bit system doesn't give the same opportunity to run faster by using more swap (vs. file I/O).
 
  


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
best way of partitioning + huge swap file WingZero Linux - Newbie 3 09-23-2009 11:08 AM
Ubuntu AMD64 8.10 - Swap Partitioning dtla1730 Linux - Newbie 2 01-18-2009 03:47 PM
Swap partitioning of hard drive @er<> Mandriva 1 11-17-2006 08:41 PM
hard disk partitioning swap partition sasqpodalian Linux - Hardware 1 09-12-2006 06:26 PM
Partitioning hangs and blames swap paxmark Ubuntu 1 05-04-2005 01:46 PM


All times are GMT -5. The time now is 02:09 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration