First cPanel Server: OS and Partitioning

eglow

Registered
Jun 11, 2006
2
0
151
Hello all,

I am planning the configuration of a server that will run cPanel with the following specifications:

1 Pentium Dual Core Processor 3.0GHz
2 250GB SATA HDs (HW RAID 1)
2 GB Memory

I have three questions:

1) Because of the Pentium Dual Core chip, I can run a 64 bit OS, w/an SMP kernel. I currently have CentOS 4.3 x86_64 installed which runs fine. When I rebuild the server, I plan on using the same OS however, should I just install a minimal server and then install cPanel on top of that minimal install? By minimal, I mean selecting that option in the CentOS install which gives a minimum server installation. I want to keep this locked down as possible.

2) Does anyone have any recommendations for partitioning a 250GB disk? The example I found in the cPanel documentation is based on a small disk size. I will probably just partition 200GB of the drive, use LVM, and leave 50GB for future growth so that the filesystems can be increased online. I'd like to partition out /tmp at 1GB so that I can set noexec on it. Other than that, should it all go in / or is better to separate /var & /usr & /home. Anyone have a layout for a 200-250GB disk that has worked well after awhile in production?

3) The server has 2GB of memory, so was planning on a 4GB swap partition. However, is it necessary to grow the swap past 2GB on a server such as this?

Sorry for all of the questions. The server will be co-located soon and I'd like to get it configured correctly for the installation. Thanks for any help!

Regards,
Tom
 

garrettp

Well-Known Member
PartnerNOC
Jun 18, 2004
312
1
166
cPanel Access Level
DataCenter Provider
Hey,

1) When installing (most) OSes for use with cPanel, it is in your best interest to deselect every package for the most minimal install. Of course basic things such as a C-based compiler and an update mechanism should be installed, but (most) OS installs do not get into that much detail, including CentOS. Any outstanding dependency issues should be solved by the cPanel installer or a quick run of your servers update mechanism (which in your case would be yum). If you're unsure, just take caution not to install any webservers, mail servers, database servers or anything of the like as cPanel does all of this for you and doing so could quite possibly bork your cPanel install before it's even up and running.

2) Generally, I do it by percentages, with an 80GB drive as a base. So with an 80GB drive I typically do:

/boot 200MB (leaves room to store a few previous kernels)
/var 10-12GB (more or less depending on MySQL and logs)
/usr 10-12GB (more or less depending on Apache logs, etc.)
/tmp 1GB
swap (depends on RAM, see below)
/ ~8GB
/home (fill to rest of available space)

Your drive is roughly three times the size, so you can pretty much scale those all by a factor of three. If you have a good idea what is stored where and what your usage will look like, you could perhaps decrease the size of the /var parition and allow more room on /home, for example.

3) 4GB is probably a little overkill, I'd say you'd be safe keeping it around 2GB.
 
Last edited:

eglow

Registered
Jun 11, 2006
2
0
151
Thank you so much for the informative reply! I have had some experience installing Plesk, and it seems to run the same way. Keep the OS install at an absolute minimum and let the control panel install what it wants/needs. I am happy that cPanel supports so many OS's now. Seems that all new chips are starting to have 64 bit capability, may as well take advantage of that.

Thanks for the partitioning layout, I understand that it is a bit of personal preference and gets customized to unique environments, was just looking for a starting point, and that should work fine.

Will keep swap at 2GB. I'll leave a good 50GB or so unallocated on the disk for future growth if anything does get filled up. LVM in Linux is a nice thing. I've used it with HP-UX for many years. Makes life easy when working with FS's.

Thanks again for all of the help.

Regards,
Tom
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Running 64bit Linux is not a good idea. It has a lot of library problems, especially with perl modules and really isn't suitable yet. If you don't mind having things break and having to hunt around for a fix, then go for it - but you're unlikely to see any difference in speed compared to the 32bit version of the OS at all since the 64bit OS is simply a recompile of the 32 bit one without any significant optimisation.
 

WEB-PROS

Well-Known Member
Feb 19, 2006
110
0
166
Also as Cpanel and most of the system that it runs on is not designed for 64bit then it will not make much of a speed difference. Safer to stick with 32 BIT.
 

garrettp

Well-Known Member
PartnerNOC
Jun 18, 2004
312
1
166
cPanel Access Level
DataCenter Provider
eglow said:
Thank you so much for the informative reply! I have had some experience installing Plesk, and it seems to run the same way. Keep the OS install at an absolute minimum and let the control panel install what it wants/needs. I am happy that cPanel supports so many OS's now. Seems that all new chips are starting to have 64 bit capability, may as well take advantage of that.

Thanks for the partitioning layout, I understand that it is a bit of personal preference and gets customized to unique environments, was just looking for a starting point, and that should work fine.

Will keep swap at 2GB. I'll leave a good 50GB or so unallocated on the disk for future growth if anything does get filled up. LVM in Linux is a nice thing. I've used it with HP-UX for many years. Makes life easy when working with FS's.

Thanks again for all of the help.

Regards,
Tom

I guess I missed that you were running a 64bit OS. As mentioned previously, cPanel doesn't play well with 64bit OSes, so you'll want to stick to the good 'ol 32bit distros. Although do keep in mind you WILL want to use an SMP kernel, in order to take advantage of both cores.
 

isputra

Well-Known Member
May 3, 2003
574
0
166
Mbelitar
No Swap partition

Hi,

Is there any disadvantage if my server don't have swap partition ?

My Hardware :
Processor #1 Vendor: GenuineIntel
Processor #1 Name: Intel(R) Pentium(R) 4 CPU 3.20GHz
Processor #1 speed: 2397.194 MHz
Processor #1 cache size: 2048 KB
Memory: 1026528k/1040320k available

Current Memory Usage

total used free shared buffers cached
Mem: 1027552 994384 33168 0 57360 275792
-/+ buffers/cache: 661232 366320
Swap: 0 0 0
Total: 1027552 994384 33168

Disk Usage :
Filesystem Size Used Avail Use% Mounted on
/dev/hda6 2.0G 364M 1.6G 20% /
/dev/hdc1 74G 19G 52G 27% /backup
/dev/hda1 99M 12M 83M 12% /boot
none 502M 0 502M 0% /dev/shm
/dev/hda8 116G 7.6G 102G 7% /home
/dev/hda5 2.0G 69M 1.9G 4% /tmp
/dev/hda3 9.9G 3.6G 5.8G 39% /usr
/dev/hda2 20G 1.7G 17G 10% /var
/tmp 2.0G 69M 1.9G 4% /var/tmp

Using cPanel 11 with Centos 4.5 and kernel Linux 2.6.9-42.0.10.EL #1

Please advise me.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
The disadvantages of not having a swap file can be very significant when it comes to server performance and stability, regardless of how much RAM there is in a server. You should always have a significant swap file at the beginning of a disk. Try searching the web for what a swap file is and what it is used for:
http://en.wikipedia.org/wiki/Virtual_memory
 

isputra

Well-Known Member
May 3, 2003
574
0
166
Mbelitar
The disadvantages of not having a swap file can be very significant when it comes to server performance and stability, regardless of how much RAM there is in a server. You should always have a significant swap file at the beginning of a disk. Try searching the web for what a swap file is and what it is used for:
http://en.wikipedia.org/wiki/Virtual_memory
Thanks chirpy. My DC already help me to setup swap partition on my server.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Running 64bit Linux is not a good idea. It has a lot of library problems, especially with perl modules and really isn't suitable yet. If you don't mind having things break and having to hunt around for a fix, then go for it - but you're unlikely to see any difference in speed compared to the 32bit version of the OS at all since the 64bit OS is simply a recompile of the 32 bit one without any significant optimization.
I disagree with Chirpy and the others who commented on this particular item in this thread ...

Running 64 bit when you can will in fact give you more performance and is generally
a good idea when running dual core processors ...

In the earlier installs with 64 bit getting off the ground initially, there were actually a lot of
problems with missing libraries and other problems but all of that is pretty much resolved
now and you really don't run into much of those issues anymore.

CentOS v4.5 seems to be the most consistently reliable of the 64 bit platforms with Cpanel
and is the platform I would go with if you have a newer processor supporting 64 bit.
 

garrettp

Well-Known Member
PartnerNOC
Jun 18, 2004
312
1
166
cPanel Access Level
DataCenter Provider
I disagree with Chirpy and the others who commented on this particular item in this thread ...

Running 64 bit when you can will in fact give you more performance and is generally
a good idea when running dual core processors ...

In the earlier installs with 64 bit getting off the ground initially, there were actually a lot of
problems with missing libraries and other problems but all of that is pretty much resolved
now and you really don't run into much of those issues anymore.

CentOS v4.5 seems to be the most consistently reliable of the 64 bit platforms with Cpanel
and is the platform I would go with if you have a newer processor supporting 64 bit.
Note that the comments made previously about 64-bit OSes and cPanel were posted well over a year ago. A lot has changed since then.