Log Files Fill Disks Quietly, Then All at Once
Logs are essential for tracing down incidents, but left unmanaged they quietly eat away at disk space until one day you're hit with a "No space left on device" error that takes the whole service down. A sudden traffic spike or a debug log level left on by accident can fill a disk far faster than expected.
This calculator multiplies your daily requests by the average size of one log line to get daily and monthly growth, then works backward from your available disk space to estimate how many days until it fills up. You can estimate the average log line size by dividing an existing log file's total size by its line count.
If the estimate comes out short, set up a rotation policy with a tool like logrotate to compress and delete old logs, or ship logs to a centralized system like ELK or CloudWatch to take the load off local disk entirely.
Frequently Asked Questions
Open an existing log file and divide its total size by its line count for a rough average. Typical access logs run around 200-800 bytes per line.
New log writes start failing, and in severe cases the application itself can hang on write errors or database writes can fail entirely.
Common practices include using logrotate to compress and delete old logs, tuning your log level, and shipping logs to a central service like ELK or CloudWatch to offload local disk usage.