在打印窗口把「目标」选为「另存为 PDF」即可保存,页面已带 awsgood.com 版权水印。 返回原文

www.awsgood.com

How Much Does Elastic Fabric Adapter Cost per Hour? $0.00

2026-11-17 AWS Pricing 约 9 分钟

TL;DR

The invoice never says "EFA" — here's what it does say

Elastic Fabric Adapter is a network interface you enable at launch. AWS doesn't sell it as a separate SKU, and the pricing page doesn't list it because there's nothing to list. Enable it on a supported instance and you get the device for free; try to enable it on an unsupported one and the API rejects you.

What you actually see in Cost Explorer after a training week is EC2-Instances, plus DataTransfer if anyone spilled across an AZ boundary, plus EBS:VolumeUsage for the local NVMe you didn't snapshot. My own tagging rule: every cluster instance gets workload=nccl-train and team=ml, because untagged p4d spend is indistinguishable from a runaway autoscaling group at 2am.

Check what's actually EFA-capable in your region before you plan anything:

aws ec2 describe-instance-types 
  --filters "Name=network-info.efa-supported,Values=true" 
  --query "InstanceTypes[].InstanceType" --output table 
  --region us-east-1


List rates below are us-east-1 on-demand, captured 2026-02. Confirm against the calculator before signing a term — and note that the same SKU can differ by 20-40% in other regions.

| Instance | EFA mode | On-demand (us-east-1) | Typical use |
|---|---|---|---|
| `c5n.18xlarge` | ENA + EFA | ~$3.89/hr | Cheapest way to learn EFA/OFI |
| `m5n.24xlarge` | ENA + EFA | ~$5.71/hr | MPI codes with a memory habit |
| `p4d.24xlarge` | ENA + EFA | ~$32.77/hr | 8× A100, classic NCCL workhorse |
| `p5.48xlarge` | EFA-only | ~$98.32/hr | 8× H200; needs a second ENI for SSH |

That "EFA-only" column matters more than people expect. On `p5` and `trn1` you can attach an interface in `efa-only` mode, which carries RDMA but no IP — so if you build an AMI or a launch template around it and forget the second standard ENI, the node boots and never answers SSH. We lost 40 minutes to that on a Friday deploy, then found it in the launch template diff.

## The hidden meter: cross-AZ traffic will outrun your compute bill

A single EFA interface does 100 Gbps. Run it flat out for an hour and that's 45,000 GB — 45 TB — of east-west traffic. Inside one AZ that's free. Split the ring across two AZs and us-east-1 inter-AZ transfer applies in both directions, on the order of $0.01/GB each way, so ~$900/hr in transfer riding on top of ~$131/hr of `p4d` compute.

Nobody does this on purpose. It happens when a cluster placement group launch fails with `InsufficientInstanceCapacity` and someone "fixes" it by removing `--placement GroupName=hpc-cluster`, or when the capacity reservation lives in `us-east-1c` but the head node was built in `us-east-1a`. Both look fine in the console. Both quietly turn your RDMA fabric into a very expensive WAN.

Two habits that pay for themselves:

```bash
# Fail loudly instead of silently spanning AZs
aws ec2 describe-instances 
  --filters "Name=tag:workload,Values=nccl-train" "Name=instance-state-name,Values=running" 
  --query "Reservations[].Instances[].{Id:InstanceId,AZ:Placement.AvailabilityZone,Type:InstanceType}" 
  --output table

# Then verify EFA is where you think it is
aws ec2 describe-instances --instance-ids i-0abc123 
  --query "Reservations[].Instances[].NetworkInterfaces[].{Id:NetworkInterfaceId,Type:InterfaceType}" 
  --output table


If the AZ column shows more than one value for a tightly coupled job, stop and fix it before the next run. That's cheaper than any reservation.

## What the commitment products actually cover on an EFA node

EFA nodes are just EC2, so the usual three discount instruments apply — but their scopes behave very differently for HPC and ML fleets.

| Instrument | Max discount (AWS published) | Scope | Survives a `p4d`→`p5` migration? |
|---|---|---|---|
| Compute Savings Plan | up to 66% | Any EC2 family, region, size; also Fargate/Lambda | Yes |
| EC2 Instance Savings Plan | up to 72% | One family, one region, any size/AZ/OS | No |
| Standard RI | up to 72% | One family, one region, specific size | No |
| Convertible RI | up to 54% | Exchangeable with a fee-free swap | Yes, with friction |

The trap is right there in the table. EC2 Instance Savings Plans give you the best rate and the least portability, and EFA fleets are exactly the fleets that change shape fastest — GPU generations turn over every 18-24 months, and an instance family that supports EFA today may be the second-choice family next year.

Worked example, and I'll keep the arithmetic visible so you can redo it with today's rates. Eight `p4d.24xlarge` at $32.77/hr is $262/hr on-demand, or about $2.3M a year if you ran them flat out — nobody does, so say you average 40% utilization and spend roughly $918k. At the 72% ceiling a 3-year all-upfront plan drops the effective rate to about $9.18/hr. Commit to all 8 nodes for 3 years and only run 4 on average, and you're paying for ~35,000 idle instance-hours a year: around $321k annually for compute you never scheduled.

That number is why I never sell a full-coverage plan on GPU capacity. Commit to the floor you'd be embarrassed to fall below, not the peak you hope to hit.

## Buying strategy: pick term, ratio, then coverage — in that order

**Term.** One year no-upfront is the default for anything touching an NVIDIA generation that's less than two years old. Three-year terms only make sense for CPU-side EFA families (`c5n`, `m5n`, `c6gn`) running well-understood MPI or CFD codes that have looked the same since 2023.

**Ratio.** Target 50-70% coverage of your 90-day p10 hourly usage, not your p50. For a research group that bursts before deadlines, 50% plus Spot for the rest beats 90% coverage almost every time.

**Coverage.** Compute Savings Plan for anything GPU. EC2 Instance Savings Plan only when the workload is genuinely flat and the family genuinely stable. Never both on the same capacity without checking for overlapping commitments — I've seen a team pay twice for the same 8 nodes because an old EC2 Instance SP hadn't expired.

Pull the numbers before you click, not after:

```bash
# AWS's own recommendation, based on the last 30/60/90 days
aws ce get-savings-plans-purchase-recommendation 
  --savings-plans-type COMPUTE_SP 
  --term-in-years ONE_YEAR --payment-option NO_UPFRONT 
  --lookback-period-in-days NINETY_DAYS 
  --query "SavingsPlansPurchaseRecommendation.SavingsPlansPurchaseRecommendationDetails[0]"

# Audit existing commitments and their expiry
aws savingsplans describe-savings-plans --states ACTIVE 
  --query "savingsPlans[].{Id:savingsPlanId,Commit:commitment,Expiry:end,Type:savingsPlanType}" 
  --output table


The recommendation API is honest but naive: it extrapolates recent usage. If your last 90 days included a one-off 6-week fine-tuning sprint, it will happily suggest committing to that sprint for a year.

## The night `fi_info` returned -61 (and cost us ~$786)

September 2025, four `p4d.24xlarge` in us-east-1, cloned from a console-built template. NCCL hung right after `Setting affinity to the local core on node` and stayed there for 20 minutes. `NCCL_DEBUG=INFO NCCL_DEBUG_SUBSYS=INIT,NET` told us nothing useful, and the head node printed this when we tested the fabric directly:

```text
$ fi_info -p efa
fi_getinfo: -61


Minus 61 is ENODATA — no EFA provider, no device. `lspci | grep -i mlnx` returned empty, which settled it: there was no Mellanox device on the PCI bus at all. The template had been built from a plain `p4d` launch with no EFA interface, and **you cannot add EFA to a running instance**. The only fix is terminate and relaunch with the interface configured at launch time.

The relaunch needed two things the template also lacked: the `aws-efa-installer` package installed on the AMI (with `--skip-kmod` off so the kernel module loads), and a security group with a self-referencing rule allowing all inbound traffic from itself. Without that second rule, `fi_info` succeeds and NCCL still hangs — no error, just a ring that never forms. After both fixes, `ibv_devinfo` listed `rdmap79s0` and NCCL came up with `NET/IB : Using [0]rdma:mlx5_0:1/IB/RoCE v1e`.

Cost of the lesson: 6 hours × 4 nodes × $32.77 ≈ $786, spent computing at roughly 12 Gbps of ENA instead of 100 Gbps of EFA. The cheapest part of that story is the driver fix. The expensive part was not checking EFA support at launch.

## When NOT to use EFA — or a reservation

Skip EFA entirely if your cluster is 4 nodes or fewer and the job is a fine-tune that fits on one box; the OFI/NCCL plumbing is real operational overhead for a 10% step change. Skip it if your code doesn't speak MPI or NCCL — plain HTTP between `m5.xlarge` instances gains nothing.

Skip the commitment if any of these are true: the workload has never run for 30 consecutive days, the framework version is still moving, you'd need to change instance families or regions to get capacity, or the job is checkpointed and Spot-tolerant. `p4d` Spot capacity in us-east-1 has intervals where interruption is rare enough that Spot plus checkpointing beats a 1-year EC2 Instance SP — run the spot price history for 30 days and compare before you assume otherwise.

Also don't buy a plan you can't reallocate: Savings Plans can't be resold, and a mis-scoped commitment sits on the invoice for the full term. That's an argument for one-year no-upfront as a training-wheels default, then a three-year only after two clean cycles.

## Pre-purchase checklist for EFA fleets

1. Confirm the family is EFA-capable in the target region with `describe-instance-types`.
2. Measure 90-day p10 and p50 hourly spend per workload tag — commit against p10.
3. Decide Compute SP (portable) vs EC2 Instance SP (cheaper, family-locked) per workload, not per account.
4. Check for existing commitments overlapping the same family and region.
5. Keep the cluster single-AZ and single placement group; alert if running instances span AZs.
6. Tag every EFA node with workload, team, and cluster ID so Cost Explorer answers questions later.
7. Prefer 1-year no-upfront for GPU families younger than 24 months.
8. Budget 50-70% coverage, Spot for the remainder, on-demand as overflow.

## Sources

- [Amazon EC2 instance types — accelerated computing and EFA support](https://aws.amazon.com/ec2/instance-types/)
- [Elastic Fabric Adapter — supported instance types and interface modes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html)
- [Savings Plans user guide — plan types and coverage](https://docs.aws.amazon.com/savingsplans/latest/userguide/what-is-savings-plans.html)
- [GetSavingsPlansPurchaseRecommendation API reference](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetSavingsPlansPurchaseRecommendation.html)

If you'd rather not model this yourself, the team at awsgood.com runs these commitment audits for SMB fleets and will flag the EFA-node family risk before you sign anything.

常见问题

Does Amazon charge extra per hour for Elastic Fabric Adapter?
No. EFA has no standalone hourly price and no line item in Cost Explorer. You pay the normal EC2 rate for the instance the EFA interface attaches to, plus any EBS and data transfer it generates. A `c5n.18xlarge` with EFA enabled costs exactly the same in us-east-1 as one without it, roughly $3.89/hr on-demand.
Do Savings Plans or Reserved Instances discount EFA?
They discount the EC2 instance, not the adapter, so the effect looks like a discount on EFA. A Compute Savings Plan covers any EFA-capable family and size and can move between `p4d` and `p5` freely. An EC2 Instance Savings Plan is cheaper but locked to one instance family in one region.
Why is my EFA cluster so much more expensive than the instance price suggests?
Usually cross-AZ traffic or idle commitments. A 100 Gbps fabric running flat out moves 45 TB per hour; if nodes span Availability Zones, inter-AZ transfer is billed in both directions at roughly $0.01/GB in us-east-1. Check the AvailabilityZone field on every running cluster instance before blaming the instance rate.
Can I add EFA to an instance that's already running?
No. EFA must be enabled on the network interface at launch time, and it can't be retrofitted onto a running instance or a stopped one with no EFA interface. Use a launch template with `InterfaceType=efa` and