How long the data will stay

Logs, camera footage, sensor readings and database dumps arrive every day, and the disk that holds them has a fixed size. If the oldest data is removed once the disk is full, the capacity decides how many days you can look back. This page makes that connection. You enter the usable storage and the data produced per day, and it returns the retention period. The result helps when you set a retention policy, size storage for a new system or explain to a colleague why a log history is shorter than expected. It also shows how much extra capacity a longer policy needs, since the required storage is the daily rate multiplied by the days you want to keep.

The calculation and the default

Retention in days = usable capacity / daily data. The complete days value is that number rounded down. The defaults are 1,000 GB of usable storage and 200 GB generated per day. That gives exactly 5 days. If the daily rate is 150 GB and the capacity is 4,000 GB, the result is 26.67 days, and the page reports 26 complete days. Rounding down matters, because the volume cannot hold a partial day beyond the last full one without losing part of the oldest data. In a ring-buffer recorder, the oldest footage is overwritten first, so the whole number of days is the figure to quote.

A surveillance recorder

Four cameras each recording at a steady 4 Mbit/s produce 4 × 86,400 / 8 = 43,200 MB, or 43.2 GB, per camera per day. All four make 172.8 GB per day. On a 4,000 GB disk the retention is 4,000 / 172.8, about 23.15 days, and 23 complete days. A recorder with motion-triggered recording would produce less on average, so the figure is the safe floor for continuous recording. Raising the bit rate for sharper video shortens retention in proportion, and a doubling of it halves the number of days. Reducing the frame rate or the resolution has the opposite effect and lengthens the retention by the same proportion.

A log pipeline

A logging cluster that ingests 320 GB a day and has 8,000 GB of usable storage keeps 8,000 / 320 = 25 days. If a security policy demands 30 days, the volume is 1,600 GB short, because 30 × 320 is 9,600 GB. A team can respond by adding capacity, by lowering the volume of logs, or by moving older data to a cheaper tier. A small system with 500 GB and 180 GB a day gets 2.78 days, which is 2 complete days, and that is too short for investigating a problem noticed on a Monday that began on Friday. A short retention period is a business risk as well as a technical one, since an incident often is noticed days after it begins.

Usable capacity, not raw capacity

The capacity input must be what the system can store. Mirrored disks provide half of the raw capacity, a RAID 5 set of four equal drives provides three quarters, and filesystems use part of the space for metadata. Databases and log stores also need room for indexes and temporary files, and a volume run at 100 percent full usually misbehaves. Many operators reserve 10 to 20 percent as a margin. Enter the capacity after subtracting these, or the result will be too optimistic by the same proportion. A volume of 1,000 GB at 80 percent usable is 800 GB for this purpose, and at 200 GB per day that is 4 days, not 5.

Growth and uneven data

The formula assumes a constant daily amount. Real data grows when a service gains users, when a new log source is added or when cameras are upgraded. Traffic differs between weekdays and weekends, and the busiest day is what drives a small volume to its limit. A conservative approach is to use the highest daily rate you expect, or the rate you expect at the end of the planning period. If volume grows by 3 percent a month, the retention shortens by about the same amount each month, which the page does not predict. Rechecking the daily rate every few months keeps the retention figure honest.

Compression and deduplication

The daily amount should be the size as stored, not the size as produced. Text logs often compress well, and storing them compressed can multiply the retention several times. Video and already compressed images barely shrink. If a system compresses at a ratio of 4 to 1, a raw rate of 200 GB per day is stored as 50 GB per day, and 1,000 GB then holds 20 days, not 5. Measure the stored growth on a real system when you can, since the ratio depends heavily on content. The comparison between raw and stored rates is a good way to decide whether paying for more disks or for compression work is the cheaper route.

Decimal units

The page works in decimal gigabytes, in line with the SI prefix definitions in NIST SP 811. A storage device sold as 8 TB provides 8,000 GB in these units. Some operating systems report binary units, in which the same drive looks about 7.3 TiB. Take both inputs from the same system, or convert them, because a unit mismatch of that size can add or remove days from the answer. With a daily rate of 200 GB, a 7 percent difference in capacity shifts the result by more than a third of a day on a 1,000 GB volume. The retention calculation itself is a division and does not depend on the unit as long as both inputs share it.

When daily data growth is not constant

The page assumes a constant daily generation rate and that the capacity you enter is already usable. It does not model growth, compression, snapshots, replication, filesystem overhead or retention policies that keep older data in thinner form. It does not read from any system. Treat the result as a planning estimate and revisit it after real data has accumulated. Cloud object stores with lifecycle rules can move older data to cheaper tiers, which extends total history without extending the fast storage that this page measures. For a one-time check of free space, use the storage capacity page. If the oldest data must be kept for a legal or contractual period, calculate the capacity from the required days first, then compare it with what you can afford.