Loading...


Related Products


Date Published: February 6, 2025

Assessing disk space usage on Acquia Cloud Classic

Note

This article only covers Acquia’s non-Kubernetes version of Acquia Cloud infrastructure, referred to as Cloud Classic.

 

Issue

You have run out or are running low on disk space. This increases the possibility of downtime for your site, and can interrupt your customer's experience.

Resolution

Check your website's disk usage (using SSH) in the files area to determine if there's an unusually large directory or file that needs to be removed. See Enabling SSH access and Using SSH/Shell access for additional instructions on how to use SSH.

Finding the file storage area

To find the files area for one of your environments, you'll need to SSH into the server and, at the command prompt, run this command:

df -h

While your exact results will depend on whether you are on Acquia Cloud Professional or Acquia Cloud Enterprise, your results will look something like this:

customer@staging-0000:/mnt/gfs/sitename.dev$ df -h
Filesystem                           Size  Used Avail Use% Mounted on
/dev/xvda1                           9.8G  5.1G  4.2G  55% /
udev                                 8.4G   12K  8.4G   1% /dev
tmpfs                                1.7G  460K  1.7G   1% /run
none                                 5.0M     0  5.0M   0% /run/lock
none                                 8.4G     0  8.4G   0% /run/shm
/dev/xvdb                            404G   18G  365G   5% /mnt
/dev/xvdn                            500G  326G  175G  66% /vol/backup-ebs
/dev/xvdm                            500G   97G  404G  20% /vol/ebs1
/dev/xvdo                            500G  327G  174G  66% /mnt/brick46067
/etc/glusterfs/glusterfs-client.vol  500G  327G  174G  66% /mnt/gfs
 

The /mnt/gfs line tells you both the name of the directory you need to change to and information on how much of it is in use. In this case, /mnt/gfs is a 500G drive, and 327G, or 66%, of it is being used.

 

Volume definitions

Server disks have a mount point, which are the operating system's way of recognizing different allocated storage spaces on physical drives. Most of these are system mounts and are managed entirely by Acquia. The volumes our customers have responsibility for are:

  • Acquia Cloud Professional websites
    • /dev/sdm (/vol/ebs1) - Database and static files. When you remove files, they are being removed from this location. 
    • /dev/sdn (/vol/backup-ebs) - Backups, including on-demand and automatic database backups.
  • Acquia Cloud Enterprise websites
    • /dev/sdm (/vol/ebs1) - Database
    • /dev/sdn (/vol/backup-ebs) - Backups, including on-demand and automatic database backups and an rsync of the files for your server.
    • /dev/sdo (/mnt/gfs) - Distributed file system, for static files. When you remove files, they are being removed from this location. 

 

Inspecting your file storage area

Folder Size

To determine the folder sizes in your file storage area (in this example, /mnt/gfs), run the following commands:

find . -maxdepth 2 -user $USER -type d -exec du -hs {} \;

Note 

The find command can take a long time if you have a very large file system.

After breaking down the results, you can dig further into the large directories and see where there are overly large files, or directories full of files that are no longer needed.

 

Database

You can use this query to list all of the database:

mysql> show databases;


You can also use the following query to display all of the tables that have more than 1 megabyte of data in them.

Note

  • Substitute "<database name>" in place of DATABASE() with the name of the database you are interested in.
  • Remove the  "AND (data_length + index_length) > 1048576" clause to get data on all tables.
mysql> SELECT table_name AS "Tables", ROUND(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = DATABASE() AND (data_length + index_length) > 1048576 ORDER BY (data_length + index_length) DESC;

 

Using the ncdu command

Some servers have a utility installed called ncdu. This utility operates like a simple directory browser, with the added plus of being an interface that provides easy-to-read information on how much space folders are taking up. Here is an example directory:

--- /mnt/gfs/sitenamedev/sites/example.com/files ----------------------------------------------------------------------------------------------------------------------------------------------------
                         /..
   62.0 MiB [##########] /images
   28.2 MiB [####      ] /tmp
   24.0 MiB [###       ] /file_attach
   13.6 MiB [##        ] /imagecache
    2.1 MiB [          ] /imagefield_thumbs

Navigation is accomplished by using the arrow keys to navigate and the Enter key to select. The /.. line will move you up one directory, but you cannot move higher than the initial directory you scanned.

The best way to understand how your volume is being filled is to check this regularly to see how folders are growing, what rate they are growing at, and how much space is remaining on the disk volume.

 

Cause

Many hosting companies, Acquia included, may limit the amount of space your website can use on a disk. Acquia Support frequently encounters situations where customers run out or run low on disk space, and they need to tidy up their website's files area in order to keep their disk from filling up.

There can be several situations where a website's files storage would reach capacity. Some reasons for this include:

  • Large or many third-party files (typically stored in sites/default/files, sites/all/files, etc.)
  • All environments (dev, stage, production, etc) of all subscriptions sharing the same disk volumes
  • Log data (from traffic or errors) filling up your volumes' free space.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation