Skip to content

638 倍的 stat 不是页面延迟

638 倍的 stat 不是页面延迟

本文由 AI 从英文翻译。 阅读英文原文

两个数字,两种负载,而且都不是页面延迟。638 倍说的是一个 stat——一次文件元数据查询,对象是刚创建的文件,EFS 对块设备。4 倍说的是合成请求式扫描里 stat 的总耗时平均值,对比本地卷,而中位数差距其实接近 1.2 到 1.3 倍。这个平均值是真的,但它还是没法告诉你哪一个请求慢。

全文都按名字引用各项结论;所有这些结论,连同背后的运行记录,都在 study repository 里。

测量工具:需求先定死

WordPress 在这里只是一个样本,代表大多数系统都逃不掉的一类软件:写的时候对象存储还不普及,默认有 POSIX 文件系统,核心代码、插件、主题和模板层级都会不停去查它。把应用当黑盒,是这项研究的约束。我改 task definition、挂载拓扑、容器镜像、php.ini 和 opcache,还有各种代理;应用本身不动。这套架构的朴素版本是我六年前搭的,在这儿它只是个出身说明,不是研究对象。

下面每个计数都按热请求算。一个热请求大概发出 4,300 次文件系统 syscall,其中约 3,900 次是 stat,我试过的 php.ini 配置没有一个能把这个下限压下去(热请求 syscall 普查,E0-n10)。冷请求是另一组数字,15,400 到 16,400 次操作,不计入热请求的计数。

测量项计数
首页 / 商品页 / wp-admin,总 syscall5,157 / 5,265 / 5,140
带真实商品的购物车与结账,总 syscall5,941 / 5,884
wp-includes(核心),文件系统操作约 103
wpforms-lite,文件系统操作约 1,155
Elementor / WooCommerce / 主题 / ACF590 / 528 / 214 / 137
ENOENT 查询约 1,600

端点那几行是总 syscall,不是文件系统调用,所以数字比普查高;内容页和 WooCommerce 页之间差 14% 到 15%,十次重复之间则完全没有波动(购物车与结账计数,E0-cart-checkout)。文件系统调用里大约有 1,600 次返回 ENOENT,也就是应用在问某个文件到底存不存在。在块设备上,这个问题几乎不花钱;在网络文件系统上,这就是花了延迟什么也没换到。这一大堆调用来自插件代码而不是核心,是按组件观察出来的。每个探测为什么存在,是推测的,因为没把任何一个调用点追回到 PHP 源码。

大家常推荐的那两个设置,改变的是应用问的频率,不是问的量。关掉 opcache.validate_timestamps 大约能省掉 700 次 open 调用,以及在重新校验窗口内约 1.8% 的 stat;而开着校验的配置,每个 revalidate_freq 窗口要交一次约 +4,400 次 stat 的税,默认 2 秒一交,调过的 60 秒一交(同一份普查,E0-n10)。我跑的那三种配置——包括把 realpath_cache 调到 32 MB、TTL 设成 3600 秒的那种——下限都还在 3,900 左右(PHP 配置对比,E0-first-run)。这笔税是按窗口交的,所以在低流量站点上,摊到每个请求才最划算。

两个数字,两种负载

每次调用 · 一次 stat,新建文件

1101001000每次调用 · 一次 stat,新建文件 — replication 1 of 1: 638.2×638.2×

638.2×

每个请求 · 中位数

1101001000每个请求 · 中位数 — replication 1 of 3: 1.21×1.21×每个请求 · 中位数 — replication 2 of 3: 1.29×1.29×每个请求 · 中位数 — replication 3 of 3: 1.25×1.25×

1.21× / 1.29× / 1.25×

每个请求 · 平均值

1101001000每个请求 · 平均值 — replication 1 of 3: 3.91×3.91×每个请求 · 平均值 — replication 2 of 3: 4.43×4.43×每个请求 · 平均值 — replication 3 of 3: 5.19×5.19×

3.91× / 4.43× / 5.19×

每个请求 · p99

1101001000每个请求 · p99 — replication 1 of 3: 88.7×88.7×每个请求 · p99 — replication 2 of 3: 125.9×125.9×每个请求 · p99 — replication 3 of 3: 87.6×87.6×

88.7× / 125.9× / 87.6×

每次调用 · 一次 stat,新建文件

1101001000每次调用 · 一次 stat,新建文件 — replication 1 of 1: 638.2×638.2×

638.2×

每个请求 · 中位数

1101001000每个请求 · 中位数 — replication 1 of 3: 1.21×1.21×每个请求 · 中位数 — replication 2 of 3: 1.29×1.29×每个请求 · 中位数 — replication 3 of 3: 1.25×1.25×

1.21× / 1.29× / 1.25×

每个请求 · 平均值

1101001000每个请求 · 平均值 — replication 1 of 3: 3.91×3.91×每个请求 · 平均值 — replication 2 of 3: 4.43×4.43×每个请求 · 平均值 — replication 3 of 3: 5.19×5.19×

3.91× / 4.43× / 5.19×

每个请求 · p99

1101001000每个请求 · p99 — replication 1 of 3: 88.7×88.7×每个请求 · p99 — replication 2 of 3: 125.9×125.9×每个请求 · p99 — replication 3 of 3: 87.6×87.6×

88.7× / 125.9× / 87.6×

Log₁₀ scale · ratio · Supplied replications

同一个比较,两个分母。每次调用:638.2×,在刚创建的文件上测得。每个请求:同一个文件系统在接近真实的访问模式下,中位数 1.21× / 1.29× / 1.25×、平均值 3.91× / 4.43× / 5.19×、p99 88.7× / 125.9× / 87.6×(每个 replication 一个值)。对数刻度;run results/E2/20260910T163206Z-66dcff8, results/E5-formal/20261028T160106Z-dd5fce0。

Source: mikeng-io/aws-wordpress@b52192b
results/E2/20260910T163206Z-66dcff8 · results/E5-formal/20261028T160106Z-dd5fce0

Measurement definitions / Command
每次调用 · 一次 stat,新建文件
EC2 EFS direct TLS stat p50 / EC2 instance-store stat p50, pooled across three replications. Formula: raw numerator / raw denominator in ns, before display rounding; no ratio field exists in the pinned summary. Source JSON pointers (numerator, denominator): /tiers/ec2~1efs/stat/p50_ns; /tiers/ec2~1instance_store/stat/p50_ns.
每个请求 · 中位数
EFS plain per-request summed stat time median / matched-EBS median, delta=1 s. Leaves are numerator, denominator pairs per replication in chronological order of the three eligible formal-v3 replications. Formula: raw numerator / raw denominator in ns, before display rounding; no ratio field exists in the pinned summary. Source JSON pointers (numerator, denominator): /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/efs_per_request_ns/median; /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/ebs_per_request_ns/median; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/efs_per_request_ns/median; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/ebs_per_request_ns/median; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/efs_per_request_ns/median; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/ebs_per_request_ns/median.
每个请求 · 平均值
Reported amortised per-request stat-time EFS plain / EBS ratios, delta=1 s; the array is the three eligible formal-v3 replications in chronological order. Source JSON pointers (output order): /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/efs_over_ebs; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/efs_over_ebs; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/efs_over_ebs.
每个请求 · p99
EFS plain per-request summed stat time p99 / matched-EBS p99, delta=1 s. Leaves are numerator, denominator pairs per replication in chronological order of the three eligible formal-v3 replications. Formula: raw numerator / raw denominator in ns, before display rounding; no ratio field exists in the pinned summary. Source JSON pointers (numerator, denominator): /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/efs_per_request_ns/p99; /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/ebs_per_request_ns/p99; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/efs_per_request_ns/p99; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/ebs_per_request_ns/p99; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/efs_per_request_ns/p99; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/ebs_per_request_ns/p99.
python3 analysis/export_figures.py

EFS 上一次 stat 的耗时,是块设备上同样调用的 638 倍。而在一次请求式扫描里——文件至少创建了两分钟,一个客户端每秒把每个文件 stat 一次——stat 总耗时大约是同样扫描打到本地 EBS 上时中位数的 1.2 到 1.3 倍、平均值的 3.9 到 5.2 倍。把这两个比值乘起来,你会得到一个没人测过的数字,我早先一版结论里就这么干过;而按请求算出来的结果也并没有推翻按调用算的那个,它只是把适用范围重划了一遍。你可能单见过被引用的 638 倍,就出自那一版。这些扫描用的是合成目录树,不是 WordPress 的请求路径,这里也没有任何数字被放大到上面那 3,900 次的普查规模上。

档位stat p50open+read p50create p50unlink p50
实例存储1.3 µs5.2 µs19.7 µs7.5 µs
EBS gp31.3 µs5.3 µs19.9 µs7.6 µs
Fargate 临时存储1.8 µs5.7 µs21.9 µs11.4 µs
EC2 + EFS,Elastic 吞吐 / One Zone / General Purpose / NFS 4.1814 µs904 µs7.34 ms3.00 ms
Fargate + EFS,同配置778 µs679 µs6.99 ms2.93 ms

数据来自三次重复、每组三个独立部署的合并结果(逐调用档位矩阵,E2-block-backed)。全文的比值都用未取整的合并 p50 算,所以拿这张取整过的表自己重算,会得到 626 倍而不是 638 倍。块存储这几种在这里分不出来:实例存储对 EBS,stat 1.00 倍、open+read 1.03 倍、create 1.01 倍、unlink 1.02 倍,p99 也是同样的走向。跨过这条界线就完全没得比:stat 638 倍、unlink 399 倍、create 373 倍、open+read 174 倍。元数据操作吃的亏,比小文件 open+read 那趟大得多,问题的形状就是这样:服务端支撑的档位,干这种读还行,回答”文件是什么状态”就惨了太多。这不是吞吐测试,我也不打算从里面读出任何关于搬字节的结论。

协议而非硬件,是我的推断,不是单独跑出来的结果:没有任何一次运行只改协议,所以它靠的是三种块存储表现一致、六种 EFS 配置表现一致。四个候选变量测出来都是噪声,重复之间的底噪本来就在 1.49 到 1.82 倍:走本地 efs-proxy 的传输加密(按挂载路径 1.00 到 1.10 倍)、挂载拓扑(1.00 到 1.09 倍,而且 ECS 托管路径调用的是同一个 mount helper,跟手写的一样)、EFS 路径上 EC2 对 Fargate(stat 1.06 倍,create 1.01 倍)、以及六种 EFS 配置,stat p50 落在 683 到 786 µs,跨度 1.15 倍,各配置到块存储组的差距在 357 到 630 倍之间。合并出来的 638 倍是标题数字;357 到 630 倍是单个配置各自能做到的。这些都是同一台测量工具上的逐调用结论,没有一个被证明是尾延迟的杠杆。

有两组数据要分开看:上面 Fargate 临时存储那行来自档位矩阵,另一组单独收集的数据测了三个 Fargate task、4,020 个样本(Fargate 临时存储结论,E3-fargate-ephemeral)。再分开一层,EFS 是每个 task 挂一次,不是每台主机挂一次。同一个 t4g.small 上的两个 task,同样的 task definition 和文件系统,产生了两个 NFS4 客户端挂载、两个 efs-proxy 进程和各自独立的属性缓存(挂载隔离结论,E1-mount-per-task)。同机 task 互相预热缓存这种事默认不会发生,这也是为什么一个 task 能确定本地持有的代码,只有它自己写到本地的那份。刻意共享主机挂载的方案从来没测过,我对此不做任何断言。

文件年龄、缓存历史和计时器

EFS

07.173EFS — replication 1 of 3: 7.173 s7.173 sEFS — replication 2 of 3: 6.502 s6.502 sEFS — replication 3 of 3: 7.122 s7.122 s

7.173 s / 6.502 s / 7.122 s

FSx OpenZFS

07.173FSx OpenZFS — replication 1 of 3: 3.385 s3.385 sFSx OpenZFS — replication 2 of 3: 3.408 s3.408 sFSx OpenZFS — replication 3 of 3: 3.416 s3.416 s

3.385 s / 3.408 s / 3.416 s

FSx ONTAP

07.173FSx ONTAP — replication 1 of 3: 0.9938 s0.9938 sFSx ONTAP — replication 2 of 3: 0.9682 s0.9682 sFSx ONTAP — replication 3 of 3: 0.9875 s0.9875 s

0.9938 s / 0.9682 s / 0.9875 s

EFS

07.173EFS — replication 1 of 3: 7.173 s7.173 sEFS — replication 2 of 3: 6.502 s6.502 sEFS — replication 3 of 3: 7.122 s7.122 s

7.173 s / 6.502 s / 7.122 s

FSx OpenZFS

07.173FSx OpenZFS — replication 1 of 3: 3.385 s3.385 sFSx OpenZFS — replication 2 of 3: 3.408 s3.408 sFSx OpenZFS — replication 3 of 3: 3.416 s3.416 s

3.385 s / 3.408 s / 3.416 s

FSx ONTAP

07.173FSx ONTAP — replication 1 of 3: 0.9938 s0.9938 sFSx ONTAP — replication 2 of 3: 0.9682 s0.9682 sFSx ONTAP — replication 3 of 3: 0.9875 s0.9875 s

0.9938 s / 0.9682 s / 0.9875 s

Linear scale · s · Supplied replications

在每个 tier 创建测试文件所需的秒数,每个 replication 一个点:EFS 为 7.173 s / 6.502 s / 7.122 s,对比 ONTAP 的 0.9938 s / 0.9682 s / 0.9875 s。下一张图说明这对 benchmark 意味着什么。Run results/E2/20261015T000959Z-85382cc。

Source: mikeng-io/aws-wordpress@b52192b
results/E2/20261015T000959Z-85382cc

Measurement definitions / Command
EFS
duration of the 1,000-file create pass, per replication; derived by analysis/e2_cache_window.py from the pinned FSx run's raw CSVs; the array is the three replications. Source JSON pointers (output order): /tiers/efs/replications/rep-1/create_pass_s; /tiers/efs/replications/rep-2/create_pass_s; /tiers/efs/replications/rep-3/create_pass_s.
FSx OpenZFS
duration of the 1,000-file create pass, per replication; derived by analysis/e2_cache_window.py from the pinned FSx run's raw CSVs; the array is the three replications. Source JSON pointers (output order): /tiers/fsx_openzfs/replications/rep-1/create_pass_s; /tiers/fsx_openzfs/replications/rep-2/create_pass_s; /tiers/fsx_openzfs/replications/rep-3/create_pass_s.
FSx ONTAP
duration of the 1,000-file create pass, per replication; derived by analysis/e2_cache_window.py from the pinned FSx run's raw CSVs; the array is the three replications. Source JSON pointers (output order): /tiers/fsx_ontap/replications/rep-1/create_pass_s; /tiers/fsx_ontap/replications/rep-2/create_pass_s; /tiers/fsx_ontap/replications/rep-3/create_pass_s.
python3 analysis/export_figures.py

逐调用的 benchmark 先建一批文件,几秒后再去 stat 它们;测量工具跑一遍,就是一次 create 扫描加一次 stat 扫描。FSx 那一组把这样测的到底是什么给暴露了:在每一个 NFS 档位上,那些快的 stat 构成一段连续的尾部,对应最近创建的那批文件,终止在一个固定的年龄上(服务端支撑档位矩阵,E2-server-backed)。

档位,固定配置创建文件集耗时快速返回的 stat 占比边界年龄
EFS,Elastic / One Zone / General Purpose / NFS 4.16.5 到 7.2 s31% 到 38%2.30 到 2.48 s
FSx for OpenZFS,Single-AZ 64 GiB,128 MBps3.4 s68% 到 70%2.91 到 2.92 s
FSx for ONTAP,Single-AZ gen-1 1024 GiB,128 MBps1.0 s100%整趟扫描都在窗口内

create 扫描越快,stat 扫描开始时落在有效期内的文件就越多,于是更多 stat 在本地就被答掉了。ONTAP 对 1,000 次 stat 只发了 8 个 GETATTR RPC,它在同一组里 1.7 µs 的 p50 是缓存命中,不是一次往返。这只属于它那个 Single-AZ gen-1、1024 GiB、128 MBps 的配置点,不属于 ONTAP 这个服务。

这个边界是 Linux 客户端的 acregmin,默认 3 秒(nfs(5)),退避逻辑是从内核 v6.1 的 fs/nfs/inode.c 读出来的,不是从这些运行里反推的。每一次重新校验发现没变化,超时就翻倍,3 → 6 → 12 → 24 → 48 → 60 秒,上限是 acregmax,任何改动都会把它重置。所以文件超过 60 秒,并不是产生 miss 的原因:计时器跟的是这个客户端上 inode 的重新校验历史,这就是为什么一个一年前写的 PHP 文件,在冷挂载上第一次被查到,也跟全新的文件一样从 3 秒开始。

ServerLinux NFS clientApplicationServerLinux NFS clientApplicationfirst touch on a cold clientattributes valid, up to 60 svalidity elapsesopt[read delegation held, OpenZFScapability only]statLOOKUP compoundattributes, timer starts at acregminansweredstat againanswered from memory, no RPCstat after expiryGETATTRunchanged, timeout doubles toward acregmaxansweredstatanswered locally, timer never runs

由此会出来两种不同的 miss 负载。冷客户端上的第一次接触——task 启动、扩容、或者一次部署之后——要付一个 LOOKUP 复合操作,在 EFS 那几组上测得是重新校验成本的 2.8 到 4.4 倍,OpenZFS 上是 1.04 到 1.08 倍(其中一次重复是 0.72 倍),ONTAP 上是 1.08 到 1.44 倍(首次接触与重新校验对比,E5-attribute-cache)。这个高溢价是 EFS 的观察结果,不是 NFS 的属性。稳态重新校验则是每个文件大约每个 acregmax 付一次 GETATTR:EFS 上 263 到 357 µs,OpenZFS 上 69 到 98 µs,ONTAP 上 109 到 111 µs。这修正了我自己早先的一个数字——逐调用 benchmark 里 EFS miss 成本 827 µs——那个在这里复现不出来;这些数字是它的 0.32 到 0.43 倍,因为那是另一种 miss。

计时器到底能不能停,是协议能力问题。EFS 不能授予 NFSv4 delegation,所以 OPEN 永远返回 OPEN_DELEGATE_NONE(EFS limits);FSx for OpenZFS 可以授予读 delegation(OpenZFS performance guide),运行记录里在它上面数到 1,000 次 DELEGRETURN,EFS 和 ONTAP 上是零。持有 delegation 的客户端会在本地答掉 stat,根本不启动计时器。这是”能持有 delegation”的能力,不是说 OpenZFS 上每次访问都持有。

这个机制是有文档和内核支持、又能对上实测边界的推断;要定论,得去改 actimeo 然后看边界怎么动。用 20 µs 这个门槛判定一次 stat 是”从客户端内存里答的”,是事后定的描述性规则。而这个缺陷是指标范围的问题,不是 benchmark 作者的问题:在刚创建的文件上做逐调用测量,等于让不同档位在缓存生命周期的不同位置上比——EFS 只有 31% 到 38% 的 stat、OpenZFS 只有 68% 到 70% 落在窗口内,ONTAP 则全部落在里面。它测的是一个取决于创建历史的命中/未命中混合体,不是一个均匀预热的缓存。

心跳:直到过期前几乎打平

  • EFS · 每个请求的 stat 时间 ×3
  • EBS 对照组 · 每个请求的 stat 时间 ×3
1101001000 EFS · 每个请求的 stat 时间 — median: 2.14 ms; mean: 6.942 ms; p99: 164.1 ms; max: 233.3 ms EFS · 每个请求的 stat 时间 — median: 2.14 ms 2.14 ms EFS · 每个请求的 stat 时间 — mean: 6.942 ms 6.942 ms EFS · 每个请求的 stat 时间 — p99: 164.1 ms 164.1 ms EFS · 每个请求的 stat 时间 — max: 233.3 ms 233.3 ms EFS · 每个请求的 stat 时间 — median: 2.091 ms; mean: 7.221 ms; p99: 216.6 ms; max: 244.1 ms EFS · 每个请求的 stat 时间 — median: 2.091 ms 2.091 ms EFS · 每个请求的 stat 时间 — mean: 7.221 ms 7.221 ms EFS · 每个请求的 stat 时间 — p99: 216.6 ms 216.6 ms EFS · 每个请求的 stat 时间 — max: 244.1 ms 244.1 ms EFS · 每个请求的 stat 时间 — median: 1.875 ms; mean: 7.947 ms; p99: 151.3 ms; max: 262.4 ms EFS · 每个请求的 stat 时间 — median: 1.875 ms 1.875 ms EFS · 每个请求的 stat 时间 — mean: 7.947 ms 7.947 ms EFS · 每个请求的 stat 时间 — p99: 151.3 ms 151.3 ms EFS · 每个请求的 stat 时间 — max: 262.4 ms 262.4 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.773 ms; mean: 1.775 ms; p99: 1.849 ms; max: 3.454 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.773 ms 1.773 ms EBS 对照组 · 每个请求的 stat 时间 — mean: 1.775 ms 1.775 ms EBS 对照组 · 每个请求的 stat 时间 — p99: 1.849 ms 1.849 ms EBS 对照组 · 每个请求的 stat 时间 — max: 3.454 ms 3.454 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.627 ms; mean: 1.63 ms; p99: 1.72 ms; max: 2.932 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.627 ms 1.627 ms EBS 对照组 · 每个请求的 stat 时间 — mean: 1.63 ms 1.63 ms EBS 对照组 · 每个请求的 stat 时间 — p99: 1.72 ms 1.72 ms EBS 对照组 · 每个请求的 stat 时间 — max: 2.932 ms 2.932 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.501 ms; mean: 1.533 ms; p99: 1.727 ms; max: 2.763 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.501 ms 1.501 ms EBS 对照组 · 每个请求的 stat 时间 — mean: 1.533 ms 1.533 ms EBS 对照组 · 每个请求的 stat 时间 — p99: 1.727 ms 1.727 ms EBS 对照组 · 每个请求的 stat 时间 — max: 2.763 ms 2.763 ms medianmeanp99max

EFS · 每个请求的 stat 时间 — median: 2.14 ms / mean: 6.942 ms / p99: 164.1 ms / max: 233.3 ms

EFS · 每个请求的 stat 时间 — median: 2.091 ms / mean: 7.221 ms / p99: 216.6 ms / max: 244.1 ms

EFS · 每个请求的 stat 时间 — median: 1.875 ms / mean: 7.947 ms / p99: 151.3 ms / max: 262.4 ms

EBS 对照组 · 每个请求的 stat 时间 — median: 1.773 ms / mean: 1.775 ms / p99: 1.849 ms / max: 3.454 ms

EBS 对照组 · 每个请求的 stat 时间 — median: 1.627 ms / mean: 1.63 ms / p99: 1.72 ms / max: 2.932 ms

EBS 对照组 · 每个请求的 stat 时间 — median: 1.501 ms / mean: 1.533 ms / p99: 1.727 ms / max: 2.763 ms

1101001000 EFS · 每个请求的 stat 时间 — median: 2.14 ms; mean: 6.942 ms; p99: 164.1 ms; max: 233.3 ms EFS · 每个请求的 stat 时间 — median: 2.14 ms 2.14 ms EFS · 每个请求的 stat 时间 — mean: 6.942 ms 6.942 ms EFS · 每个请求的 stat 时间 — p99: 164.1 ms 164.1 ms EFS · 每个请求的 stat 时间 — max: 233.3 ms 233.3 ms EFS · 每个请求的 stat 时间 — median: 2.091 ms; mean: 7.221 ms; p99: 216.6 ms; max: 244.1 ms EFS · 每个请求的 stat 时间 — median: 2.091 ms 2.091 ms EFS · 每个请求的 stat 时间 — mean: 7.221 ms 7.221 ms EFS · 每个请求的 stat 时间 — p99: 216.6 ms 216.6 ms EFS · 每个请求的 stat 时间 — max: 244.1 ms 244.1 ms EFS · 每个请求的 stat 时间 — median: 1.875 ms; mean: 7.947 ms; p99: 151.3 ms; max: 262.4 ms EFS · 每个请求的 stat 时间 — median: 1.875 ms 1.875 ms EFS · 每个请求的 stat 时间 — mean: 7.947 ms 7.947 ms EFS · 每个请求的 stat 时间 — p99: 151.3 ms 151.3 ms EFS · 每个请求的 stat 时间 — max: 262.4 ms 262.4 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.773 ms; mean: 1.775 ms; p99: 1.849 ms; max: 3.454 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.773 ms 1.773 ms EBS 对照组 · 每个请求的 stat 时间 — mean: 1.775 ms 1.775 ms EBS 对照组 · 每个请求的 stat 时间 — p99: 1.849 ms 1.849 ms EBS 对照组 · 每个请求的 stat 时间 — max: 3.454 ms 3.454 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.627 ms; mean: 1.63 ms; p99: 1.72 ms; max: 2.932 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.627 ms 1.627 ms EBS 对照组 · 每个请求的 stat 时间 — mean: 1.63 ms 1.63 ms EBS 对照组 · 每个请求的 stat 时间 — p99: 1.72 ms 1.72 ms EBS 对照组 · 每个请求的 stat 时间 — max: 2.932 ms 2.932 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.501 ms; mean: 1.533 ms; p99: 1.727 ms; max: 2.763 ms EBS 对照组 · 每个请求的 stat 时间 — median: 1.501 ms 1.501 ms EBS 对照组 · 每个请求的 stat 时间 — mean: 1.533 ms 1.533 ms EBS 对照组 · 每个请求的 stat 时间 — p99: 1.727 ms 1.727 ms EBS 对照组 · 每个请求的 stat 时间 — max: 2.763 ms 2.763 ms medianmeanp99max

EFS · 每个请求的 stat 时间 — median: 2.14 ms / mean: 6.942 ms / p99: 164.1 ms / max: 233.3 ms

EFS · 每个请求的 stat 时间 — median: 2.091 ms / mean: 7.221 ms / p99: 216.6 ms / max: 244.1 ms

EFS · 每个请求的 stat 时间 — median: 1.875 ms / mean: 7.947 ms / p99: 151.3 ms / max: 262.4 ms

EBS 对照组 · 每个请求的 stat 时间 — median: 1.773 ms / mean: 1.775 ms / p99: 1.849 ms / max: 3.454 ms

EBS 对照组 · 每个请求的 stat 时间 — median: 1.627 ms / mean: 1.63 ms / p99: 1.72 ms / max: 2.932 ms

EBS 对照组 · 每个请求的 stat 时间 — median: 1.501 ms / mean: 1.533 ms / p99: 1.727 ms / max: 2.763 ms

Log₁₀ scale · ms · Ordered positions · straight segments join supplied observations

每个请求加总的 stat 时间,从中位数到最大值排成阶梯,EFS 与 EBS 对照组各三个 replication,同一对数刻度。对照组保持平直;EFS 在尾部离开它。间距是次序性的,不是时间轴。Run results/E5-formal/20261028T160106Z-dd5fce0。

Source: mikeng-io/aws-wordpress@b52192b
results/E5-formal/20261028T160106Z-dd5fce0

Measurement definitions / Command
EFS · 每个请求的 stat 时间
Per-request summed stat time on EFS plain, delta=1 s, eligible formal-v3 replication 1 in chronological order. Percentile ladder, element order median, mean (amortised), p99, max; every element ns/1e6 (milliseconds) at four significant figures, exact ns in raw. Milliseconds because a request's summed stat time runs from ~1.5 ms to ~260 ms. Source JSON pointers (output order): /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/efs_per_request_ns/median; /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/efs_per_request_ns/amortised; /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/efs_per_request_ns/p99; /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/efs_per_request_ns/max.
EFS · 每个请求的 stat 时间
Per-request summed stat time on EFS plain, delta=1 s, eligible formal-v3 replication 2 in chronological order. Percentile ladder, element order median, mean (amortised), p99, max; every element ns/1e6 (milliseconds) at four significant figures, exact ns in raw. Milliseconds because a request's summed stat time runs from ~1.5 ms to ~260 ms. Source JSON pointers (output order): /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/efs_per_request_ns/median; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/efs_per_request_ns/amortised; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/efs_per_request_ns/p99; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/efs_per_request_ns/max.
EFS · 每个请求的 stat 时间
Per-request summed stat time on EFS plain, delta=1 s, eligible formal-v3 replication 3 in chronological order. Percentile ladder, element order median, mean (amortised), p99, max; every element ns/1e6 (milliseconds) at four significant figures, exact ns in raw. Milliseconds because a request's summed stat time runs from ~1.5 ms to ~260 ms. Source JSON pointers (output order): /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/efs_per_request_ns/median; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/efs_per_request_ns/amortised; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/efs_per_request_ns/p99; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/efs_per_request_ns/max.
EBS 对照组 · 每个请求的 stat 时间
Per-request summed stat time on the matched-EBS control, delta=1 s, eligible formal-v3 replication 1 in chronological order. Percentile ladder, element order median, mean (amortised), p99, max; every element ns/1e6 (milliseconds) at four significant figures, exact ns in raw. Milliseconds because a request's summed stat time runs from ~1.5 ms to ~260 ms. Source JSON pointers (output order): /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/ebs_per_request_ns/median; /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/ebs_per_request_ns/amortised; /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/ebs_per_request_ns/p99; /predictions/9/per_replication/20261028T103017Z-342d6b4~1rep-1/ebs_per_request_ns/max.
EBS 对照组 · 每个请求的 stat 时间
Per-request summed stat time on the matched-EBS control, delta=1 s, eligible formal-v3 replication 2 in chronological order. Percentile ladder, element order median, mean (amortised), p99, max; every element ns/1e6 (milliseconds) at four significant figures, exact ns in raw. Milliseconds because a request's summed stat time runs from ~1.5 ms to ~260 ms. Source JSON pointers (output order): /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/ebs_per_request_ns/median; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/ebs_per_request_ns/amortised; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/ebs_per_request_ns/p99; /predictions/9/per_replication/20261028T125412Z-f6659e0~1rep-1/ebs_per_request_ns/max.
EBS 对照组 · 每个请求的 stat 时间
Per-request summed stat time on the matched-EBS control, delta=1 s, eligible formal-v3 replication 3 in chronological order. Percentile ladder, element order median, mean (amortised), p99, max; every element ns/1e6 (milliseconds) at four significant figures, exact ns in raw. Milliseconds because a request's summed stat time runs from ~1.5 ms to ~260 ms. Source JSON pointers (output order): /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/ebs_per_request_ns/median; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/ebs_per_request_ns/amortised; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/ebs_per_request_ns/p99; /predictions/9/per_replication/20261028T160106Z-dd5fce0~1rep-1/ebs_per_request_ns/max.
python3 analysis/export_figures.py

第二台测量工具在测量前至少 120 秒,从另一个挂载把文件铺好,这样每个测量挂载见到它们都是冷的。一个客户端以 0.1 秒、1 秒或 10 秒的间隔去 stat 每个文件,预热 300 秒,测量 600 秒。miss 是按 mountstats 的 RPC 计数器分级的,不是按延迟阈值,因为计数器能说一次调用有没有上网,计时器只能说它花了多久。这些计数器数的是 RPC 操作,跟文件 miss 事件不是同一个量,所以我只报速率,不换算成命中率百分比。

在 1 秒的节奏下,EFS 大约是每次成功 stat 0.017 次 RPC 操作:0.1 秒时是 0.0017,10 秒时是 0.16。所以在贴近真实的节奏下,网上的活动很低,客户端几乎全靠内存作答。换来的是大约 2 ms 的中位请求总 stat 耗时,三次重复分别是 2.14 / 2.09 / 1.88 ms,对 EBS 的 1.77 / 1.63 / 1.50 ms。平均值是 3.91 倍、4.43 倍和 5.19 倍。p99 是 151 到 217 ms,最大值 233 到 262 ms(节奏结论,E5-attribute-cache)。这些都是 EC2 纯主机挂载那一组的 stat 总耗时,不是端到端页面延迟,也不是 WordPress 路径。

集中度是让这个形状能读懂的关键。前 5% 的请求承担了 82.9%、89.4% 和 82.5% 的 NFS RPC 操作。第一次重复的原始逐请求耗时里——我是手工看的,没走提交的推导——慢于 20 ms 的请求在 EFS 上按 56 到 59 秒的间隔成簇出现,EBS 对照组上一次都没有。这次检查只覆盖一次重复。它跟 60 秒窗口吻合,也跟”一起编译的文件一起过期”吻合,两者都还是推断;数据里没有任何东西能把同步过期跟突发出现的其他原因区分开。

Lustre 是对照组,用来说明没有属性计时器能换来什么:它在每个间隔上的慢调用占比都保持在 0.157% 到 0.335%,实验设的界是 1%,同时段的 EBS 对照组是 0.0000% 到 0.0243%,配置为 Scratch 2、1200 GiB、版本 2.15。这是一个延迟观察,不是锁状态的证明。

平均值是最容易读歪的地方。它测到的总 stat 耗时是实打实的工作,作为”总等待”模型的输入是站得住脚的——前提是这个模型讲的就是总量;它做不到的是描述典型请求(在 2 ms 附近),或者那种集中的卡顿(在 151 到 217 ms)。这个总等待会不会变成机队成本,取决于并发度、worker 占用和你的延迟目标,这三样这项研究都没测。

启动类型决定了你能选什么

EFS

0100EFS — replication 1 of 3: 33.5%33.5%EFS — replication 2 of 3: 37.8%37.8%EFS — replication 3 of 3: 30.9%30.9%

33.5% / 37.8% / 30.9%

FSx OpenZFS

0100FSx OpenZFS — replication 1 of 3: 69.6%69.6%FSx OpenZFS — replication 2 of 3: 68.9%68.9%FSx OpenZFS — replication 3 of 3: 67.9%67.9%

69.6% / 68.9% / 67.9%

FSx ONTAP

0100FSx ONTAP — replication 1 of 3: 100%100%FSx ONTAP — replication 2 of 3: 100%100%FSx ONTAP — replication 3 of 3: 100%100%

100% / 100% / 100%

EFS

0100EFS — replication 1 of 3: 33.5%33.5%EFS — replication 2 of 3: 37.8%37.8%EFS — replication 3 of 3: 30.9%30.9%

33.5% / 37.8% / 30.9%

FSx OpenZFS

0100FSx OpenZFS — replication 1 of 3: 69.6%69.6%FSx OpenZFS — replication 2 of 3: 68.9%68.9%FSx OpenZFS — replication 3 of 3: 67.9%67.9%

69.6% / 68.9% / 67.9%

FSx ONTAP

0100FSx ONTAP — replication 1 of 3: 100%100%FSx ONTAP — replication 2 of 3: 100%100%FSx ONTAP — replication 3 of 3: 100%100%

100% / 100% / 100%

Linear scale · percent · Supplied replications

由 client memory 直接回答的 stat 占比,依据正文说明、并标明是事后回看才定下的描述规则:EFS 33.5% / 37.8% / 30.9%,ONTAP 100% / 100% / 100%。创建文件最快的 tier 看起来最快,因为它的文件仍在 attribute-cache 窗口内。Run results/E2/20261015T000959Z-85382cc。

Source: mikeng-io/aws-wordpress@b52192b
results/E2/20261015T000959Z-85382cc

Measurement definitions / Command
EFS
share of the 1,000 stat calls answered in client memory under the descriptive, post-hoc 20 us rule (stat latency < 20 us = answered in client memory), declared after inspecting the run's samples and not pre-registered; every absolute threshold in the 15-30 us sensitivity range yields identical shares, so the value is not tuned. It disagrees with the repo's registered E3-gated k-means clustering rule, which leaves ONTAP and Lustre undefined and is kept as per-rep diagnostics (registered_rule) in the derived file, per replication; derived by analysis/e2_cache_window.py from the pinned FSx run's raw CSVs; the array is the three replications. Source JSON pointers (output order): /tiers/efs/replications/rep-1/answered_local_share; /tiers/efs/replications/rep-2/answered_local_share; /tiers/efs/replications/rep-3/answered_local_share.
FSx OpenZFS
share of the 1,000 stat calls answered in client memory under the descriptive, post-hoc 20 us rule (stat latency < 20 us = answered in client memory), declared after inspecting the run's samples and not pre-registered; every absolute threshold in the 15-30 us sensitivity range yields identical shares, so the value is not tuned. It disagrees with the repo's registered E3-gated k-means clustering rule, which leaves ONTAP and Lustre undefined and is kept as per-rep diagnostics (registered_rule) in the derived file, per replication; derived by analysis/e2_cache_window.py from the pinned FSx run's raw CSVs; the array is the three replications. Source JSON pointers (output order): /tiers/fsx_openzfs/replications/rep-1/answered_local_share; /tiers/fsx_openzfs/replications/rep-2/answered_local_share; /tiers/fsx_openzfs/replications/rep-3/answered_local_share.
FSx ONTAP
share of the 1,000 stat calls answered in client memory under the descriptive, post-hoc 20 us rule (stat latency < 20 us = answered in client memory), declared after inspecting the run's samples and not pre-registered; every absolute threshold in the 15-30 us sensitivity range yields identical shares, so the value is not tuned. It disagrees with the repo's registered E3-gated k-means clustering rule, which leaves ONTAP and Lustre undefined and is kept as per-rep diagnostics (registered_rule) in the derived file, per replication; derived by analysis/e2_cache_window.py from the pinned FSx run's raw CSVs; the array is the three replications. Source JSON pointers (output order): /tiers/fsx_ontap/replications/rep-1/answered_local_share; /tiers/fsx_ontap/replications/rep-2/answered_local_share; /tiers/fsx_ontap/replications/rep-3/answered_local_share.
python3 analysis/export_figures.py

下面这张表编码的规则是:哪些档位对你是存在的,在做任何性能提问之前,就已经由启动类型定死了。

档位在 EC2 上在 Fargate 上由什么决定
EFSECS 托管卷,或主机挂载加 bindECS 托管卷,平台 1.4.0+mount helper,端口 2049
EBS gp3ECS 卷或根卷AWS 文档列为一种卷选项没有实测的 Fargate 组
FSx for Lustre主机挂载加 bind不可用不是 ECS 卷类型
FSx for OpenZFS主机挂载加 bind不可用不是 ECS 卷类型
FSx for ONTAPtask definition 卷,原生 NFS只有 S3 Access Points,S3 API 不是 POSIX要原生 NFS 就得上 EC2
S3 Access PointsS3 API可达,但不是挂载对象语义,不是 POSIX

上面这些可用性是查文档得来的,不是测的(ECS data volumes)。FUSE 类档位缺席是平台原因而不是测试结果:它们需要 CAP_SYS_ADMIN,而 Fargate 只允许添加一个 Linux capability,就是 CAP_SYS_PTRACE(Fargate task considerations)。研究里所有 FUSE 测量都在 EC2 上做的,Fargate 上一次都没试过。

档位固定配置
EFSElastic 吞吐、One Zone、General Purpose、传输加密开、NFS 4.1
FSx for OpenZFSSingle-AZ、64 GiB、预置 128 MBps(不是 64 MBps 那个下限)、压缩 NONE
FSx for ONTAPSingle-AZ gen-1、1024 GiB、128 MBps、无快照、存储效率关
FSx for LustreScratch 2、1200 GiB、版本 2.15、挂载参数 -o flock

每一行是一个配置点,不是服务级的延迟属性。预置吞吐决定 FSx 文件服务器内存里元数据缓存的大小,所以 OpenZFS 和 ONTAP 的数字里,有一部分就是这个上限;Scratch 2 不是 Persistent,这里也没有任何东西描述 Persistent 部署类型。加密 EFS 那一行属于逐调用那一轮;上面的节奏结果来自纯主机挂载那一组。

测了三个文件系统,老实的总结比”淘汰赛”要窄。JuiceFS 达到 stat p50 104.6 µs,create 29.2 ms,主要是把文件内容写到 S3 的花费;注册这个实验,是为了回答”对象存储支撑的用户态文件系统能不能在元数据上比 EFS 快一个数量级”,而它比 EFS 缓存未命中的 p50 快 7.5 倍,落在”说不清”,不是赢也不是输(FUSE 结果,E2-fuse)。SeaweedFS 达到 stat 20.2 µs、create 2.28 ms,11 项一致性检查全过,这让它在 EC2 上成为一个真选项——只是这项研究没拿应用去测它。Mountpoint for S3 在每一次重复里都没能通过 11 项单节点检查中的 8 项,包括 rename 不覆盖目标、mtime 不前进,所以它没有延迟表:语义上的失败不能被平均进一个性能排名里。这三个的共同点是都不够格上 Fargate,那是平台排除,不是对软件下的判决。

预热把过期事件去掉了

  • EFS · stat
  • 已 hydrate 的本地目录树 · stat
110100100010000 EFS · stat — p50: 1388 µs; p95: 1745 µs; p99: 5106 µs EFS · stat — p50: 1388 µs 1388 µs EFS · stat — p95: 1745 µs 1745 µs EFS · stat — p99: 5106 µs 5106 µs 已 hydrate 的本地目录树 · stat — p50: 3.061 µs; p95: 3.938 µs; p99: 6.023 µs 已 hydrate 的本地目录树 · stat — p50: 3.061 µs 3.061 µs 已 hydrate 的本地目录树 · stat — p95: 3.938 µs 3.938 µs 已 hydrate 的本地目录树 · stat — p99: 6.023 µs 6.023 µs p50p95p99

EFS · stat — p50: 1388 µs / p95: 1745 µs / p99: 5106 µs

已 hydrate 的本地目录树 · stat — p50: 3.061 µs / p95: 3.938 µs / p99: 6.023 µs

110100100010000 EFS · stat — p50: 1388 µs; p95: 1745 µs; p99: 5106 µs EFS · stat — p50: 1388 µs 1388 µs EFS · stat — p95: 1745 µs 1745 µs EFS · stat — p99: 5106 µs 5106 µs 已 hydrate 的本地目录树 · stat — p50: 3.061 µs; p95: 3.938 µs; p99: 6.023 µs 已 hydrate 的本地目录树 · stat — p50: 3.061 µs 3.061 µs 已 hydrate 的本地目录树 · stat — p95: 3.938 µs 3.938 µs 已 hydrate 的本地目录树 · stat — p99: 6.023 µs 6.023 µs p50p95p99

EFS · stat — p50: 1388 µs / p95: 1745 µs / p99: 5106 µs

已 hydrate 的本地目录树 · stat — p50: 3.061 µs / p95: 3.938 µs / p99: 6.023 µs

Log₁₀ scale · us · Ordered positions · straight segments join supplied observations

EFS 与在启动时 hydrate 到 task-local storage 的代码树,两者的 stat 延迟,p50 到 p99,同一对数刻度。hydration 在启动时要付多少代价,正文已经说明。间距是次序性的。Run results/E4/20261029T091909Z-842d596。

Source: mikeng-io/aws-wordpress@b52192b
results/E4/20261029T091909Z-842d596

Measurement definitions / Command
EFS · stat
EFS stat percentile ladder, pooled across three deployments; element order p50, p95, p99; every element ns/1000 at four significant figures, exact ns in raw. Source JSON pointers (output order): /pooled/efs/stat/p50_ns; /pooled/efs/stat/p95_ns; /pooled/efs/stat/p99_ns.
已 hydrate 的本地目录树 · stat
Hydrated code-tree stat percentile ladder, pooled across three deployments; element order p50, p95, p99; every element ns/1000 at four significant figures, exact ns in raw. Source JSON pointers (output order): /pooled/hydrated/stat/p50_ns; /pooled/hydrated/stat/p95_ns; /pooled/hydrated/stat/p99_ns.
python3 analysis/export_figures.py

启动时把只读代码树从 EFS 铺到 task 自己的临时存储上,并不消除文件系统访问。它消除的是那条读路径上的远端属性缓存过期。三个独立部署,Fargate 1.4.0,ARM64,0.5 vCPU 和 1 GiB 内存,20 GiB 临时存储(预热结论,E4-hydration):

测量项在 EFS 上预热之后比值
stat p501.3884 ms3.061 µs0.00220
open_read p502.7109 ms11.667 µs0.00430
Tar 解压,27,412,480 字节n/a0.218 / 0.444 / 0.429 s相同字节上 2.04 倍的跨度
首条日志到 benchmark,两组之间n/a0.051 / 0.192 / 0.265 s有混杂,见下文

上面那个 3.061 µs 和 0.00220 是这项实验报告的汇总值,按 task 本地存储上的每次操作测得。每一次重复都成立的是它们背后的验收门槛,也就是预热后的开销不高于 EFS stat 成本的十分之一、open_read 成本的五分之一;每次运行的结果围着汇总值波动,不是一位不差地复现。本地分布是单峰的,stat p99 是 6.023 µs,ENOENT p99 是 22.6 µs,这正是重点:本地文件系统没有重新校验计时器,所以没有事件会过期。

我原本预测预热会至少多花 0.5 秒才能开始 benchmark,结果错在了便宜的那一侧。解压本身就花了 0.218 到 0.444 秒,两组之间”首条日志到 benchmark”的差值落在 0.051 到 0.265 秒,这里面还掺着远端一致性写入和调度噪声,所以我不会把这个差值记成预热的因果开销,也不会记成完整的启动时间。

这不是一个实测的请求延迟结果。预热后的代码树从没在节奏测量工具的负载下跑过,所以那个 151 到 217 ms 的卡顿并没有被证明消失,两者之间的联系是从两个独立结果推出来的。它也是有边界的:只读代码树,27 MB 而不是生产安装,没有回写适配层,没有机队刷新或失效行为,也没有端到端延迟测量。它处理了一条路径上的过期事件。它没有把可变的运行时状态变成本地,它只是若干有边界的选项之一,而不是唯一还站着的那个。

审计备注:这项研究能确立什么

研究提出的问题结果
是不是每个服务端支撑的档位在 stat 上都比块存储组慢 10 倍以上?被机械地否证了:看起来的反例其实是客户端缓存命中而不是服务端查询,所以这个否证本身不含任何信息
首次接触比重新校验更贵吗?在 EFS 上是,2.8 到 4.4 倍;注册的 1.0 到 3.0 区间被两边同时否证,上面是 EFS 那几组,下面是一次 0.72 倍的 OpenZFS 重复
一个请求要付逐调用的那个比值吗?不用:平均值落在它的支撑界内,离否证阈值很远(节奏结论,E5-attribute-cache)
预热会不会比我事先预测的 0.5 秒下限更省?不会;解压花了 0.218 到 0.444 秒,所以预测被否证,而两组之间的差值混杂太多,替代不了它
预热能消掉请求卡顿吗?没有显示;从没在节奏测量工具下跑过

预测都在运行之前注册,设计允许的地方做了三次重复,每个服务只在一个配置点上测。网上活动以 RPC 计数器为准,墙钟延迟从不拿来支撑”调用有没有离开客户端”这种论断。20 µs 的缓存命中门槛、只做一次重复的成簇检查、以及同步过期的解释,在出现的地方都标注为事后。没有测端到端请求延迟,没有与节奏匹配的 Fargate 运行,没有测刻意共享的主机挂载,购物车和结账流量只做了计数,没有端到端埋点。

周一:决策清单

  1. 在比较任何存储档位之前,先数清一个热请求带来的文件系统需求。你没测过的需求数字,撑不起容量规划。
  2. 先查你的启动类型到底能挂什么,因为对你来说不存在的选项,不是一个更慢的选项。
  3. 先测你的应用需要的 POSIX 语义。rename 和 mtime 就是对象存储挂载栽跟头的地方,而正确性失败是排除,不是排名。
  4. 用你自己的节奏去测,用 RPC 计数器而不是秒表,因为新文件矩阵和请求式扫描回答的是不同的问题。
  5. 引用任何数字都带上配置点。Single-AZ OpenZFS 128 MBps 和 Single-AZ gen-1 ONTAP 1024 GiB 是配置,不是服务。
  6. 如果你需求里代码那一侧是只读的,考虑把它预热到 task 本地存储,并且把解压成本和每次操作的结果都测一遍。如果不是只读,这个选项对你不适用。

对这个负载来说,存储档位对尾部的塑造,和对平均值的塑造一样多,而那个去掉过期事件的干预,本质是改变代码从哪里被读。平均惩罚还在那儿,它属于任何对总 stat 等待的核算;它从来描述不了单个请求,而用户记得住的请求,是 p99 上的那些。