Paul Khuong: some Lisp

Pricing EFS vs S3 for small I/O

Nov 28th, 2024 | Comments

This is a draft (essai ;) post. Feel free to share it with people, but I would prefer to avoid aggregators. Draft posts do not have stable URLs, and some may never make it out of that stage; you may instead want to link to the draft category page.

S3 is finally catching up to its copycats, with support for [conditional PUTs] and [some form of append]. With that comes renewed interest in using S3, [S3 Express One Zone] in particular, for small PUTs and, essentially, concurrency control.

There’s another pay-as-you-go serverless storage service on AWS: EFS (and other clouds usually have their own form of NFS offering). The comparison is particularly apt when it comes to S3 Express One Zone and EFS One Zone. Both storage systems offer 11 nines of durability, the same 99.9% monthyl availability SLA, “single-digit millisecond” access latencies, and, most obviously, both are bound to a single AZ.

When does S3 Express One Zone lead to lower COGS than EFS One Zone?

The cost of small S3 Express One Zone operations is fairly clear. In US East 1, for example:

  1. each PUT/LIST is $2.5e-6
  2. each GET is $2e-7
  3. storage is $0.16/GB

We’re concerned with concurrency control, so let’s assume the storage footprint is negligible.

EFS is a bit harder to figure out. The “recommended” elastic throughput mode seems to be a very good deal for AWS, although it does seem to perform exactly as advertised. The legacy Bursting throughput mode is much more cost-effective for a steady flow of updates, which is usually what we want to start with for capacity planning and COGS analysis.

EFS doesn’t charge for IOPS per se. It instead bills / limits performance based on throughput, and converts operations to throughput. More precisely:

For EFS one zone, each GB of storage costs us $0.16 per month, and also buys us \(50 KB/s * 3600 s/h * 24 h/d * 30.5 d/month = 125 GB\) of throughput, or 781 GB/dollar (and the storage is “paid for” as long as bytes survive less than 5.8 hours on average).

Given the granularities above, I expect each write counts as 16 KB (4 KB data, 4 KB metadata, plus the request and two reads).

Let’s pessimistically say each write is rounded up to 128 KB of traffic. That’s $1.6e-7 worth of throughput, less than 1/10th the cost of an S3 One Zone PUT ($2.5e-6)!

For larger writes, S3 Express One Zone charges all bytes in excess of 512 KB at… $0.008/GB, or 125 GB/$, 6 times as expensive as EFS!

So, at best, S3 One Zone can hope to asymptotically match the cost of EFS One Zone in bursting throughput mode.

The best case for S3 One Zone is when PUTs are exactly at the 512 KB limit: each such PUT costs $2.5e-6.

When using EFS One Zone, 512 KB of write throughput costs… $6.25e-7, or 25% as much as S3 One Zone. Of course there’s metadata overhead, but probably not 300%.

Comments