本文說明如何使用配額調整器系統調整配額。
配額調整工具會觀察資源用量,並主動代您提交配額調整要求。監控資源用量並主動提交配額調整要求,可避免因達到配額值而導致服務中斷。使用配額調整工具可減少資源用量意外增加的情況,並減少手動提交配額調整要求的次數。
配額調整工具的運作方式
啟用配額調整工具後,系統會監控所有適用配額,並套用下列邏輯:
- 配額調整器會檢查指定時間內,尖峰用量是否已接近配額值。
- 如果是,配額調整器會嘗試提高配額值 (通常約 10% 到 20%)。
如果可以增加配額值,系統會核准增加要求並調整值。無論是否啟用配額調整工具,您隨時都能手動要求提高配額值。
配額調整工具只會提交配額調整要求,以提高配額值。不會嘗試降低值。如果配額設有手動配額上限,配額調整工具就不會提交配額調整要求。
您可以在Google Cloud 控制台的「配額與系統限制」頁面中查看配額調整者提出的要求。您也可以設定快訊,監控配額調整工具發起的變更。
限制
配額調整工具有下列限制:
- 請注意,配額調整工具的設定僅適用於個別專案。
- 配額調整工具的設定只能透過Google Cloud 控制台存取。
- 配額調整器僅適用於部分配額。詳情請參閱本文的「適用情形」一節。
可用性
配額調整工具的適用情形取決於 Google Cloud 專案,且僅適用於部分 Google Cloud 配額。
根據用量記錄判斷資格
配額調整器需要足量的歷史用量資料,才能準確判斷何時要求額外配額。因此,只有歷來活動量充足的專案,才能啟用配額調整工具,以利系統做出準確預測。
支援的配額
配額調整器不適用於所有Google Cloud 配額。服務可能支援所有、部分或任何配額的配額調整器。 Google Cloud 如果您在專案中啟用配額調整器,系統會將其套用至所有支援的配額。
當 Google Cloud 服務為配額新增或擴充配額調整器支援時,配額調整器會自動監控及調整專案中這些新支援的配額。即使您最初啟用配額調整器時,系統不支援這些特定配額,也會發生這種情況。
下表列出配額調整工具支援的配額。
服務 | 配額 |
---|---|
Artifact Registry API | 每項專案在亞洲多區域每分鐘的要求數 |
Artifact Registry API | 歐洲多區域每分鐘每項專案的要求數 |
Artifact Registry API | 每項專案在美國多區域每分鐘的要求數 |
Artifact Registry API | 每個專案每分鐘每個區域的要求數 |
Cloud Build API | 每分鐘的建構和作業取得要求數 |
Cloud Build API | 每位使用者每分鐘的建構和作業 Get 要求數 |
Cloud Build API | 並行建構 CPU (區域預設集區) |
Cloud Build API | 並行建構作業 (非區域預設集區) |
Cloud Key Management Service API | 每分鐘密碼編譯要求數 |
Cloud Key Management Service API | 每分鐘讀取要求數 |
Cloud Key Management Service API | 每分鐘寫入要求數 |
Cloud Logging API | 每個區域每分鐘的記錄寫入位元組數 |
Cloud Resource Manager API | 每分鐘讀取要求數 |
Cloud Run Admin API | 每個區域每分鐘的工作執行要求數 |
Cloud Run Admin API | 每個地區每分鐘的讀取要求數 |
Cloud Run Admin API | 每個區域每項專案的 CPU 總分配量 (以毫 vCPU 為單位) |
Cloud Run Admin API | 每個地區的每分鐘寫入要求數 |
Cloud Trace API | 每分鐘寫入要求數 (免費) |
Compute Engine API | 興趣相似目標對象群組 |
Compute Engine API | 後端值區 |
Compute Engine API | C2 CPU |
Compute Engine API | C2D CPU |
Compute Engine API | C3 CPU |
Compute Engine API | 承諾使用合約 |
Compute Engine API | 承諾使用的 A2 CPU |
Compute Engine API | 承諾使用的 CPU |
Compute Engine API | 認可授權 |
Compute Engine API | 承諾保留的本機 SSD 磁碟空間 (GB) |
Compute Engine API | 承諾使用的 M3 CPU |
Compute Engine API | 承諾使用的記憶體最佳化 CPU |
Compute Engine API | 承諾使用的 N2 CPU |
Compute Engine API | 承諾使用的 N2D CPU |
Compute Engine API | 承諾使用的 T2D CPU |
Compute Engine API | CPU |
Compute Engine API | 每個 VM 家族的 CPU 數量 |
Compute Engine API | 跨專案網路服務專案 |
Compute Engine API | 每個 VPC 網路的自訂靜態路徑 |
Compute Engine API | 外部直通式網路負載平衡器後端服務 |
Compute Engine API | 外部直通式網路負載平衡器轉送規則 |
Compute Engine API | 外部通訊協定轉送規則 |
Compute Engine API | 防火牆規則 |
Compute Engine API | 轉送規則 |
Compute Engine API | 全域外部代管後端服務 |
Compute Engine API | 全域外部管理轉送規則 |
Compute Engine API | 全域外部 Proxy 負載平衡後端服務 |
Compute Engine API | 全域內部流量導向器後端服務 |
Compute Engine API | 各 GPU 系列的 GPU 數量 |
Compute Engine API | GPU 數量 (所有區域) |
Compute Engine API | 健康狀態檢查 |
Compute Engine API | 圖片 |
Compute Engine API | 使用中的 IP 位址 |
Compute Engine API | 使用中的區域性外部 IPv4 位址 |
Compute Engine API | 使用中的快照排程 |
Compute Engine API | 執行個體群組 |
Compute Engine API | 執行個體範本 |
Compute Engine API | 每個對等互連群組的執行個體 |
Compute Engine API | 每個虛擬私有雲網路的執行個體數 |
Compute Engine API | 內部 IP 位址 |
Compute Engine API | 內部直通式網路負載平衡器後端服務 |
Compute Engine API | 每個對等互連群組的內部直通式網路負載平衡器轉送規則 |
Compute Engine API | 每個 VPC 網路的內部直通式網路負載平衡器轉送規則 |
Compute Engine API | 每個對等互連群組的 IP 別名 |
Compute Engine API | 每個虛擬私有雲網路的 IP 別名 |
Compute Engine API | 每個 VM 系列的本機 SSD 磁碟 (GB) |
Compute Engine API | M1 CPU |
Compute Engine API | M2 CPU |
Compute Engine API | M3 CPU |
Compute Engine API | 代管執行個體群組 |
Compute Engine API | N2 CPU |
Compute Engine API | N2D CPU |
Compute Engine API | 網路端點群組 |
Compute Engine API | 網路防火牆政策 |
Compute Engine API | 網路負載平衡安全政策規則屬性 |
Compute Engine API | 網路負載平衡安全政策 |
Compute Engine API | 網路 |
Compute Engine API | NVIDIA A2 CPU |
Compute Engine API | 每個 VPC 網路的對等互連 |
Compute Engine API | 永久磁碟 IOPS |
Compute Engine API | Persistent Disk SSD (GB) |
Compute Engine API | 永久磁碟標準 (GB) |
Compute Engine API | 先佔 CPU 數量 |
Compute Engine API | 先占型本機 SSD (GB) |
Compute Engine API | 可搶占式 NVIDIA A100 80GB GPU |
Compute Engine API | 可搶占式 NVIDIA A100 GPU |
Compute Engine API | 先占 NVIDIA H100 GPU |
Compute Engine API | 先占 NVIDIA H100 MEGA GPU |
Compute Engine API | 先占 NVIDIA K80 GPU |
Compute Engine API | 先占 NVIDIA L4 GPU |
Compute Engine API | 先占 NVIDIA L4 虛擬工作站 GPU |
Compute Engine API | 先占 NVIDIA P100 GPU |
Compute Engine API | 先占 NVIDIA P100 虛擬工作站 GPU |
Compute Engine API | 先占 NVIDIA P4 GPU |
Compute Engine API | 先占 NVIDIA P4 虛擬工作站 GPU |
Compute Engine API | 可搶占的 NVIDIA T4 GPU |
Compute Engine API | 先占型 NVIDIA T4 虛擬工作站 GPU |
Compute Engine API | 先占 NVIDIA V100 GPU |
Compute Engine API | 公開 advertise 的前置碼 |
Compute Engine API | 區域外部代管後端服務 |
Compute Engine API | 每個虛擬私有雲網路在每個區域的區域外部代管轉送規則 |
Compute Engine API | 區域執行個體範本 |
Compute Engine API | 區域內部代管後端服務 |
Compute Engine API | 地區性內部 Traffic Director 後端服務 |
Compute Engine API | 地區代管執行個體群組 |
Compute Engine API | 區域安全性政策 |
Compute Engine API | 含有進階比對條件的區域安全性政策規則 |
Compute Engine API | 區域目標 TCP Proxy |
Compute Engine API | 路由器 |
Compute Engine API | 路徑 |
Compute Engine API | 安全性政策 |
Compute Engine API | 安全性政策規則 |
Compute Engine API | 安全性政策規則語言規則 |
Compute Engine API | 快照 |
Compute Engine API | SSL 憑證 |
Compute Engine API | 靜態 BYOIP IP 位址 |
Compute Engine API | 靜態 IP 位址 |
Compute Engine API | 每個對等互連群組的子網路範圍 |
Compute Engine API | 每個 VPC 網路的子網路範圍 |
Compute Engine API | T2A CPU |
Compute Engine API | T2D CPU |
Compute Engine API | 目標 HTTP Proxy |
Compute Engine API | 目標 HTTPS Proxy |
Compute Engine API | 目標安全資料傳輸層 (SSL) Proxy |
Compute Engine API | 目標 TCP Proxy |
Compute Engine API | 目標 VPN 閘道 |
Compute Engine API | 本機 SSD 磁碟的總保留容量 (GB) |
Compute Engine API | 網址對應 |
Compute Engine API | VM 執行個體 |
Compute Engine API | VPN 閘道 |
Compute Engine API | VPN 通道 |
連結閘道 API | 每分鐘閘道連線要求數 |
Dialogflow API | 每分鐘所有其他要求數 |
Filestore API | 每個區域的備份 |
Filestore API | 每個區域的基本硬碟 (標準) 容量 (GB) |
Filestore API | 每個區域的基本固態硬碟 (進階) 容量 (GB) |
Filestore API | 每個區域的區域和區域 1 至 10 TiB (Enterprise) 容量 (GB) |
Filestore API | 每個區域的區域和區域 10 至 100 TiB (高規模) 容量 (GB) |
Google Cloud Memorystore for Redis API | 每個區域的 Redis 總容量 (GB) |
Google Cloud Memorystore for Redis API | 每個區域每項專案的 Redis 叢集總單位數 |
Memorystore API | 每個區域每項專案的 Memorystore 總單位數 |
Vertex AI API | 每個區域的自訂模型服務 CPU |
Vertex AI API | 每個區域的自訂模型服務 Nvidia T4 GPU |
Vertex AI API | 每個區域的自訂模型訓練 Nvidia T4 GPU |
Vertex AI API | 每項專案每分鐘的內容生成要求數 (以每個基礎模型為準) |
Vertex AI API | 每個專案、每個基礎模型每分鐘的區域線上預測要求數 注意:如要查看可用維度的完整清單,請在 Google Cloud 控制台中展開這個項目。 |
Vertex AI API | 每個區域每分鐘的資源管理 (CRUD) 要求數 |
Vertex AI API | 每個區域的受限圖片訓練 TPU V3 Pod 核心 |
啟用配額調整工具
如要啟用配額調整工具,您必須具備下列 IAM 權限:
cloudquotas.quotas.update
cloudquotas.quotas.get
如要在 Google Cloud 控制台專案中啟用配額調整器,請選取適當的分頁並按照指示操作:
控制台
如要透過 Google Cloud 控制台在 Google Cloud 專案中啟用配額調整工具,請按照下列步驟操作:
- 在 Google Cloud 控制台,依序前往「IAM & Admin」(IAM 與管理) >「Quotas & System Limits」(配額與系統限制) 頁面:
- 按一下 [設定] 分頁標籤。
- 點選「啟用」切換按鈕。
如果「Status」(狀態) 欄顯示「Enabled」(已啟用),代表配額調整工具會開始監控用量,並在資源用量接近配額值時發出配額調整要求。
REST
如要使用 REST API (預先發布版) 在 Google Cloud 專案中啟用配額調整工具,請發出 HTTP 要求來更新配額調整工具設定:
PATCH https://cloudquotas.googleapis.com/v1beta/projects/PROJECT_ID_OR_NUMBER/locations/global/quotaAdjusterSettings
在要求主體中,指定配額調整工具設定資源,並將
enablement
欄位設為ENABLED
。您也可以指定 ETag,但這項操作是選用:{ name: projects/PROJECT_ID_OR_NUMBER/locations/global/quotaAdjusterSettings enablement: ENABLED etag: OPTIONAL_ETAG }
更改下列內容:
PROJECT_ID_OR_NUMBER
:專案 ID 或專案編號,用於啟用配額調整工具。OPTIONAL_ETAG
:配額調整器設定的選用 ETag 字串。
這會將啟用狀態更新為「
enabled
」。
gcloud
如要使用 gcloud CLI (搶先版) 在 Google Cloud 專案中啟用配額調整工具,請按照下列步驟操作:
使用 gcloud CLI 進行驗證:
gcloud auth login
啟用配額調整工具設定:
gcloud beta quotas adjuster settings update --project=PROJECT_ID_OR_NUMBER --enablement=enabled
將
PROJECT_ID_OR_NUMBER
替換為要啟用配額調整器的專案 ID 或專案編號。確認啟用狀態:
gcloud beta quotas adjuster settings describe --project=PROJECT_ID_OR_NUMBER
只要您具備必要權限,這項作業就會傳回
enabled
狀態。
查看配額調整要求
如要查看配額調整要求,您必須具備下列 IAM 權限:
resourcemanager.projects.get
serviceusage.services.list
serviceusage.quotas.get
如要查看配額調整工具發出的配額調整要求,請按照下列步驟操作:
- 在 Google Cloud 控制台,依序前往「IAM & Admin」(IAM 與管理) >「Quotas & System Limits」(配額與系統限制) 頁面:
- 按一下「增加要求」分頁標籤。「增加要求」檢視畫面會顯示專案的增加要求,包括手動要求增加的項目,以及配額調整工具發出的要求。
- 按一下「篩選器」欄位。
- 從選單中選取「類型」,然後輸入
Auto
。這個篩選器會篩選配額調整工具提出的要求。
設定配額調整工具快訊
如要接收配額調整工具的快訊:
- 在 Google Cloud 控制台,依序前往「IAM & Admin」(IAM 與管理) >「Quotas & System Limits」(配額與系統限制) 頁面:
- 按一下 [設定] 分頁標籤。
- 按一下「建立快訊」。
- 選擇其中一個或兩個快訊範本:
- 配額調整工具的所有調整作業:每當配額調整工具為專案發出配額調整要求時,系統就會傳送快訊。
- 配額調整工具錯誤和失敗:只有在配額調整工具嘗試增加配額值,但無法完成時,才會傳送快訊。
- 選用:按一下「顯示選項」,調整警報間隔時間下限和事件自動關閉期限的預設值。
- 選取要接收快訊的「通知管道」。如要調整通知管道設定或建立新的通知管道,請按一下「管理通知管道」。
- 點選「建立」。
編輯或刪除配額調整工具快訊
您可以在Google Cloud 控制台中編輯或刪除配額調整器快訊:
前往 Cloud Monitoring 控制台的「政策」頁面。
搜尋配額調整工具快訊政策。 配額調整工具快訊政策的名稱如下:
Quota adjuster errors and failures
All adjustments by quota adjuster
在顯示配額調整工具快訊政策的資料列中,按一下
「查看更多」。按一下「編輯」或「刪除」。
停用配額調整工具
如要停用配額調整工具,您必須具備下列 IAM 權限:
cloudquotas.quotas.update
cloudquotas.quotas.get
如要停用 Google Cloud 控制台專案的配額調整器,請選取適當的分頁並按照指示操作:
控制台
- 在 Google Cloud 控制台,依序前往「IAM & Admin」(IAM 與管理) >「Quotas & System Limits」(配額與系統限制) 頁面:
- 按一下 [設定] 分頁標籤。
- 點選「啟用」切換按鈕。切換按鈕會變成灰色。
如果切換鈕為灰色,且狀態欄顯示「Not Enabled」(未啟用),代表配額調整工具不會再監控用量或發出配額調整要求。
REST
如要使用 REST API (預先發布版) 停用 Google Cloud 專案的配額調整器,請發出 HTTP 要求來更新配額調整器設定:
PATCH https://cloudquotas.googleapis.com/v1beta/projects/PROJECT_ID_OR_NUMBER/locations/global/quotaAdjusterSettings
在要求主體中,指定配額調整工具設定資源,並將
enablement
欄位設為DISABLED
。您也可以指定 ETag,但這項操作是選用:{ name: projects/PROJECT_ID_OR_NUMBER/locations/global/quotaAdjusterSettings enablement: DISABLED etag: OPTIONAL_ETAG }
更改下列內容:
PROJECT_ID_OR_NUMBER
:專案 ID 或專案編號,用於停用配額調整工具。OPTIONAL_ETAG
:配額調整器設定的選用 ETag 字串。
這會將啟用狀態更新為「
disabled
」。
gcloud
如要使用 gcloud CLI (搶先版) 停用 Google Cloud 專案的配額調整器,請按照下列步驟操作:
驗證 gcloud CLI:
gcloud auth login
停用配額調整工具設定:
gcloud beta quotas adjuster settings update --project=PROJECT_ID_OR_NUMBER --enablement=disabled
將
PROJECT_ID_OR_NUMBER
替換為要停用配額調整器的專案 ID 或專案編號。驗證啟用狀態:
gcloud beta quotas adjuster settings describe --project=PROJECT_ID_OR_NUMBER
只要您具備必要權限,這項作業就會傳回
disabled
狀態。
排解配額提高要求遭拒的問題
配額調整器發起的配額調高要求可能會遭到拒絕。如果 Google Cloud 無法將特定專案、資源或區域的配額提高到超過某個值,有時就會發生這種情況。在這些情況下,您仍可要求手動增加配額。
如要在配額調整工具的配額調整要求遭拒時收到通知,請設定配額調整工具快訊。