Skip to content

fsx info reports storage cost at $0.22/GiB-month — ~52% high for every filesystem spawn creates #619

Closed

Description

@scttfrdmn

Found while adding the FSx cost line to --estimate-only for #613 (#617), which needed a rate and turned up a conflicting one.

The bug

cmd/fsx.go:242 hardcodes the rate used for fsx info's monthly cost:

costPerMonth := float64(*fs.StorageCapacity) * 0.22 // $0.22/GB-month for SSD

$0.22/GiB-month appears to be a PERSISTENT_1 SSD rate. Every filesystem spawn creates is PERSISTENT_2, whose us-east-1 SSD rate at the default 125 MB/s/TiB throughput tier is $0.145/GiB-month — and PERSISTENT_2 folds the throughput tier into the per-GiB price, so there is no single correct constant across tiers.

So for a default --fsx-create filesystem, fsx info overstates monthly cost by ~52%:

1200 GiB (the FSx Lustre minimum)
fsx info today (0.22) ~$264/month
actual, PERSISTENT_2 @ 125 ~$174/month

Why it's worth fixing rather than leaving

It is the only place in the CLI that quotes a storage cost to the user, and #613 was fundamentally about storage spend being invisible. Having the one visible number be wrong — and wrong in a way that disagrees with the number --estimate-only now prints — is worse than the previous silence, because two spawn commands will quote different monthly costs for the same filesystem.

Overstating is the safer direction of error, but it still erodes trust in the figure, and a user reconciling it against a real AWS bill will conclude the tool is guessing.

Suggested fix

Point fsx info at the named rate helper added in #617 — fsxLustreUSDPerGiBMonth(throughput) in cmd/fsx_cost.go, which maps the PERSISTENT_2 throughput tiers (125/250/500/1000 → 0.145/0.290/0.580/1.160) and falls back to the 125 default. fsx info already has the filesystem description in hand, so it can read the actual throughput tier rather than assuming one.

Two follow-on niceties while there: label the figure approximate and name the assumed region (both rate sources are us-east-1 list price), and note that 0.22 being commented "for SSD" suggests the deployment type was never part of the calculation.

Test: fsx info on a 1200 GiB PERSISTENT_2 filesystem at 125 MB/s/TiB quotes ~$174/month, and agrees with what --estimate-only prints for the same shape.

Refs #613, #615.

Activity

  1. scttfrdmn commented on Oct 1, 2026

    @scttfrdmn
    ContributorAuthor

    Fixed in #627 (merged as 52ea114).

    fsx info now reads the filesystem's actual PerUnitStorageThroughput and calls the shared fsxLustreMonthlyUSD from cmd/fsx_cost.go, so a 1200 GiB PERSISTENT_2 filesystem at the default 125 MB/s/TiB reports ~$174/month instead of ~$264, and agrees with what --estimate-only prints for the same shape.

    Two gates, not one:

    • single source — fails if any file in cmd/ names an FSx rate in code (comments are stripped, so prose explaining why 0.22 was wrong stays legal). Proven by reintroducing 0.22 into fsx.go, which fails it.
    • right source — pins fsxLustreUSDPerGiBMonth(125) == 0.145 and the 1200 GiB floor at ~$174. The first gate alone would have accepted 0.22 as long as it lived in one file.

    Also replaced the $0.00 that an unpopulated capacity would have printed with "unknown (storage capacity not reported yet)" — the same CREATING case as #618.

  2. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions