Azure Table - 基准显示性能超出官方目标

Azure Table - benchmark shows performance above and beyond official targets

我们使用官方 Java SDK 编写了一个 Azure Table benchmarks/stress-test。基准测试所做的就是尽可能快地从 Azure Table 下载整个分区。

每个分区包含约 5 到 6 万个实体。平均而言,实体的大小约为 1KB。代码是从与 table 位于同一区域的 Azure VM 执行的。 According to the official documentation,每个分区限制为每秒获取 2000 个实体:

Target throughput for single table partition (1 KB entities) - Up to 2000 entities per second

到目前为止,在某些测试中,我们设法在每个分区 每秒 读取多达 18K 个实体。我们甚至看到了一些冷分区数月未触及的数字。

我预计一旦我们达到每秒 2000 个实体就会被限制...但我们没有。这怎么可能?我们可以依靠我们在实践中看到的数字,还是侥幸?

Azure 存储可伸缩性目标不准确。不能保证每秒恰好达到 2,000 个事务。也就是说:Azure 存储(特别是表)的可伸缩性目标是每个分区每秒 2,000 个事务。或者每个存储帐户每秒 20,000 个事务。

Transaction = REST 调用,与数据库事务不同。

我看到你指出的文档,其中提到每秒 2,000 个 实体。实际情况并非如此。您可能在每次 REST 调用 (GET) 时接收到多个实体,因此这可能是您每秒看到超过 2,000 个实体的分区的原因。

根据文档 here

A query against the Table service may return a maximum of 1,000 entities at one time and may execute for a maximum of five seconds.

因此,您很有可能在每笔交易中获得不止一个实体。