How file systems workChapter 7 of 7
How storage is metered
In this chapter
Why a provider sells storage as reserved capacity or as bytes stored, what a GB-month measures, why cold data costs less to keep and more to read, and why, for agents, an idle machine costs more than the bytes it holds.
Hunter LeathFounder & CEO, Archil
15 min readChecked November 2026Read as Markdown
A storage bill multiplies three things: a quantity of bytes, a length of time, and a rate. Then it adds charges for moving bytes around. Each of those parts answers a question the provider had to settle when it designed the service. What exactly is the customer reserving? How is it measured? What does it cost to keep a byte, and what does it cost to serve one?
This page builds a storage bill up one part at a time, from the provider’s side of the counter. The prices are AWS’s list prices in us-east-1, read from AWS’s public price list, because AWS publishes the most of them. The mechanisms are the same at every provider.
Reserved capacity and consumed capacity§
There are two ways to sell storage. The first is to rent out capacity. An Amazon EBS volume is a block device of a size you choose, placed in one Availability Zone, where, in AWS’s words, its data is “replicated across multiple servers”. A gp3 volume comes with 3,000 IOPS and 125 MB/s of throughput, and you can buy more of either. AWS bills the volume “by the amount of GB you provision per month until you release the storage”, whether you write a byte to it or not.From Amazon EBS features and Amazon EBS pricing. EBS bills in per-second increments, with a 60-second minimum.
From the provider’s side, a reserved volume is the simpler thing to plan for. The space and the performance are promised to you, so the provider sets them aside on specific servers and knows exactly what it has sold. You carry the risk of the part you don’t fill. A block device has no idea which of its blocks hold files, so it can’t bill you for less.
The second way is to sell bytes stored. When Amazon S3 launched on March 14, 2006, it charged “$0.15 per gigabyte of storage per month”, and Amazon’s announcement put the model plainly: “S3 lets developers pay only for what they consume and there is no minimum fee.” Now the provider carries the empty space. It has to keep enough disks, servers, and network for every customer’s data to grow into, without knowing whose will.From Amazon’s launch announcement, Amazon Web Services Launches.
A provider can afford that risk because it pools many customers, and their peaks rarely line up. If you reserve capacity, each customer sets aside its own peak, and the provider holds the sum of the peaks. If you pool, the provider needs room for the peak of the sum, which is smaller.
Three tenants use storage that peaks at different hours of the day: 60, 50, and 70 GiB. Rented by size, each reserves its own peak, so 180 GiB are set aside. Pooled, the provider needs room only for the peak of their combined usage, about 91 GiB, because the peaks don’t line up. The numbers are an example.
Pooling isn’t free. The provider still keeps headroom for growth and failures, and it runs a service that is always on for everyone. The per-byte rate pays for both, which is why a service that bills by bytes stored often has a higher rate than a volume. Amazon EFS Standard costs $0.30 per GB-month, and EBS gp3 costs $0.08. The two rates measure different things, though. One is per byte stored and the other is per byte reserved, so to compare them, divide the volume’s rate by how full you keep it.
A 100 GiB gp3 volume costs $8.00 a month however full it is. Divide that by the GiB actually stored to get the price per stored GiB: at 100% full it is the list price, $0.08, at 25% full it is $0.32, and at 10% full it is $0.80. EFS Standard costs $0.30 per stored GiB and S3 Standard $0.023, at any fill. The volume costs more per stored GiB than EFS Standard below about 27% full, and never gets as low as S3 Standard.
What a GB-month measures§
“Per GB-month” sounds like a snapshot: look at the bucket once a month and multiply. It isn’t. Storage meters integrate. They measure how many bytes you stored for how many hours, then divide by the hours in the month.
AWS’s own example, from the S3 FAQ, shows the whole calculation. A customer stores 4 GB for all of a 31-day month, and another 5 GB for the last 16 days:
4,294,967,296 bytes × 31 days × 24 hours
+ 5,368,709,120 bytes × 16 days × 24 hours
= 5,257,039,970,304 byte-hours
5,257,039,970,304 byte-hours ÷ 1,073,741,824 bytes per GB ÷ 744 hours = 6.581 GB-monthsThree details in that example matter. A GB here is 2³⁰ bytes, 1,073,741,824, which most people would call a GiB. The month has 744 hours, because it has 31 days, so the same bytes cost slightly less per hour in a long month. And the 5 GB stored for half the month counts as half: 2.581 of the 6.581.From the Amazon S3 FAQ. The S3 and EFS pricing pages both state that 1 GB is 2³⁰ bytes. The figures on this page use an average month of 730 hours, 365 × 24 ÷ 12.
The consequences follow directly. A burst of scratch data that exists for one hour costs one hour’s worth. Data you delete stops costing the moment it’s gone, unless the class has a minimum duration, which a later section covers. A provisioned volume runs the same integral over its size instead of its contents, so its meter never dips.
× $0.023 = $0.0031 for this day
$0.0939 a month if every day looks like this
× $0.08 = $0.0526 for this day
$1.60 a month if every day looks like this
The explorable shows one day of a workspace’s stored bytes, hour by hour, which you can redraw. It starts with a working day: 2 GiB overnight, rising to 8 GiB during the afternoon, then 3 GiB after cleanup. That day is 98 GiB-hours, an average of 4.1 GiB and a peak of 8 GiB. Billed by bytes stored, it is 98 ÷ 730 = 0.134 GiB-months, $0.0031 at S3 Standard’s rate. A 20 GiB gp3 volume bills 480 GiB-hours for the same day, 0.658 GiB-months, $0.053. A storage meter bills the average. A volume bills its size, which has to be at least the peak.
Why cold data costs less to keep§
Most storage services sell several classes of the same bytes at different rates. The following table shows Amazon S3’s main classes in us-east-1.Prices from AWS’s public price list for Amazon S3, read on 2026-11-04. Durations, sizes, and zones from Understanding and managing Amazon S3 storage classes. Every class in the table is designed for 99.999999999% durability.
| Class | Storage, per GB-month | Retrieval, per GB | Minimum duration | Minimum billed size | Availability Zones |
|---|---|---|---|---|---|
| S3 Standard | $0.023 | none | none | none | 3 or more |
| S3 Standard-IA | $0.0125 | $0.01 | 30 days | 128 KB | 3 or more |
| S3 One Zone-IA | $0.01 | $0.01 | 30 days | 128 KB | 1 |
| S3 Glacier Instant Retrieval | $0.004 | $0.03 | 90 days | 128 KB | 3 or more |
| S3 Glacier Deep Archive | $0.00099 | $0.02, after a restore that takes hours | 180 days | 40 KB of overhead per object | 3 or more |
A provider’s cost for a byte has two parts: keeping it, and serving it. Keeping it means disks, plus the redundancy that protects them. Serving it means the disk time, servers, and network that answer reads. A class built for data that’s rarely read can spend less on both, and it charges a fee per read to cover the reads that do come.
AWS doesn’t publish what hardware its cold classes run on. It does publish one comparison that isolates redundancy. S3 One Zone-IA and S3 Standard-IA have the same durability design and the same retrieval fee of $0.01 per GB. The difference AWS lists is that One Zone-IA keeps the data in one Availability Zone instead of at least three, so it doesn’t survive the loss of that zone. It costs 20% less. For why copies in separate zones survive failures that copies in one zone don’t, see Where fsync returns from.
Redundancy doesn’t have to mean full copies. Facebook’s 2014 paper on f4, its warm BLOB store, shows how a provider shrinks it for colder data. The authors found that photos and videos are requested far less as they age: for eight of the nine types they examined, week-old BLOBs were requested an order of magnitude less often than content less than a day old. Their hot store, Haystack, kept 3.6 bytes on disk for each byte of data. f4 stored warm BLOBs with Reed-Solomon (10, 4) erasure coding instead, and cut that “effective-replication-factor” to 2.8, and then to 2.1 with XOR coding across datacenters.From Muralidhar and others, f4: Facebook’s Warm BLOB Storage System, OSDI 2014. At the time, f4 stored over 65 PB of logical BLOBs.
Ten blocks of data kept as three full copies take 30 blocks of disk, 3.0 times the data. With Reed-Solomon (10, 4) coding they take 14 blocks, 1.4 times the data: ten data blocks and four parity blocks, any ten of which rebuild the rest. When a block is lost, three copies rebuild it by reading one other copy, and the coded stripe reads ten blocks.
The saving has a price. A coded stripe needs ten reads to rebuild one lost block where a copy needs one, and every read of cold data competes for disks that were bought for capacity, not speed. That’s the trade a cold class offers: cheaper bytes, in exchange for more expensive reads.
The break-even between keeping and fetching
The arithmetic for choosing between two classes is old. In 1985, Jim Gray and Franco Putzolu at Tandem Computers asked when it pays to keep a record in memory instead of reading it from disk each time. A disk that served 15 accesses per second cost about $1,000 per access per second, plus about $1,000 more in CPU and channel. A kilobyte of memory cost $5. So a 1 KB record that saved one disk access per second was worth keeping in memory, and the break-even came at one access every 400 seconds. They called it the five-minute rule: “Pages referenced every five minutes should be memory resident.”From Gray and Putzolu, The 5 Minute Rule for Trading Memory for Disc Accesses and the 5 Byte Rule for Trading Memory for CPU Time, Tandem Technical Report 86.1, May 1985, revised February 1986.
The same reasoning picks a storage class. Moving a GB from S3 Standard to Standard-IA saves $0.0105 a month. Reading it back once costs $0.01. So if you read the whole object about once a month or more, Standard is cheaper. AWS’s own table says the same: Standard is for data accessed “more than once a month”, and Standard-IA for data accessed “once a month”. Moving on to Glacier Instant Retrieval saves another $0.0085 a month and costs $0.02 more per read, so it pays if you read the object less than about once every 2.4 months. AWS describes that class as “accessed once a quarter”.
When data moves between classes§
A provider can move data to a colder class by its age or by its last access. The choice matters, because the two rules disagree about the same file.
- By age. S3 Lifecycle rules count “the number of days since object creation”. Reading an object doesn’t reset that count. f4’s finding, that age predicts temperature, is why an age rule suits data like photos.
- By access. EFS lifecycle management moves a file to Infrequent Access after 30 days, by default, without access, and “whenever a file in Standard is accessed, the lifecycle management timer is reset”. S3 Intelligent-Tiering moves an object after 30 consecutive days without access, and again after 90. It charges a monitoring fee per object instead of a retrieval fee.From Lifecycle configuration elements, EFS lifecycle management, and Amazon S3 storage classes. EFS keeps every file’s metadata in Standard.
An agent’s workspace breaks the age rule. The repository and dependencies it created on the first day are the files it reads in every session, so an age rule would move the hottest files first. An access rule fits better, but a workspace the agent opens every day never goes 30 days without access, so it never moves at all.
Every move also costs something. S3 charges a request per object for each transition, and an object that leaves a class before its minimum duration is billed for the rest of it. A lifecycle rule can’t even be written to move objects out early. In AWS’s example, a rule that moves objects to Glacier Instant Retrieval after 4 days can’t move them to Deep Archive until day 94.From Transitioning objects using Amazon S3 Lifecycle. Transitions cost $0.01 per 1,000 objects into Standard-IA, $0.02 into Glacier Instant Retrieval, and $0.05 into Deep Archive.
- Standarddays 0 to 30storage $22
- Standard-IAdays 30 to 90storage $24· move in $10
- Glacier IRdays 90 to 180storage $12· move in $20
- Deep Archivedays 180 to 365storage $7.13· move in $50· +40 KB of metadata per object
| For 365 days | With the rule | Kept in Standard |
|---|---|---|
| Storage | $65 | $270 |
| Transitions, one request per object | $80 | $0 |
| Reads: requests and retrieval fees | $0 | $0 |
| Early delete: the rest of the minimum | $0 | $0 |
| Total | $145 | $270 |
A million objects follow a common lifecycle rule for a year: Standard-IA at day 30, Glacier Instant Retrieval at day 90, and Deep Archive at day 180. At 1 MiB each, about 977 GiB in all, never read and kept all year, the rule costs about $145 against $270 left in Standard, and $80 of that is the three transition requests per object. Read once a month, the retrieval fees and restore requests bring it to about $1,010 against $274. Deleted on day 100, the objects still bill the remaining 80 days of Glacier Instant Retrieval’s 90-day minimum, about $10, and the rule costs $88 against $74. At 4 KiB each, S3 Lifecycle doesn’t move the objects by default, and they cost about $1 for the year in Standard. Forcing the move costs $80 in transitions and bills each object as 128 KB, about $86 in all.
Minimum sizes and durations§
The minimums in the table come from costs that don’t scale with an object’s size. Every object needs an index entry and metadata, and every transition is a request. For a large object, those costs vanish into the per-byte rate. For a small one, they don’t, so the provider sets a floor.
S3’s floor is the minimum billed size in the table. The archive classes, Glacier Flexible Retrieval and Deep Archive, add metadata to each object instead: 32 KB at the archive rate and 8 KB at Standard’s. EFS’s price list has a line for “Infrequent Access usage from small file rounding”, which applies to files under 128 KB. Since September 2024, S3 Lifecycle doesn’t move objects under that size by default. AWS explains that the transition request “can outweigh the storage savings”.
The minimum duration does the same for time. A cold class is priced on the assumption that data stays, so leaving before the table’s minimum duration bills the rest of the stay. Google Cloud Storage uses the same structure, with minimums of 30 days for Nearline, 90 for Coldline, and 365 for Archive.From Google Cloud Storage classes.
In S3 Standard-IA, each object is billed as at least 128 KB. Ten thousand 4 KiB files store 39 MiB and bill as 1.22 GiB, 32 times their size. Each object is also billed for at least 30 days: one deleted on day 10 still bills the remaining 20.
A software workspace holds many small files. npm ci for one Next.js app writes 18,602 of them, so in a cold class they’d pay 18,602 minimums.The file count is from Archil’s published file system benchmark. For what those files cost in round trips rather than dollars, see Anatomy of a file create over a network.
Requests, throughput, and egress§
Bytes at rest are only part of a provider’s cost. Each request needs authentication, an index lookup, and disk time, whatever its size, so object stores charge per request. S3 Standard charges $0.005 per 1,000 PUT, COPY, POST, or LIST requests and $0.0004 per 1,000 GETs, so a write costs 12.5 times as much as a read. A file system on an object store shows how many requests a rename or a listing sends.
For small files, requests can cost more than storage. Uploading that dependency tree as objects takes 18,602 PUTs, about $0.09. Doing it once a day for 30 days costs about $2.79, more than a month of storing 100 GiB in S3 Standard, which costs $2.30.
File systems meter the same work as throughput. With Elastic Throughput, EFS charges $0.03 per GB read and $0.06 per GB written. A gp3 volume folds its throughput into the reservation: a baseline of IOPS and throughput comes with the size, and more is reserved and billed separately, like the size itself.
Moving data between places has its own meter. Data into AWS is free. Data out to the internet costs $0.09 per GB for the first 10 TB a month, and data between Availability Zones in a region costs $0.01 per GB. Copying a 100 GiB workspace out once costs about $9, which is about four months of storing it in S3 Standard.From AWS’s public price list for AWS data transfer in us-east-1 and for Amazon EFS, read on 2026-11-04.
Compute that waits§
Compute is sold with the same two models as storage, and agents mostly buy it the expensive way. A sandbox reserves its CPU and memory. E2B bills those per second for as long as the sandbox runs, used or not. Vercel Sandbox bills memory for as long as it’s provisioned, idle time included, and bills CPU only while it’s actively used.From E2B pricing, $0.000014 per vCPU-second and $0.0000045 per GiB-second, and Vercel Sandbox pricing, both read on 2026-11-04.
Put an idle sandbox hour next to a storage month. One hour of a 2 vCPU, 4 GiB sandbox at E2B’s list price costs about $0.17. That buys 7.2 GiB-months of S3 Standard.
One idle hour of a 2 vCPU, 4 GiB sandbox at E2B’s list price, about $0.17, buys 7.2 GiB-months of S3 Standard at $0.023 each, or 2.1 GiB-months of EBS gp3. A 5 GiB workspace kept in S3 Standard for a month costs $0.115, less than that one hour.
Agents leave machines waiting for a long time. Archil measured 384 coding-agent loops from its own engineering team, and found that a sandbox that stopped after 15 idle minutes still sat idle for 65% of the time it ran.The method is in Do AI agents need a sandbox running for the whole session? At those rates, the machine kept up to hold a workspace costs far more than the bytes in it.
A worked example: Archil’s meter§
Archil bills a disk by consumption, with an access rule of one hour. Data counts as active while it sits in our high-speed layer: data you read stays active for up to 1 hour after your last access, and data you write for up to 1 hour after we flush it to the disk’s data source. We measure active data every minute and bill the time-weighted average, so 100 GiB that’s active for half a month is 50 GiB-months, at $0.20 per GiB-month.
Reading metadata with ls, stat, or find doesn’t make file data active. Each metadata write, such as a rename or chmod, counts as 32 KiB until it reaches the data source. A client that has checked out a directory coalesces those writes first, so a git clone of a 15 MB repository meters as about fifteen 1 MiB writes rather than thousands of metadata operations.From Metering and Pricing & Billing in our docs.
Under the active meter sits the whole disk. On a disk we manage, it bills archive storage at $0.025 per GB-month. On a disk synced to your own bucket, there’s no archive charge, and your cloud provider bills the bucket at its own rate. Our price list has no retrieval fee and no minimum object size or duration. Data leaving Archil costs $0.07 per GB, and transfer to our own tool calls and sandboxes is free.
For how this changes what agents should pay for, see Storage for agents.