----- Original Message ----- From: "June G. Gonzales" <[EMAIL PROTECTED]> To: "'The Main Philippine Linux Users' Group (PLUG) Discussion List'" <[email protected]>
Sent: Thursday, September 29, 2005 9:30 PM
Subject: [plug] good partitioning practice


Hi,

What should I observe when partitioning a HD?

What are the correct sizes for each partition?

Is there a certain percentage that I should a lot for a specific partition
on HD of XX Gig.

For example I have a 20 Gig HD.

basically you need at least 5 partitions and these are:

1. /
2. /var
3. /tmp
4. /usr
5. swap

the size of each partition depends on what you are trying to do or what services you are planning to run on it...

the root "/" partition is the catch all partition once there is a directory that is not being partition... the root partition usually in a fix size and doesnt grow its disk usage in order to protect from disk full because this is the most sensitive partition of all partitions...

/var partition is where usually the logs, print spoolers, mailboxes, etc are stored... it is partition to avoid disrupting the entire system when there is a misconfigured or filling the entire /var partition....

/tmp partition is where usually programs creating a temporary files..... it is partition to avoid also disrupting the entire system due to disk full also when programs were not properly clean its temporary files upon exit or abnormal termination...

/usr partition is where usually programs, user's home directories and future addtional programs are stored... this is the biggest disk space allocation of all partitions (usually the rest of disk space)...

swap partition is where usually paging and swapping are using it.... the two are the same by moving the process to and from the disk but differ on the amount of move.... swapping is moving the entire process to and from the disk while paging is only moving page by page.... the size of swap partitions depends on your ram and the services you are running.... basically, if you have small amount of ram you have to allocate more swap space because once your ram is filled up... it is started swapping those idle processes to swap space and give more ram to the active and agressive ram hunger process... if you have more ram and those processes are not idle all the time... you can allocate less swap space... one good example where you have huge ram but you allocate more swap space where you have lots of students remote access your server and idleing most of the time... it is worth noting that once you see there is swap space used... it clearly indicates that you are running of memory unless there is a process that was doing a memory leak.. a memory leak where a process always allocating a memory and forgot to free it for the rest of its running time...

if you notice that i didnt mention any actual partition size.. it is up to you to experiment what size is best fit for that particular partition for a given system...

furthermore, some notes for you to ponder with....

1. you can create a /boot partition that allocated below 1024 cylinder if you have older bios that cannot read partition above 1024 cylinder.. this partition is where your kernel file stored for boot up... 2. outer cylinder is faster to access both for read and write compare to the inner cylinder (track 0)... therefore move your heavy disk i/o partition to the outer cylinder and less disk i/o partition to the inner cylinder.. 3. if you have multiple physical disk... spread your swap partition across it... if you can stripe it (eg. raid 0, 0 + 1) move your other partition there.. 4. if you forgot to partition something for example /home and needs bigger space because it belongs to root "/" partition... use softlink to your bigger partition.. eg. ln -s /usr/home /home ..... same true with /var/tmp where you softlink it to /tmp partition... take note that linux has a bug on stat(2) function call on symbolic links and i dont know if they are already fix that bug... 5. every applications have different requirement on its disk i/o speed.... for example, proxy cache average file is 11kb while databases are bigger.. try to experiment and tune the partition blocksize, bytes per inode and cylinders per group for maximum performance... 6. use the proper filesystem... for example, if you have terabytes storage.... you have no where to go but to use journaling filesystem... under this filesystem, the recovery time is pretty much faster than the non-journaled filesystem when trouble comes...

fooler.



_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to