Partition Suggestions Needed

I have a server with 2 x 72 anf 2 x 146 gb sas 15k drives in a hardware RAID1 setup.  System is to run RHEL 5.6, and has 16GB of RAM.  The system is to be used to run a trading application.  Looking for suggestions on the best partitioning for this system

so far i configured the following,

72 gb

101 mb /boot
20 gb /home
6 gb /
7.6 gb tmpfs
32 gb swap

146 gb partition
/data 133 gb

Would like to know if I would be need /usr /var /opt /tmp  and the application will be sitting on the 146 gb partition.

Who is Participating?
/usr /var /opt /tmp can all sit under the 6GB root however, bear in mind the following;

If you are installing lots of applications you may want /usr and perhaps /opt on separate file systems, or increase /
If the system is going to be creating lots of logging information the /var should have it's own partition, in fact this may be a good idea anyway! Size again would depend on use, if you are having a web application that sits on /var/www then that too can have it's own partition.

It's a good idea to have a large enough /tmp partition on it's own IMHO, that way root doesnt fill up if /tmp does...

Really there is no right or wrong, just get as much information as you can about the apps running on the server and take as best guess you can!

mshaikh22Author Commented:
Thank you Jools.  

i think i have also a seprate partition for /root too. do I need that. what does the /usr, /opt, /tmp and /tmpfs  partition do.

/root is the home directory for the root user I ment root as in /, not root as in /root (soz!)

/usr is used for O/S applications it is required but does not have to be a separate partition.

/opt is usually for 3th party apps, again it does not need to be separate but you may find it useful to do this if the apps use lots of space.

/tmp is for temporary storage, it doesnt have to be separate but I always make sure it is.

You want to prevent root ( / ) from filling up.

Whenever I install a system I generally have /, /var, /var/www (if used as a web server) and /tmp separate and I'd give / something like 10GB, /boot is usually on it's own at 150MB, but this really depends on use and can change at any point :-)

As I said, there is no right or wrong and in most cases it's best guess (but add 20% to be sure).
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mshaikh22Author Commented:
I am fixing to install a 3rd party app. So as i got \ partition only which is 10 gb. Should I increase the partition size.

How much should i increase it to.
What does the app do?????
Where does it install to???

You should read and understand the docs for the app first, it'll give you some ideas.
Also, how much disk I/O is there on the system?  Would it be better to build a RAID10 out of the two RAID1 drives?

Similar to the above, I usually put at the very least, a 8-12G / partition, a 4-5G /var partition (to separate the logs out).  /usr/local, /opt, and /home are a lot of times separate partitions for locally installed apps, 3rd party apps, and home directories respectively.  The advantage is that if you are going to reinstall the OS, you can leave these partitions as is and just mount them again in the new install.

What recommendations does the application you will be installing have?  I would guess that it would be in /opt, but you have to check.  That might be a reason to have a separate /opt partition.

There is really no hard and fast rules.  It is part of the "art" of managing linux servers.  Each will have their preferences.
Pieter JordaanSenior Systems Administrator - Web hosting and Network Security.Commented:

I have found that the best way to configure a system like that, is to assign 20 to 40GB to / and half of the remaining size to the data partition, depending on your application requirements.

This way, when you run out of space, you have the option to create another partition from the free space, and assign it to /usr or /var or where ever you need more.
You will have to boot into single user mode to change the fstab and move system partition data, but it is better than running out of space and having no other options.

You /var partition will contain your mysql data and logs, which van grow quite a bit, depending on the application.
The logs can be controlled with logrotate and compression, but mysql can be a problem.

The very best way is to speak to the developers to get the maximum size that will be required to store the mysql database, and application data, then leave the rest as free space.

I hope that helps.
mshaikh22Author Commented:
Thank you, Bitfreeze.

I am thinking about doing the following

Disk 1

72 gb raid 1

100 mb - 150 mb - /boot
10  gb - /
32 - swap
10 gb /home
10 gb /var
should i put the remaining 8 gb to /tmp or tmpfs /dev/shm

146 gb raid 1
/opt - 20 gb  - thats a requirement
/data - 126

Thats whats I am thinking of

any suggestions
Pieter JordaanSenior Systems Administrator - Web hosting and Network Security.Commented:

It is better to leave some free space for the first month or so, and see where the space is needed most.
partitions can be added live, but deleting them will require a reboot in most cases.

I would make / 20GB and keep /home, /var, /tmp and /boot on the / partition for now, and keep the rest free.
Maybe take another 26GB from /data too.

Then monitor /tmp and /var for a while. Those will cause problems when they get full.

Home folders are difficult, and depend on your type of environment.
Will people upload files to their home folders?
Are you going to apply size restriction on the home folders?
How many users will have home folders?
mshaikh22Author Commented:
Thank you, Big Freeze. The server is going to be running a financial application its going accepting message send from the cluster server.

They company im working with, want a 20 gb opt and 120 gb data partition on the 146 drive.


If I have a /tmp drive

do I really need the tmpfs drive

how do i go about creating that from the red hat setup when creating partition layouts

So I have 72 gb to play around with. which has 16 gb of ram

so I am allocating swap 32 gb
/boot - 150 mb
/ - 10 gb
/var - 10 gb
/home - 10 gb
/tmp or tmpfs - 6gb

left 4 gb out

There is absolutely no reason to have that big a swap partition.  At most you would need something like 4GB.  If you get into swapping that much, your server performance is going to crawl.  Swap is used mostly for a desktop machine and only for reliability on a server.  On a server you don't really want to hit the swap partition at all (and some don't even put one on the server).
mshaikh22Author Commented:
What configuration, you recommend.
Pieter JordaanSenior Systems Administrator - Web hosting and Network Security.Commented:
The recommended size of the swap partition, is double the size of your memory.
Actually that is the "old" recommendation that doesn't necessarily hold true anymore, but still gets bantered about.  It was when memory was expensive and memory and disks were small.

The real answer is "it depends" as has been mentioned above and also falls into the "art" of building a linux box.

If you have too much swap, then all you are really doing is wasting disk space, so don't worry about too much.

If you have too little, you will get "out of memory" errors which can be bad.

For a production server, you really should have enough actual memory to not really use swap at all or your performance will suffer.

Some general recommendations:

The amount of swap, added to the amount of memory available, defines the virtual memory available for processes. The minimum recommendation is twice as much swap space as physical memory. Keep in mind, this is an "old" formula. If you have two, three, four or many more gigabytes of physical memory, this would result in way too much swap space. Granted, there are the pathological cases that would require you to have eight to ten gigabytes of swap with, say, four gigabytes of physical memory. If you try to execute a process that would exceed the amount of available memory plus available swap, you will get a "out of memory" message. If you configure more swap than you will ever need, you are wasting disk space. The correct swap size will vary considerably depending on the size and number of application(s) run on a system.

The correct swap size can be determined by monitoring swap usage while working with real data. .... By monitoring the high water mark, you can determine the maximum swap space used and adjust the swap size accordingly. Obviously, if you experience out of memory errors, swap size is too small.

There are many systems with less swap space than physical memory. This is perfectly fine. The person who specified the system probably recommended all that memory so that they would not have to swap! We have seen systems with with swap space equal to 50% that of physical memory.


Some of you, especially the veterans, might know there is this good old formula that suggest swap space size should be at least 1.5 times (some even said 2 times) of the RAM installed.

Nowadays, most of the brand new servers easily come with few tens to hundred gigabytes of RAM installed. Apparently, the required Linux swap file system size will be darn huge if to apply this formula and you wonder is this really needed and justified.

With reference to RHEL 5.5 installation guide, the new study suggests that the amount of swap space needed by a system is much depends on the memory workload running on that system.

This sound reasonable but not practical, as it is not easy to gauge memory workload before the system is running. Thus, the RHEL engineers suggest their own recommended swap space:

    * Min. 2GB of swap space for system installed with 4GB of RAM or less
    * Min. 4GB of swap space for system installed with 4GB to 16GB of RAM
    * Min. 8GB of swap space for system installed with 16GB to 64GB of RAM
    * Min. 16GB of swap space for system installed with 64GB to 256GB of RAM
    * Min. 32GB of swap space for system installed with 256GB to 512GB of RAM

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.