LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partition table (https://www.linuxquestions.org/questions/linux-newbie-8/partition-table-936796/)

ac_kumar 03-27-2012 11:07 PM

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 ?

pierre2 03-27-2012 11:27 PM

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)

chrism01 03-27-2012 11:39 PM

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.

ac_kumar 03-28-2012 12:34 AM

What is more good for system speed swap= ram or swap= 2 times of ram ?

catkin 03-28-2012 01:21 AM

Quote:

Originally Posted by ac_kumar (Post 4638357)
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.

kingston 03-28-2012 04:55 AM

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

ac_kumar 03-29-2012 11:23 AM

thanks all of you for your replys.


All times are GMT -5. The time now is 03:28 AM.