1. Home
  2. Knowledge Base
  3. WHM & cPanel
  4. Managing Server Resources in WHM

Managing Server Resources in WHM

When utilizing a CloudByIX server users must be aware that there is a limited amount of disk space on the server so active monitoring of the disk usage and periodic cleanup of certain data in the system is necessary to ensure the server’s health and stability. There are areas in the WHM panel that will allow the user to view the disk usage as well as tweak the log and backup configurations to avoid unnecessary overuse and duplication of data.

Checking the disk usage on the server:

To check the current disk usage on the server first type disk into the search bar in the upper left hand corner of the WHMpanel. Then click on the Show Current Disk Usage link:

searchdisk

It will bring up the following screen showing the partitions on the server and their usage. In this example there are 3 partitions; the boot partition, the primary partition, and a temp partition. All 3 of which currently have ample disk space available:

diskusage

Checking disk usage for specific domains:

In most instances it is usually a specific domain that will begin using exorbitant amounts of disk space either as a result of mail data being stored on the server, or in the cases of larger sites that contain a lot of digital media or host large databases. To check the disk usage on a per account basis type list into the search bar in the upper left hand corner of theWHM panel. Then click List Accounts:

searchlist

In this example there is only one domain on the test server, but in most cases multiple domains will be shown in the accounts list. The amount of disk usage for each domain will be shown in the 9th column from the left:

accountdiskusage

The specific cPanel for the domain will give a much more detailed breakdown of where specifically the data is at on the account. To access the cPanel for the domain click the CP link in the second column:

cpanelclicklink

Once in the cPanel for the domain the user can click on the Disk Space Usage icon in the Files section of the panel:

cpaneldiskspacelink

This will bring up the following screen which breaks down the specific areas of the account where the most disk space is being used:

accountspecificdiskusage

At the bottom of this page there is an interactive file tree that can sort the largest directories by size and allow the user to navigate the entire file structure to see where the most space is being used up:

accountspecificdiskusage1

Click the radio button for Disk Usage to sort the sort the files and directories by size. The + can be clicked to expand directories within the structure to investigate particular parts of the account’s structure. If the user clicks the directory thecPanel file manager will open up in a separate tab allowing them to analyze the files in the directory and remove unnecessary content as needed:

filetreediskusagecpanel

Checking the disk usage for mail:

In the cPanel the user can also view the size of each of the domain’s mail accounts by clicking the Email Accounts icon in the Mail section:

cpanelmailaccounts

The next screen will list the accounts and their disk usage:

emailaccountscpanel

If user’s accounts are taking up a high volume of disk space suggest that they delete some older messages or use a mail client to connect via POP to download their email data and archive it locally.

Disabling user backups to prevent overuse of resources:

Depending on the nature of the site hosted on a server and how the quotas are set it is generally a good idea to run backups as the server administrator and to disable user initiated backups to preserve available disk space and prevent server load spikes. To disable user backups type feature into the search bar in the upper left hand corner of the WHM panel. Then click on Feature Manager:

cpaneldisableuserbackups

On the next screen click the Edit button in the Manage feature list section of the page:

cpaneleditfeaturelist

In the Feature Manager un-check the Backup Manager option and then scroll down and click Save to save the changes:

disablefeaturemanager

Configuring Server Level Backups:

Another major culprit in excessive disk space usage is improperly configured account backups at the server level. By default these backups are not enabled so it’s a good idea to enable and configure these to protect user’s data, but the server administrator must keep in mind that the backups can fill the server very quickly if not properly configured to rotate the older backups and replace them with the newest ones. To access the backup configuration type backup into the search bar in the upper left hand corner of the WHM panel. Then click Backup Configuration:

backupsearch

Global Settings:

This screen is where various options for backups can be configured. To enable the backup system click the Enable radio button:

backupglobalsettings

The remaining default options should be sufficient, though administrators are free to set these as they see fit based on their preferences.

Scheduling and Retention:

Proper scheduling and retention configuration are the most vital aspects to configuring the backups in a manner that does not overuse the server’s resources. By default the system will set 4 daily backups with 5 layers of retention which is very excessive in terms of server resource consumption. The weekly and monthly backups are also excessive if enabled:

backupretentiondefault

Our recommendation is to use the weekly backups to do a single backup of accounts one day a week with a single retention layer:

backupreccomended

Files:

Once the backups have been scheduled the user accounts and the content to be included in the backup will need to be selected as well. The content selections are generally ok with the default settings but the administrator must enable backups on specific accounts or only system files will be retained in the backup. To select accounts to be included in the backup click the Select Users button in this panel:

backupfiles

This will bring up another window/tab with the user selection table:

backupuserselectionoff

To enable the backups on a user account click the OFF switch which will change the option to ON and turn it blue:

backupuserselectionon

The default settings for the Databases, the Backup Directory, and Additional Destinations can be left at their default values unless there are plans to backup to an additional drive or remote network which is generally not the case when configuring backups on cPanel servers. To save the backup configuration click Save Configuration.

Setting log rotation benchmarks:

Almost everything in cPanel is logged into a file somewhere and sometimes these files can grow to very large sizes and take up unnecessary disk space. There are log rotation settings in WHM that allow the user to specify what log files are rotated and at what size threshold the log file will be compressed and archived. To select the logs that WHM will rotate automatically first type log into the search bar in the upper left hand corner of the panel. Then click the cPanel Log Rotation Configuration link:

logrotatesearch

On this screen the administrator can enable or disable log rotation on the various logs in the system:

logrotation

The system also gives users the ability to change the log rotation size threshold in the server’s settings. To access this option first type tweak into the search bar in the upper left hand corner of the panel. Then click on the Tweak Settings link:

searchtweaksettings

Then click the Stats and Logs tab:

statsandlogstab

Towards the bottom of the page the following setting can be modified to set the size threshold for log rotation:

logthreshold

Please keep in mind that the system only renames and compresses the log file into an archive. If data needs to be removed to free up space on the server these archives can be found in the /var/log directory to be downloaded and archived locally or deleted.

Setting up resource notifications:

WHM has a system of automated notifications that are sent to the administrator email account on the server when certain percentage thresholds of server resource usage have been met. Many of these are enabled by default but the user does have the ability to adjust the threshold settings to control the benchmark level which notifications are sent. To access this page type tweak into the search bar in the upper left hand corner of the panel. Then click the Tweak Settings link:

searchtweaksettings (1)

Then click on the Notifications tab:

notifications

On the following page the administrator can configure the threshold limits for when the server sends notifications and specifically which notifications are sent. Once the desired notifications and threshold levels are set click Save to save the changes.

 

Was this article helpful?

Related Articles