Cấu hình EFS theo đặc điểm tải
Shared file system cũng cần được điều chỉnh khi tải thay đổi, khi dữ liệu ít được truy cập dần và khi phải kiểm soát quyền truy cập.
Sau khi triển khai Amazon EFS, MFTECH cần giải quyết các vấn đề vận hành: điều chỉnh performance mode và throughput mode khi tải lớn, tối ưu chi phí lưu trữ tệp cũ, và kiểm soát quyền mount. Chọn từng tình huống:
AWS khuyến nghị General Purpose cho mọi file system. Max I/O là performance mode thế hệ trước, dành cho tải song song cao chịu được độ trễ lớn hơn; Max I/O không hỗ trợ Elastic throughput và One Zone file system.
Bursting throughput cho throughput tỉ lệ với dung lượng dữ liệu ở lớp Standard: baseline 50 KiBps mỗi GiB, burst tới 100 KiBps mỗi GiB (tối thiểu 100 MiBps) khi còn credit. Burst credit tích luỹ khi tải thấp hơn baseline, tối đa 2,1 TiB (file system dưới 1 TiB) hoặc 2,1 TiB cho mỗi TiB. Dữ liệu đã chuyển sang IA không được tính vào baseline. Mô phỏng thư mục ảnh sản phẩm khi có đợt nhập hàng loạt:
Chọn cấu hình, kéo thanh trượt, sau đó nhấn Chạy 6 giờ. Đợt cao điểm bắt đầu ở phút thứ 30; ngoài đợt cao điểm hệ thống gần như không có tải.
Về performance mode: tài liệu ôn tập cũ thường chọn Max I/O cho job big data chạy song song. Hướng dẫn hiện hành của AWS (Amazon EFS performance specifications) xếp Max I/O vào thế hệ trước, có độ trễ mỗi thao tác cao hơn, và khuyến nghị General Purpose cho mọi file system, kết hợp Elastic throughput cho tải biến động. MFTECH áp dụng cấu hình hiện hành này.
Team gợi ý sản phẩm của MFTECH chạy Lambda function trong VPC, cần đọc bộ dữ liệu trên EFS thuộc account của một đối tác dữ liệu. Lambda mount EFS qua access point; dựng cấu hình theo từng bước:
Các lưu ý khác khi Lambda chạy trong VPC (truy cập Internet, NAT gateway): xem bài Lambda.
- EFS: file system NFS dùng chung giữa nhiều AZ.
- Cấu hình khuyến nghị: General Purpose performance mode + Elastic throughput; Max I/O là thế hệ trước (tài liệu cũ có thể khuyến nghị Max I/O cho tải song song).
- Bursting: throughput theo dung lượng lớp Standard, dùng burst credit.
- Đã biết trước nhu cầu throughput: Provisioned throughput.
- Tệp ít truy cập: lớp IA.
- Không cần chịu lỗi cấp AZ, ưu tiên chi phí: One Zone.
- Instance mount qua mount target cùng AZ để giảm độ trễ.
- Lambda mount EFS qua access point.
Configuring EFS for the workload
A shared file system also needs tuning as load changes, as data is accessed less often and when access must be controlled.
After deploying Amazon EFS, MFTECH has operational issues to solve: adjusting the performance mode and throughput mode under heavy load, optimizing the cost of storing old files, and controlling who can mount. Choose each scenario:
AWS recommends General Purpose for all file systems. Max I/O is a previous-generation performance mode for highly parallel workloads that can tolerate higher latency; Max I/O does not support Elastic throughput or One Zone file systems.
Bursting throughput scales with the amount of data in the Standard class: a baseline of 50 KiBps per GiB, bursting to 100 KiBps per GiB (at least 100 MiBps) while credits last. Burst credits accrue while the load is below the baseline, up to 2.1 TiB (file systems under 1 TiB) or 2.1 TiB per TiB stored. Data moved to IA does not count toward the baseline. Simulate the product image folder during a bulk catalog import:
Chọn cấu hình, kéo thanh trượt, sau đó nhấn Chạy 6 giờ. Đợt cao điểm bắt đầu ở phút thứ 30; ngoài đợt cao điểm hệ thống gần như không có tải.
On performance modes: older study material often picks Max I/O for parallel big data jobs. Current AWS guidance (Amazon EFS performance specifications) lists Max I/O as previous generation with higher per-operation latency, and recommends General Purpose for all file systems, with Elastic throughput for spiky workloads. MFTECH uses this current configuration.
MFTECH’s recommendation team runs a Lambda function in a VPC that must read a dataset on an EFS file system owned by a data partner’s account. Lambda mounts EFS through an access point; build the setup step by step:
For other considerations when Lambda runs in a VPC (internet access, NAT gateway), see the Lambda lesson.
- EFS: an NFS file system shared across multiple AZs.
- Recommended configuration: General Purpose performance mode + Elastic throughput; Max I/O is previous generation (older material may still recommend Max I/O for parallel workloads).
- Bursting: throughput tied to Standard storage size, using burst credits.
- Throughput needs known in advance: Provisioned throughput.
- Rarely accessed files: the IA class.
- No need to survive an AZ loss and low cost first: One Zone.
- Instances mount through the mount target in their own AZ to reduce latency.
- Lambda mounts EFS through an access point.