web server partitioning best practices

I need to rebuild a web server because usage has massively increased and presently the 12mb php per script limit is using all of the server's memory at times. the new machine is likely to have 8Gb of RAM

any suggestions as to how the partitioning should change?
df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda7             2.0G  561M  1.4G  30% /
/dev/sda3             190M   20M  161M  11% /boot
none                  989M     0  989M   0% /dev/shm
/dev/sda8            1012M   33M  928M   4% /tmp
/dev/sda5             9.7G  4.5G  4.7G  49% /usr
/dev/sda6             9.7G  977M  8.2G  11% /var
/dev/sda2             2.5G  840M  1.6G  36% /home
/dev/sda10            108G   53G   51G  51% /usr2
/usr2/design          108G   53G   51G  51% /home/design/disk2
                      108G   53G   51G  51% /home/changelife/changelife

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You have just pointed out two very different issues:

1) Your running out of ram
2) You need help with partitioning, which unless your talking about your swap space isn't going to help with your memory problem...

As you are talking about a dedicated webserver without users the simplest and easiest way to partition a server like this is with 4 partitions.

Partition 1: / = 20Gb - The vast majority of the install will be on here.
Partition 2: /var/log = 50Gb+ - Allows you to keep virtually unlimited logs, increase if your generating lots and lots of logs, and consider a seperate disk if you are generating bucket loads of logs.
Partition 3: /var/www (substitute for the location of your web server files) = As big as you need, easily just allocated the rest of the free space.
Partition 4: Swap = 8Gb - This shouldn't be double the amount of ram any more, anything over 2Gb of ram for memory should just be 1:1, according to redhat anyway...

Give me more information if you want more indepth information or recommendations.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael WorshamStaff Infrastructure ArchitectCommented:
I recommend using LVM whenever and whereever at all possible. From a system administration perspective, it just makes it easier to extend logical volume mounts as needed. It also prevents runaway processing from taking down your system if the root filesystem filles up.

All of my systems have the following layout (created via kickstarting):

/dev/sda2              4061572    773784   3078140  21% /
/dev/mapper/vg00-home  1015704    220600    742676  23% /home
/dev/mapper/vg00-tmp   1015704     34108    929168   4% /tmp
/dev/mapper/vg00-usr   4062912   1761360   2091840  46% /usr
/dev/mapper/vg00-opt    507748     19588    461946   5% /opt
/dev/mapper/vg00-var   2031440    346344   1580240  18% /var
/dev/mapper/vg00-web   6192704    177256   5700940   4% /web
/dev/sda1               194442     24676    159727  14% /boot
tmpfs                   513408         0    513408   0% /dev/shm

Open in new window

cjl7freelance for hireCommented:
This is really old-school, normally you wouldn't need that many partitions...

I'd settle for a '/' '/var' and a '/web' and as pointed out leave some space so that you can extend the volumes that need it. (Using LVM is assumed)

Also separating the web-service from the database is a good thing, both are IO-Intense and can easily clobber up a system.

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

for space utilization, I recommend LVM so you could increse the space whenever need. But if you wanna performance and redundency, then go for Raid 5.

Best Luck.
gddl630Author Commented:
thanks WizRd-Linux

the existing machine is also running a very old RHEL version, why is also why we decided to build a new one.

the machine is a web server running the following on Cent OS: Apache / SSL / PHP / MYSQL / FreeTDS - MySQL is barely used the sites are using FreeTDS to access MSSQL server for an in-house built app.

the new machine will be a VM running on ESXv4 so I guess we are relaxed for space, but what is better?
- allocate more space from now and not use LVM;
- or use LVM and expand as needed?
cjl7freelance for hireCommented:
use LVM (all days of the week)!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.