为 Amazon Neptune 选择存储类型
Neptune 提供两种具有不同定价模式的存储类型:
标准存储 - 标准存储为 I/O 使用率为中到低的应用程序提供经济实惠的数据库存储。
-
I/O 优化存储 – 使用 I/O 优化存储(引擎版本 1.3.0.0 提供),您只需为使用的存储和实例付费。存储成本高于标准存储,而且实例成本高于标准实例。您无需为使用的 I/O 付费。如果您的 I/O 使用率很高,则预调配 IOPs 存储可以显著降低成本。
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 \ --db-cluster-identifier(an ID for the cluster)\ --engine neptune \ --engine-version(the Neptune engine version)\ --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-classdb.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(the Neptune engine version)\ --storage-type iopt1
您可以通过任何 describe- 调用来确定集群是否在使用 I/O 优化存储。如果启用了 I/O 优化存储,则该调用将返回设置为 iop1 的存储类型字段。