为 Neptune 数据库集群选择正确的存储类型 - Amazon Neptune
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

为 Neptune 数据库集群选择正确的存储类型

Neptune 提供两种具有不同定价模式的存储类型:

  • 标准存储 - 标准存储为 I/O 使用率为中到低的应用程序提供经济实惠的数据库存储。

  • I/O — 优化存储 — 借助引擎版本 1.3.0.0 中提供的 I/O 优化存储,您只需为正在使用的存储和实例付费。存储成本高于标准存储,而且您无需为所使用的 I/O 支付任何费用。如果您的 I/O 使用率很高,则预调配 IOPs 存储可以显著降低成本。

    I/O 优化存储符合 I/O 密集型图形工作负载的需求,且成本可预测,I/O 延迟低,I/O 吞吐量一致。每 30 天只能在 I/O 优化存储类型和标准存储类型之间切换一次。

    有关 I/O 优化存储的定价信息,请参阅 Neptune 定价页面。以下部分介绍如何为 Neptune 数据库集群设置 I/O 优化存储。

为 Neptune 数据库集群选择 I/O 优化存储

默认情况下,Neptune 数据库集群使用标准存储。您可以在创建数据库集群时对其启用 I/O 优化存储,如下所示:

以下是一个示例,说明如何在使用 Amazon CLI 创建集群时启用 I/O 优化存储:

aws neptune create-db-cluster \ --database-name (name for the new database) \ --db-cluster-identifier (an ID for the cluster) \ --engine neptune \ --engine-version 1.3.0.0 \ --storage-type iopt1

然后,您自动创建的任何实例都启用 I/O 优化存储:

aws neptune create-db-instance \ --db-cluster-identifier (the ID of the new cluster) \ --db-instance-identifier (an ID for the new instance) \ --engine neptune \ --db-instance-class db.r5.large

您也可以修改现有数据库集群,以对其启用 I/O 优化存储,如下所示:

aws neptune modify-db-cluster \ --db-cluster-identifier (the ID of a cluster without I/O–Optimized storage) \ --storage-type iopt1 \ --apply-immediately

您可以将备份快照还原到启用了 I/O 优化存储的数据库集群:

aws neptune restore-db-cluster-from-snapshot \ --db-cluster-identifier (an ID for the restored cluster) \ --snapshot-identifier (the ID of the snapshot to restore from) \ --engine neptune \ --engine-version 1.3.0.0 \ --storage-type iopt1

您可以通过任何 describe- 调用来确定集群是否在使用 I/O 优化存储。如果启用了 I/O 优化存储,则该调用将返回设置为 iop1 的存储类型字段。