Solved

Partition Suggestions Needed

Posted on 2011-03-09
14
643 Views
Last Modified: 2012-05-11
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.

0
Comment
Question by:mshaikh22
  • 5
  • 3
  • 3
  • +1
14 Comments
 
LVL 19

Accepted Solution

by:
jools earned 251 total points
Comment Utility
/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!

Jools
0
 

Author Comment

by:mshaikh22
Comment Utility
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.

0
 
LVL 19

Assisted Solution

by:jools
jools earned 251 total points
Comment Utility
/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).
0
 

Author Comment

by:mshaikh22
Comment Utility
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.
0
 
LVL 19

Assisted Solution

by:jools
jools earned 251 total points
Comment Utility
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.
0
 
LVL 12

Expert Comment

by:mccracky
Comment Utility
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.
0
 
LVL 11

Assisted Solution

by:Pieter Jordaan
Pieter Jordaan earned 166 total points
Comment Utility
Hi

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.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:mshaikh22
Comment Utility
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
0
 
LVL 11

Assisted Solution

by:Pieter Jordaan
Pieter Jordaan earned 166 total points
Comment Utility

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?
0
 

Author Comment

by:mshaikh22
Comment Utility
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.

Question

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

0
 
LVL 12

Expert Comment

by:mccracky
Comment Utility
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).
0
 

Author Comment

by:mshaikh22
Comment Utility
What configuration, you recommend.
0
 
LVL 11

Expert Comment

by:Pieter Jordaan
Comment Utility
The recommended size of the swap partition, is double the size of your memory.
0
 
LVL 12

Assisted Solution

by:mccracky
mccracky earned 83 total points
Comment Utility
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.

Also:

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

References:
http://docs.hp.com/en/1219/tuningwp.html#swap
http://www.walkernews.net/2010/05/02/red-hat-enterprise-linux-swap-size-recommendation/
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now