Tuning Amazon EFS Performance and Lifecycle
This lesson explains Amazon EFS, a fully managed NFS file system that grows and shrinks automatically and can be mounted by thousands of clients, and how to tune its performance and cost.
Learning outcomes
After completing this lesson, you will be able to:
- Choose between Regional and One Zone file systems.
- Choose throughput and performance modes.
- Use storage classes and lifecycle management.
- Diagnose a throughput-limited file system.
File system types and mount targets
A Regional EFS file system stores data redundantly across multiple AZs and is the default for production; a One Zone file system stores data in one AZ at lower cost. Clients connect through mount targets, one per AZ, each an ENI with an IP address in a subnet and a security group that must allow NFS (TCP port 2049) from the clients. Clients should mount the target in their own AZ to avoid cross-AZ charges and dependency on another AZ. The amazon-efs-utils mount helper adds TLS encryption in transit and IAM authorisation. Access points enforce a POSIX user and root directory for each application.
Throughput and performance modes
EFS has three throughput modes. Elastic throughput, the default and recommended mode, scales throughput automatically with the workload and charges for the data read and written, which suits spiky or unpredictable workloads. Provisioned throughput sets a fixed throughput regardless of storage size, for steady workloads that need more than bursting provides. Bursting throughput scales throughput with the amount of data stored and uses burst credits shown by the BurstCreditBalance metric; small file systems running out of credits are a classic cause of slow EFS performance. The General Purpose performance mode gives the lowest latency and is recommended for almost all workloads; Max I/O is a legacy mode for highly parallel workloads, not available with Elastic throughput or One Zone. Key metrics are PercentIOLimit, MeteredIOBytes, PermittedThroughput and BurstCreditBalance.
The following diagram compares the three throughput modes.

EFS throughput
Storage classes and lifecycle management
EFS has three storage classes: Standard for active data, Infrequent Access (IA) and Archive for data accessed a few times a year. Lifecycle policies move files that have not been accessed for a chosen period (for example 30 days) from Standard to IA, and from IA to Archive after a further period (for example 90 days), and can move a file back to Standard on its first access. Reads from IA and Archive have a per-GB charge and slightly higher latency. Lifecycle management can reduce storage cost substantially for file systems where most files are cold. The following table summarises EFS settings.
| Setting | Options | Guidance |
|---|---|---|
| Availability | Regional, One Zone | Regional for production; One Zone for re-creatable data |
| Throughput mode | Elastic, Provisioned, Bursting | Elastic for unpredictable; Provisioned for steady high throughput |
| Performance mode | General Purpose, Max I/O | General Purpose for almost everything |
| Storage classes | Standard, IA, Archive | Lifecycle policies move cold files automatically |
The following diagram shows files moving between the three classes.

EFS lifecycle
A slow content management system
A content management system on six EC2 instances uses a 50 GiB EFS file system in Bursting mode. Page loads become slow every afternoon. CloudWatch shows BurstCreditBalance reaching zero and PermittedThroughput falling to the small baseline that 50 GiB earns. Switching the file system to Elastic throughput removes the credit limit without padding the file system with dummy data, which was the old workaround. A lifecycle policy moves media files not accessed for 30 days to IA, which offsets the extra cost.
Which port must the mount target security group allow?
Show answer
NFS on TCP 2049.
Exam Tips
Remember for the exam
- EFS mount targets need security groups allowing NFS on TCP 2049.
- Elastic throughput is the default and suits unpredictable workloads.
- Bursting mode: BurstCreditBalance at zero causes slow performance on small file systems.
- Lifecycle policies move cold files to IA and Archive.
- General Purpose performance mode for nearly all workloads.