Linux - NewbieThis 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.
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.
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 ?
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.