What is the reason behind Droplet Size Increase?

May 5, 2017 544 views
Configuration Management Control Panels Development Monitoring WordPress Ubuntu

In last 12 days, I have added not even 50MB data but the overall size of droplet increased by 1GB. The difference between Snapshot Size 12 Days before and Snapshot Today is almost +1GB. I use Serverpilot to manage my server.

In fact, it is not first time rather .. with every successive snapshot I see a major increase in the size of my droplet. But the data added was much lesser in that period.

Plz, help me to understand this.

1 Answer

@Bharat1987

The size of the OS image, downloaded packages, logs, etc -- those all count towards the disk space that your Droplet utilizes.

For example -- and this may not be the one DigitalOcean is using -- the Ubuntu 16.04 64-bit ISO from Ubuntu is ~829 MB (source).

Factor in over 25 MB for WordPress (once decompressed), that much or more for plugins and various theme add-ons, and then the packages needed to run WordPress, such as Apache/NGINX, MySQL or MariaDB, and PHP/PHP-FPM, and the disk usage can easily rise above 1GB.

  • I guess you got it wrong. 12 Days before the droplet size was 18.35GB but today is 19.23GB ....Increased by almost 1GB. In last 12 Days, I added only 50MB ( approx) data thus logically it should be 18.35GB + 50MB. From where 1GB data got added?

    • Log files, cache files, temporary files, etc - use SSH to figure out which ones.

    • Hi @Bharat1987

      There several factors like @jtittle writes, but the extra data probably comes from various logs, database growth from default WordPress usage, Ubuntu updates.
      Ubuntu released two kernel updates the past two weeks - each is 250MB, so unless you remove older updates, then the disk usage will continue to grow.

      If you run the following command, it will remove non-dependencies and cleanup old unused updates:

      sudo apt-get autoremove && sudo apt-get autoclean
      

      And have a look in /var/log to ensure the logs are not growing out of proportions.

    • @Bharat1987

      The OP didn't provide an actual size relating to current data versus old, only that it was up by 1GB, so I was providing general information.

      Both access and error logs can account for a large chunk of disk usage if you're not doing log rotation and archiving the older logs.

      In the past, I've seen log files multiple GB's in size because proper log rotation was never implemented. It's not only a disk usage problem, it becomes a performance problem too since those files are constantly opened and closed.

      ...

      Beyond logs, cached files can take up quite a bit of space, especially if you have a site that caches everything to disk instead of RAM and doesn't invalidate the cache at some point (i.e. delete old objects, data, etc).

      ...

      If you update/upgrade repository packages using apt, yum, dnf, etc -- that too consumes disk space as the updates are normally larger than their previous versions. By how much all depends on what all was updated.

      This is even more so true because of what @hansen mentioned -- the kernel updates are not all that small and rightfully so as they are general use kernels, not specifically tuned for any specific stack in most cases. In most cases, general kernels include the bulk of what is needed for anything to work so the end-user doesn't have to compile their own.

Have another answer? Share your knowledge.