Determining high disk usage locations
Learn how to identify where your account is consuming the most disk space, and how to minimize areas of high usage.

This article explains how to determine which files and directories are using the most disk space in your account.

Determining disk usage
To keep servers reliable and performing well for all users, ruachost.com monitors disk space usage. If your account contains many files and directories, it may be unclear where the most disk space is being consumed.

To check your account's disk usage, follow these steps:

  1. Log in to your account via SSH.

  2. Ensure you are in your home directory by running:

cd ~
  1. Run the following command:

du -sh * | sort -h
Note
If your account contains many files and directories, this command may take some time to complete.

This command calculates disk usage for each file and directory in the current directory (here, your home directory) and then sorts the results from smallest to largest. Example output:

0       access-logs
0       www
4.0K    a2backups
4.0K    bin
4.0K    perl5
8.0K    public_ftp
132K    etc
448K    php
3.3M    tmp
20M     mail
87M     public_html

To examine disk usage in a specific subdirectory, change to that directory (e.g., cd public_html) and rerun the command. You can step progressively into subdirectories to pinpoint exactly where disk space is being used.

Tip
You can include the total disk usage in the output by adding the -c option to the du command.

Reducing disk usage
If your account is using too much disk space, determine the cause to bring usage down. Common causes include:

  • Databases: Comment spam on unsecured WordPress sites or large volumes of spam can make databases and log files grow quickly. Adding CAPTCHA protection can help reduce spam.

  • Recursive backups: Backup scripts or plugins may create backups of backups, causing disk usage to grow rapidly. Ensure no conflicting backup processes are running.

  • Cron jobs or automated processes: Cron jobs or other automated scripts can generate many files quickly. Modify, disable, or clean up these processes as needed.

  • E-mail messages: Old messages in Trash and Sent folders can accumulate. Consider downloading important messages and then deleting them from the server.

Note
If your website’s storage requirements are increasing, contact ruachost.com’s sales department to discuss upgrade options. Typical upgrades for shared hosting accounts include managed VPS or dedicated servers. These provide dedicated resources for improved performance and come with full management and cPanel access.

Byla tato odpověď nápomocná? 0 Uživatelům pomohlo (0 Hlasů)

Powered by WHMCompleteSolution