

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 選擇 Amazon Neptune 的儲存類型
<a name="storage-types"></a>

Neptune 提供兩種不同定價模式的儲存類型：
+ **標準儲存** — 標準儲存體可為中至低 I/O 使用量的應用程式提供具經濟效益的資料庫儲存。
+ **I/O 最佳化儲存**   –   使用引擎 1.3.0.0 版提供的 I/O 最佳化儲存體，您只需為正在使用的儲存體和執行個體付費。儲存成本高於標準儲存體，而執行個體成本也高於標準執行個體。您無需為所使用的 I/O 付費。如果您的 I/O 使用量很高，佈建的 IOP 儲存可以大幅降低成本。

  I/O 最佳化儲存旨在以可預測的成本滿足 I/O 密集型圖形工作負載的需求。您每 30 天只能在 I/O 最佳化和標準儲存類型之間切換一次。

  如需 I/O 優化儲存的定價資訊，請參閱 [Neptune 定價頁面](https://aws.amazon.com/neptune/pricing/)。下節說明如何為 Neptune 資料庫叢集設定 I/O 優化儲存。

## 選擇適用於 Neptune 資料庫叢集的 I/O 優化儲存
<a name="provisioned-iops-storage"></a>

依預設，Neptune 資料庫叢集使用標準儲存體。您可以在建立資料庫叢集時在該叢集上啟用 I/O 優化儲存，如下所示：

以下範例說明如何在使用 AWS 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-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 {{(the Neptune engine version)}} \
  --storage-type iopt1
```

您可以使用任何 `describe-` 呼叫來判斷叢集是否正在使用 I/O 優化儲存體。如果已啟用 I/O 優化儲存，呼叫會傳回設定為 `iop1` 的儲存類型欄位。