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.

Compression in cPanel and WHM

Discussion in 'General Discussion' started by sugarloafar2, Nov 5, 2013.

  1. sugarloafar2

    sugarloafar2 Registered

    Joined:
    Nov 5, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello Everyone,

    Is there anyway to compress the data on the server using WHM/sPanel?

    Thanks,

    Richard Peterson
    - Link Removed -
     
    #1 sugarloafar2, Nov 5, 2013
    Last edited by a moderator: Nov 5, 2013
  2. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Indiana, USA
    If you mean live compression similar to compressing a hard drive - no - not via WHM or cPanel.

    If you mean to make a compressed archive like .tar.gz or .zip - this can be done via the cPanel -> File Manager if you're not comfortable doing it in shell or don't have shell access.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please provide a specific example of the action you would like to take to give us a better idea on what you are attempting to accomplish.

    Thank you.
     
  4. ravi9

    ravi9 Well-Known Member

    Joined:
    Oct 31, 2013
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Website Owner
    I think you want to optimize website by compressing data when they are requested by visitors.
    yes, you can do this from cPanel.

    Code:
    cPanel >> Software/Services >> Optimize Website
    
    Detail: Optimize Website
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    That feature is only available if the original poster's hosting provider has enabled mod_deflate on the system and allowed that feature.

    Thank you.
     
  6. sugarloafar2

    sugarloafar2 Registered

    Joined:
    Nov 5, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Thank you everyone for your input.

    What I am trying to achieve are two things:

    1. Our VPS disk is 85% full and we've just started the site. :mad: So, as new members join the available storage will be used up quickly. We might have no choice but to upgrade to a dual core system with more memory but of course we are trying to optimize what we have.

    2. Reduce server load: Our average server loads seem to be spiking along wide angles (2.14, 1.36, .14)...so I'd like to be able to manage the server load better.

    I will try the optimize suggestion as this seems to be a good choice and easy to implement.

    Thanks again,

    Richard
     
  7. ravi9

    ravi9 Well-Known Member

    Joined:
    Oct 31, 2013
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Website Owner
    If you disk space is filling up quickly, you should check what is taking maximum space.
    Login to your server via SSH and run this command
    Code:
    df -h
    The will show all partition on your server and space used.

    If you want to check what directory is using maximum space, run following command in SSH
    Code:
    cd /
    du -h --max-depth=1
    
    You first step should be to know what is causing server load. In SSH run top command
    Code:
    top
    
     
  8. sugarloafar2

    sugarloafar2 Registered

    Joined:
    Nov 5, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    WOW!

    Thank you so much! This was a great help.

    I found out that the largest amount of space, 8.5GB:eek:, is being taken up from backups. The rest of the storage is minimal.

    So, I want to overwrite the latest backup. In other words, the backups that are happening are being stacked on top of each other instead overwriting each other.

    How can I do that?

    Thanks sooo much, this has been a great experience.

    Richard:)

    - - - Updated - - -

    Here are the results of the "du" command:

    Code:
    login as: root
    root@162.144.xx.xxx's password:
    Access denied
    root@162.144.xx.xxx's password:
    Last login: Thu Nov  7 02:08:53 2013 from 68.231.xx.xxx
    root@cpanel.domain.com [~]# cd /
    root@cpanel.domain.com [/]# du -h --max-depth=1
    8.1G    ./home
    4.0K    ./srv
    16K     ./lost+found
    du: cannot access `./proc/19439/task/19439/fd/4': No such file or directory
    du: cannot access `./proc/19439/task/19439/fdinfo/4': No such file or directory
    du: cannot access `./proc/19439/fd/4': No such file or directory
    du: cannot access `./proc/19439/fdinfo/4': No such file or directory
    0       ./proc
    1.7M    ./root
    436M    ./lib
    27M     ./etc
    89M     ./boot
    0       ./sys
    633M    ./var
    14M     ./sbin
    25M     ./lib64
    7.6M    ./bin
    39M     ./opt
    8.5G    ./backup
    160K    ./dev
    4.0K    ./media
    962K    ./tmp
    4.0K    ./mnt
    4.0K    ./selinux
    4.0K    ./admin
    4.4G    ./usr
    23G     .
    root@cpanel.domain.com [/]# top
    top - 02:23:41 up 4 days,  3:22,  2 users,  load average: 1.17, 1.23, 1.33
    Tasks: 109 total,   1 running, 107 sleeping,   0 stopped,   1 zombie
    Cpu(s):  6.3%us,  3.7%sy,  8.0%ni,  0.0%id, 82.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:   1020568k total,   938000k used,    82568k free,   190728k buffers
    Swap:  4194296k total,   224688k used,  3969608k free,   283940k cached
    What REALLY disturbs me is the "1 zombie".

    I have scanned the entire webspace and found an infected file which I will quarantine, clean, and then reupload.

    As you can see, the largest is the backups area.

    Richard
     
  9. ravi9

    ravi9 Well-Known Member

    Joined:
    Oct 31, 2013
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Website Owner
    As I see, there are two directory that is using maximum space.
    Code:
    /home
    /backup
    
    Clean up unwanted files from home
    1) You may be having full cPanel backup .tar.gz file in /home
    you can safely delete those backup files after you have restored / transferred a website from old server.

    2) There may be many error_log files consuming space. Run following command to delete all error_log files from /home
    Code:
    find /home -type f -name error_log -exec rm -f {} \;
    3) Login in WHM and see which account is using maximum space. Now manually investigate cpanel accounts that is using large space. Many account may be having very old full cPanel backup file.

    You can check disk usage of each account from:
    cPanel >> Files >> Disk Space Usage

    How to solve backup problem
    Backup is very important for every website. You should have maximum number of backup for each website, like:
    daily, weekly and monthly.

    So, its never advised to disabled backup, or save less backup files.
    I will suggest you to get a cheap vps, like 3-5$ with 50GB space and save your backup offsite.
    You can configure your WHM to save backup files on a remote server.
     
    #9 ravi9, Nov 7, 2013
    Last edited: Nov 7, 2013
Loading...

Share This Page