LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 03-27-2012, 11:07 PM   #1
ac_kumar
Member
 
Registered: Aug 2011
Distribution: Ubuntu, Fedora
Posts: 175

Rep: Reputation: 9
Partition table


I want to know what is the ideal partition table for a linux distribution ?
I mean if i have 320 gb hard disk
how much i must assign to:
root
boot
home
swap

do wrong partition table have effect on system speed ?
 
Old 03-27-2012, 11:27 PM   #2
pierre2
Member
 
Registered: May 2009
Location: Perth, AU
Distribution: LinuxMint
Posts: 388
Blog Entries: 9

Rep: Reputation: 88
The answer to this re-occouring question, is very variable . . . . .

root ~ 10Gb
boot - not required
home ~ 100Gb
swap ~ 2Gb

you can have more than one /root ( for more than one O/S )
& a common /home - using different username(s)

Last edited by pierre2; 03-27-2012 at 11:29 PM.
 
Old 03-27-2012, 11:39 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually, the only 2 you have to have are root & swap. Everything else is optional, though possibly a good idea.
Have a search here at LQ for the many times this has been asked and the many variations of answers given.

For what its worth, (given how cheap/large disks are these days) I use swap = RAM or swap = 2GB, whichever is bigger ... your mileage may vary.
It really depends on what you use your system for.

Last edited by chrism01; 03-28-2012 at 07:22 PM.
 
Old 03-28-2012, 12:34 AM   #4
ac_kumar
Member
 
Registered: Aug 2011
Distribution: Ubuntu, Fedora
Posts: 175

Original Poster
Rep: Reputation: 9
What is more good for system speed swap= ram or swap= 2 times of ram ?
 
Old 03-28-2012, 01:21 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by ac_kumar View Post
What is more good for system speed swap= ram or swap= 2 times of ram ?
The swap size needs to be what it needs to be and does not affect system speed. The old guidelines of swap having to be so many times RAM are so rough as to be useless. One of the best ways to determine what you need is to configure swap to file instead of partition and then load your system to the max and see how big the file is -- then set up the swap space a little bigger to be safe. Given the huge size of current HDDs compared with memory you can afford to be generous.

Given the low cost of memory now and the resulting large amounts of memory installed, many systems never swap. In that case there is no need to have any swap -- but not having swap when you need it is very messy and, as above, you probably have plenty of HDD space to spare so why not?

If you plan to use hibernate then the swap must normally be around the same size as the RAM. "Around" because it is compressed and the compression factor cannot be predicted. Assuming the worst case of all RAM in use and compression not reducing the size (very pessimistic) then the swap needs to be a little bigger than the RAM. If the system is using swap when you hibernate then even that will not work and you need a dedicated swap space for hibernating. Exactly what happens when hibernating is not well documented so what I have said is guidelines.
 
Old 03-28-2012, 04:55 AM   #6
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 215
Blog Entries: 1

Rep: Reputation: 21
Hi

Catkin said exactly how we should handle swap in the "now a days" linux servers. Once the RAM size cross the 2GB mark in the servers, it is not advisable to double the ram to configure swap and it is not necessary to have a equal ram size swap too. In my working place, i never configured swap more than 8 GB for the servers which has RAM of 16GB, 32GB and 64GB repectively.

Even though i observe 100% RAM utilization most of the times, SWAP utilization never touched 1 GB Mark in my case.

As for as the partition table is concerned,
/
swap
/boot is good enough to install Linux. But this partition table configuration is mainly depends on the role the server is going to play. If you feel your application will create lot of temp files and variables, then creating a standalone partion for /var and /tmp would be good. So i would recommend to go for the following configuration
/boot - 100MB
/ - 20GB
swap - 8GB (max)
/tmp - 10GB
/var - 10GB
/usr - 30GB (As it holds the application, give some more place to /usr)
/home - Rest
 
Old 03-29-2012, 11:23 AM   #7
ac_kumar
Member
 
Registered: Aug 2011
Distribution: Ubuntu, Fedora
Posts: 175

Original Poster
Rep: Reputation: 9
thanks all of you for your replys.
 
  


Reply



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
USB flash disk partition disappeared as well as partition table openmind Linux - Newbie 3 02-17-2011 05:20 PM
cloning linux partition to different laptop, invalid partition table dsollen Linux - Software 8 11-23-2009 08:50 PM
"No partition table or unknown signature on partition table" 10.1 install madcow007 Slackware 4 02-09-2009 11:04 AM
openSolaris hosed the partition table. Why? Changing primary to secondary partition? JZL240I-U Solaris / OpenSolaris 9 10-16-2008 10:48 AM
Slack 10: S-ATA = "No partition table or unknown signature on partition table"? dissolved soul Slackware - Installation 11 08-05-2004 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:12 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