The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Partitioning for cpanel and MySQL setup ?

Discussion in 'General Discussion' started by fuzioneer, Jan 15, 2010.

  1. fuzioneer

    fuzioneer Well-Known Member

    Joined:
    Dec 12, 2003
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    I am starting out on research for a new server build to replace our existing server, I want to go for an optimum setup for a large community forum site running on LAMP

    atm we have a very simple partition layout and i think this has caused performance issues / bottlenecks in the past

    The server we are looking at is a Dual 1TB HD setup with RAID 1 if required, it will have either 8GB or 12GB of RAM

    our exiting setup is mirrored and has a /backup partition where the nightly cpanel backups go (They are then rsynced off to another server in another datacentre nightly for redundancy)

    There is only one site on it (its a dedicated server btw)

    The site does grow in size daily (photo galleries, uploaded content etc)

    The database is hammered 24hrs a day so that again is a consideration

    So my questions are based on the info above what partition layout would give us optimum performance speed ?
     
  2. fuzioneer

    fuzioneer Well-Known Member

    Joined:
    Dec 12, 2003
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    did a bit of digging and looks like this is the sort of thing i should be looking at

    /home
    /var - mySQL/Log files
    /tmp
    /usr
    /boot
    /
    /backup


    cPanel recommendations afaik are:-
    1 GB /
    50 MB /boot
    1 GB /tmp
    10 GB /usr
    7 GB /var
    1 GB swap (swap should be 2x RAM)

    Remaining space to /home

    so based on all of the above what about:

    1 GB /
    50 MB /boot
    2 GB /tmp
    10 GB /usr
    7 GB /var
    150GB /backup
    8 GB swap (Now I will have 8 or 12GB RAM but i don't really see the need for 16 or 24GB Swap or should I ?)
    Remaining space to /home (800gb+)

    does this look ok to the gurus out there, or is there anything I am missing ?
     
  3. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Go for the following partition scheme:

    / = 5GB
    /boot = 500MB
    /tmp = 2GB
    /swap = double the RAM
    /usr = 15GB
    /var = 15GB
    /home = 750GB
    /backup = remaining space

    Both /var and /usr store log files so it's better to have more disk space.
    If you are looking for 8 or 12GB RAM, then it's ok to have swap space same as RAM size.
     
  4. xerophyte

    xerophyte Well-Known Member

    Joined:
    Mar 16, 2003
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    your partition scheme seem fine, but if you have huge database content you might want to increase the var partition accordingly. Swap can be around 2G. If you are swapping get more ram.


    I don't think partitioning give you much a different when it comes to IO performance. But disk type and RAID 10 will give you more performance
     
  5. ModServ

    ModServ Well-Known Member

    Joined:
    Oct 17, 2006
    Messages:
    332
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    Hello,

    From my experience of webhosting for 3 years, The best scheme is:
    /boot = 100MB
    /swap = The Double the RAM amount (If the RAM was 8GB then the swap shall be 16GB)
    /tmp = about 2GB or 4GB
    /backup = As you wish
    / = rest of the space

    Note: Don't ever limit a space to /var partition as you will face in the future the problem of /var disk full !

    Thanks,
     
  6. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    15GB of var partition is fine and will be enough if the logs under it are regularly rotated.
     
  7. ModServ

    ModServ Well-Known Member

    Joined:
    Oct 17, 2006
    Messages:
    332
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    I disagree with madaboutlinux as you will and must reach a time that you in need of increasing the var, As your community is increasing also the space needed is more. My opinion is to avoid future problems, In other words "Looking to far future".
     
  8. TechBrein

    TechBrein Member

    Joined:
    Jul 31, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Since yours is a server mainly dedicated for a community forum, I would suggest the following partitioning setup:

    / - 5G
    /boot - 200M
    /tmp - 5G
    /usr - 20G
    /var - 100G
    swap - 8G
    /home - 500G
    rest (300G) can be partitioned and mounted as /spare which you can use appropriately in the future.

    There's no point to have /backup in the same drive. Get another drive of same size for /backup. It's a MUST, not luxury.

    As someone stated above, partitioning won't affect I/O performance. But it would surely affect the filesystem performance. And cpanel backup is not suitable for you (I guess your account size is huge, incl. DB), try an alternative method.
     
    #8 TechBrein, Jan 17, 2010
    Last edited: Jan 17, 2010
Loading...

Share This Page