啟用 GPU 加速 - Amazon OpenSearch Service

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

啟用 GPU 加速

您可以在使用 或 AWS SDK 建立或更新 OpenSearch 網域或 OpenSearch Serverless 集合時 AWS 管理主控台 AWS CLI啟用 GPU 加速。

在網域或集合上啟用 GPU 加速後,此功能會在所有索引上預設為啟用。如果您需要在索引層級停用此功能,請參閱 建立 GPU 加速向量索引

主控台

下列程序使用 OpenSearch Serverless 管理主控台啟用 OpenSearch 網域和 OpenSearch Serverless 集合的 GPU 加速。

Create new domain

若要建立已啟用 GPU 加速的 OpenSearch 網域,請參閱 建立 OpenSearch Service 網域

Edit existing domain
  1. 開啟 OpenSearch Service 管理主控台。

  2. 在導覽窗格中,選擇網域

  3. 選擇您的網域名稱以開啟網域詳細資訊頁面。

  4. 選擇動作,然後選擇編輯網域

  5. 進階功能區段中,選取啟用 GPU 加速。啟用此功能後,您的向量索引操作就會加速

  6. 選擇儲存變更

Create new collection

若要建立已啟用 GPU 加速的 OpenSearch Serverless 集合,請參閱 教學課程:Amazon OpenSearch Serverless 入門。在建立集合期間,請確定您選取向量搜尋集合類型,並在向量搜尋組態中啟用 GPU 加速。

Edit existing collection
注意

目前不支援透過主控台更新 OpenSearch Serverless 集合上的 GPU 加速狀態。不過,您可以指定索引設定,以啟用特定索引的 GPU 加速,即使集合層級狀態無法更新也一樣。如需索引層級組態建立 GPU 加速向量索引,請參閱 。如果啟用索引的 GPU 加速失敗,請聯絡 AWS 支援。

AWS CLI

Create new domain

下列 AWS CLI 範例會建立在美國東部 (維吉尼亞北部) 啟用 GPU 加速的 OpenSearch 網域。將文字取代為您自己的組態文字。

aws opensearch create-domain \ --domain-name my-domain \ --engine-version OpenSearch_3.1 \ --cluster-config InstanceType=r6g.xlarge.search,\ InstanceCount=1,\ DedicatedMasterEnabled=true,\ DedicatedMasterCount=3,\ DedicatedMasterType=m6g.large.search \ --ebs-options "EBSEnabled=true,\ VolumeType=gp3,\ VolumeSize=2000" \ --encryption-at-rest-options '{"Enabled":true}' \ --aiml-options '{"ServerlessVectorAcceleration": {"Enabled": true}}' \ --node-to-node-encryption-options '{"Enabled":true}' \ --domain-endpoint-options '{"EnforceHTTPS":true,\ "TLSSecurityPolicy":"Policy-Min-TLS-1-0-2019-07"}' \ --access-policies '{"Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": {"AWS": "*"}, "Action": "es:*", "Resource": "arn:aws:es:us-east-1:123456789012:domain/my-domain/*" }]}' \ --advanced-security-options '{ "Enabled":true, "InternalUserDatabaseEnabled":true, "MasterUserOptions": { "MasterUserName":"USER_NAME", "MasterUserPassword":"PASSWORD" }}' \ --region us-east-1
Edit existing domain

下列 AWS CLI 範例會啟用現有 OpenSearch 網域的 GPU 加速。將文字取代為您自己的組態文字。

aws opensearch update-domain-config \ --domain-name my-domain \ --cluster-config InstanceType=r7g.16xlarge.search,InstanceCount=3 \ --aiml-options '{"ServerlessVectorAcceleration": {"Enabled": true}}'
Create new collection

下列 AWS CLI 範例會建立在美國東部 (維吉尼亞北部) 啟用 GPU 加速的 OpenSearch Serverless 集合。將文字取代為您自己的組態文字。

aws opensearchserverless create-collection \ --name "my-collection" \ --type "VECTORSEARCH" \ --description "My vector collection with GPU acceleration" \ --vector-options '{"ServerlessVectorAcceleration": "ENABLED"}' \ --region us-east-1
Edit existing collection
注意

目前不支援透過主控台更新 OpenSearch Serverless 集合上的 GPU 加速狀態。不過,您可以指定索引設定,以啟用特定索引的 GPU 加速,即使集合層級狀態無法更新也一樣。如需索引層級組態建立 GPU 加速向量索引,請參閱 。如果啟用索引的 GPU 加速失敗,請聯絡 AWS 支援。

下列 AWS CLI 範例會啟用現有 OpenSearch Serverless 集合的 GPU 加速。將文字取代為您自己的組態文字。

aws opensearchserverless update-collection \ --id collection-id \ --type VECTORSEARCH \ --description "Collection with GPU acceleration enabled"