本文說明如何使用配額調整工具系統調整配額。
配額調整工具會監控資源用量,並主動代為提交配額調整要求。監控資源用量並主動提交配額調整要求,可避免因達到配額值而導致服務中斷。使用配額調整工具,就不必時時留意資源用量是否意外增加,也能減少手動提交配額調整要求的次數。
配額調整工具的運作方式
啟用配額調整工具後,系統會監控所有適用配額,並套用下列邏輯:
- 配額調整工具會檢查指定時間長度內,用量高峰是否接近配額值。
- 如果是,配額調整工具會嘗試提高配額值 (通常約為 10% 至 20%)。
如果可以提高配額值,系統會核准提高要求並調整值。無論是否啟用配額調整工具,您隨時都能手動要求提高配額值。
配額調整工具只會提交配額調整要求,提高配額值。不會嘗試降低值。如果配額設有手動配額上限,配額調整工具就不會提交配額調整要求。
您可以在Google Cloud 控制台的「配額與系統限制」頁面,查看配額調整工具提出的要求。您也可以設定快訊,監控配額調整工具啟動的變更。
限制
配額調整工具具有下列限制:
- Google Cloud 控制台不提供資料夾和組織層級的配額調整工具設定。如要在資料夾或組織層級存取配額調整工具設定,請使用 Cloud Quotas API (預先發布版) 或 Google Cloud CLI Cloud Quotas 指令 (適用於
beta版本層級)。 - 配額調整工具不適用於所有配額。詳情請參閱本文的「適用情形」一節。
可用性
配額調整工具的可用性取決於您的 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 | 每分鐘建構和作業 GET 要求數 |
| Cloud Build API | 每位使用者每分鐘的建構和作業 GET 要求數 |
| Cloud Build API | 並行建構 CPU (區域預設集區) |
| Cloud Build API | 並行建構作業 (非區域預設集區) |
| Cloud Key Management Service API | 每分鐘加密要求數 |
| Cloud Key Management Service API | HSM 加密編譯用量 |
| Cloud Key Management Service API | 每分鐘讀取要求數 |
| Cloud Key Management Service API | 讀取用量 |
| Cloud Key Management Service API | 軟體加密編譯用途 |
| Cloud Key Management Service API | 每分鐘寫入要求數 |
| Cloud Key Management Service API | 寫入用量 |
| Cloud Logging API | 每個區域每分鐘的記錄寫入位元組數 |
| Cloud Monitoring API | 時間序列擷取要求 |
| Cloud Monitoring API | 時間序列查詢 |
| Cloud Resource Manager API | 每分鐘讀取要求數 |
| Cloud Run Admin API | 每個區域每分鐘的工作執行要求數 |
| Cloud Run Admin API | 每個地區每分鐘的讀取要求數 |
| Cloud Run Admin API | 每個專案在各區域的 CPU 分配總量 (以 m vCPU 為單位) |
| Cloud Run Admin API | 每個地區的每分鐘寫入要求數 |
| Cloud Trace API | 每分鐘寫入要求數 (免費) |
| Compute Engine API | 親和性群組 |
| Compute Engine API | 後端 bucket |
| 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 | 每個主專案的 Shared VPC 服務專案數量 |
| Compute Engine API | 每個區域各對等群組的動態路由 |
| Compute Engine API | 外部直通式網路負載平衡器後端服務 |
| Compute Engine API | 外部直通式網路負載平衡器轉送規則 |
| Compute Engine API | 外部通訊協定轉送規則 |
| Compute Engine API | 外部 VPN 閘道 |
| Compute Engine API | 防火牆規則 |
| Compute Engine API | 轉送規則 |
| Compute Engine API | 全域外部代管後端服務 |
| Compute Engine API | 全域內部代管後端 bucket |
| Compute Engine API | 全域內部代管後端服務 |
| Compute Engine API | 全域 SSL 政策 |
| Compute Engine API | 全域外部代管轉送規則 |
| Compute Engine API | 全域外部 Proxy 負載平衡器後端服務 |
| Compute Engine API | 全域內部 Traffic Director 後端服務 |
| Compute Engine API | 每個 GPU 系列的 GPU 數量 |
| Compute Engine API | GPU (所有區域) |
| Compute Engine API | 健康狀態檢查 |
| Compute Engine API | 圖片 |
| Compute Engine API | 互連網路連結群組 |
| Compute Engine API | 互連網路連結 |
| Compute Engine API | 每個互連網路的互連網路連結數量 |
| Compute Engine API | 互連網路連結的總頻寬 (以 Mbps 為單位) |
| 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 | 每個對等群組的內部通訊協定轉送規則 |
| Compute Engine API | 每個虛擬私有雲網路的內部通訊協定轉送規則 |
| Compute Engine API | 內部 IP 位址 |
| Compute Engine API | 內部直通式網路負載平衡器後端服務 |
| Compute Engine API | 每個對等群組的內部直通式網路負載平衡器轉送規則 |
| Compute Engine API | 每個虛擬私有雲網路的內部直通式網路負載平衡器轉送規則 |
| 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 | 網路負載平衡器安全性政策規則屬性 |
| Compute Engine API | 網路 |
| Compute Engine API | NVIDIA A2 CPU |
| Compute Engine API | 每個虛擬私有雲網路的對接數量 |
| Compute Engine API | Packet Mirroring |
| Compute Engine API | Persistent Disk IOPS |
| Compute Engine API | Persistent Disk SSD (GB) |
| Compute Engine API | Persistent Disk Standard (GB) |
| Compute Engine API | 先占 CPU |
| Compute Engine API | 先占本機 SSD (GB) |
| Compute Engine API | 先占 NVIDIA A100 80 GB 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 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 | 每個供應商虛擬私有雲網路的 PSC ILB 用戶轉送規則 |
| Compute Engine API | PSC 內部 LB 轉送規則 |
| Compute Engine API | 區域性外部代管後端服務 |
| 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 | 區域性安全性政策規則 |
| Compute Engine API | 設有進階比對條件的區域性安全性政策規則 |
| Compute Engine API | 區域性 SSL 政策 |
| 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 | 服務連結 |
| Compute Engine API | 快照 |
| Compute Engine API | SSL 憑證 |
| Compute Engine API | 靜態 BYOIP IP 位址 |
| Compute Engine API | 靜態 IP 位址 |
| Compute Engine API | 靜態全域內部 IPv4 位址 |
| Compute Engine API | 每個網路的靜態路由 |
| Compute Engine API | 每個對等群組的靜態路由 |
| Compute Engine API | 每個對等群組的子網路範圍 |
| Compute Engine API | 每個虛擬私有雲網路的子網路範圍 |
| 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 | 目標執行個體 |
| Compute Engine API | 目標集區 |
| Compute Engine API | 目標 VPN 閘道 |
| Compute Engine API | 本機 SSD 磁碟的總保留容量 (GB) |
| Compute Engine API | Traffic Director 轉送規則 |
| Compute Engine API | 每個虛擬私有雲網路中,各區域來自其他區域的 Cloud Router 動態路由前置字串不重複數量 |
| Compute Engine API | 每個虛擬私有雲網路中,各區域來自自身區域的不重複 Cloud Router 動態路由前置字元 |
| Compute Engine API | 網址對應 |
| Compute Engine API | VM 執行個體 |
| Compute Engine API | VPN 閘道 |
| Compute Engine API | VPN 通道 |
| Connect Gateway API | 每分鐘閘道連線要求數 |
| Dataproc API | 每個專案在各區域的資料運算單元 |
| Dialogflow API | 每分鐘所有其他要求 |
| Filestore API | 每個區域的備份 |
| Filestore API | 各區域的基本傳統硬碟 (標準) 容量 (GB) |
| Filestore API | 每個區域的基本固態硬碟 (Premium) 容量 (GB) |
| Filestore API | 每個區域的可用區和區域 1 至 10 TiB (Enterprise) 容量 (GB) |
| Filestore API | 每個區域的 Zonal 和 Regional 10 至 100 TiB (高規模) 容量 (GB) |
| Google Cloud Memorystore for Redis API | 各區域的 Redis 總容量 (GB) |
| Google Cloud Memorystore for Redis API | 每個專案在各區域的 Redis 叢集單位總數 |
| Google Sheets API | 每項專案每分鐘的讀取要求數 |
| Google Sheets API | 每位使用者每分鐘的讀取要求數 |
| Google Sheets API | 每項專案每分鐘的寫入要求數 |
| Google Sheets API | 每位使用者每分鐘的寫入要求數 |
| Memorystore API | 每個專案在各區域的 Memorystore 單位總數 |
| Remote Build Execution | 預留的 N2 CPU 數量 (每個區域) |
| Transcoder API | 批次並行工作數量 |
| Transcoder API | 待處理批次工作數量 |
| Transcoder API | 並行工作數量 |
| Transcoder API | 配音工作數量 |
| Transcoder API | GET 要求 |
| Transcoder API | 列出要求 |
| Transcoder API | 變更要求 |
| 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 核心 |
啟用配額調整工具
如要啟用配額調整工具,您必須具備下列 Identity and Access Management 權限:
cloudquotas.quotas.updatecloudquotas.quotas.get
如要啟用配額調整工具,請選取適當的分頁標籤,並按照操作說明進行:
控制台
- 在 Google Cloud 控制台,依序前往 「IAM & Admin」(IAM 與管理) >「Quotas & System Limits」(配額與系統限制) 頁面:
- 按一下 [設定] 分頁標籤。
- 點選「啟用」切換鈕。
如果「Status」(狀態) 欄顯示「Enabled」(已啟用),代表配額調整工具會開始監控用量,並在資源用量接近配額值時,發出配額調整要求。
如要為個別資料夾或組織啟用配額調整工具,請使用 REST API 或 gcloud CLI。
REST
提出 HTTP 要求,更新配額調整工具設定:
PATCH https://cloudquotas.googleapis.com/v1/RESOURCE_CONTAINER/ID/locations/global/quotaAdjusterSettings在要求主體中,指定配額調整工具設定資源容器,並將
enablement欄位設為ENABLED。您也可以指定 ETag,但這並非必要:{ name: RESOURCE_CONTAINER/ID/locations/global/quotaAdjusterSettings enablement: ENABLED etag: OPTIONAL_ETAG }更改下列內容:
RESOURCE_CONTAINER:資源容器類型,projects、folders或organizations。ID:要啟用配額調整工具的專案、資料夾或組織 ID 或編號。OPTIONAL_ETAG:配額調整工具設定的選用 ETag 字串。
啟用狀態會更新為「
enabled」。
gcloud
使用 gcloud CLI 進行驗證:
gcloud auth login如要啟用配額調整工具設定,請使用
gcloud quotas adjuster settings update指令。啟用專案的配額調整工具
如要指定專案,請使用
--project旗標:gcloud quotas adjuster settings update --project=PROJECT_ID_OR_NUMBER --enablement=enabled將
PROJECT_ID_OR_NUMBER替換為要啟用配額調整工具的專案 ID 或專案編號。為資料夾啟用配額調整工具
如要指定資料夾,請使用
--folder旗標:gcloud quotas adjuster settings update --folder=FOLDER_ID --enablement=enabled將
FOLDER_ID替換為要啟用配額調整工具的資料夾 ID。為組織啟用配額調整工具
如要指定組織,請使用
--organization旗標:gcloud quotas adjuster settings update --organization=ORGANIZATION_ID --enablement=enabled將
ORGANIZATION_ID替換為要啟用配額調整工具的組織 ID。驗證啟用狀態:
gcloud quotas adjuster settings describe --RESOURCE_CONTAINER_TYPE=ID更改下列內容:
RESOURCE_CONTAINER_TYPE:資源容器類型:project、folder或organization。ID:要查看啟用狀態的專案、資料夾或組織 ID。
只要您具備必要權限,系統就會傳回
enabled狀態。
查看配額調整要求
如要查看配額調整要求,您必須具備下列 IAM 權限:
resourcemanager.projects.getserviceusage.services.listserviceusage.quotas.get
如要查看配額調整工具發出的配額調整要求,請按照下列步驟操作:
- 在 Google Cloud 控制台,依序前往 「IAM & Admin」(IAM 與管理) >「Quotas & System Limits」(配額與系統限制) 頁面:
- 按一下「Increase Requests」(提高要求) 分頁標籤。「Increase Requests」(提高要求) 檢視畫面會顯示專案的提高要求,包括手動要求的提高和配額調整工具發出的要求。
- 按一下「篩選器」欄位。
- 從選單中選取「類型」,然後輸入
Auto。這項篩選條件會篩選出配額調整工具提出的要求。
設定配額調整工具快訊
如要接收配額調整工具的快訊,請按照下列步驟操作:
- 在 Google Cloud 控制台,依序前往 「IAM & Admin」(IAM 與管理) >「Quotas & System Limits」(配額與系統限制) 頁面:
- 按一下 [設定] 分頁標籤。
- 按一下「建立快訊」。
- 選擇其中一個或兩個警告範本:
- 配額調整工具的所有調整:每當配額調整工具針對專案發出配額調整要求時,就會傳送快訊。
- 配額調整工具錯誤和失敗:只有在配額調整工具嘗試提高配額值,但無法執行時,才會傳送快訊。
- 選用:按一下「Show Options」(顯示選項),調整快訊間隔時間下限和事件自動關閉時間長度的預設值。
- 選取要接收警告的「通知管道」。如要調整通知管道設定或建立新的通知管道,請按一下「Manage Notification Channels」(管理通知管道)。
- 點選「建立」。
編輯或刪除配額調整工具快訊
您可以在Google Cloud 控制台編輯或刪除配額調整工具快訊:
前往 Cloud Monitoring 控制台的「Policies」(政策) 頁面。
搜尋配額調整工具警告政策。 配額調整工具警告政策的名稱如下:
Quota adjuster errors and failuresAll adjustments by quota adjuster
在顯示配額調整工具警告政策的資料列中,按一下 「View more」(查看更多)。
按一下「編輯」或「刪除」。
停用配額調整工具
如要停用配額調整工具,您必須具備下列 IAM 權限:
cloudquotas.quotas.updatecloudquotas.quotas.get
如要停用配額調整工具,請選取適當的分頁標籤,並按照操作說明進行:
控制台
- 在 Google Cloud 控制台,依序前往 「IAM & Admin」(IAM 與管理) >「Quotas & System Limits」(配額與系統限制) 頁面:
- 按一下 [設定] 分頁標籤。
- 按一下「啟用」切換鈕。切換鈕會變成灰色。
如果切換鈕為灰色,且狀態欄顯示「Not Enabled」(未啟用),代表配額調整工具已停止監控用量,也不會再發出配額調整要求。
如要停用個別資料夾或組織的配額調整工具,請使用 REST API 或 gcloud CLI。
REST
提出 HTTP 要求,更新配額調整工具設定:
PATCH https://cloudquotas.googleapis.com/v1/RESOURCE_CONTAINER/ID/locations/global/quotaAdjusterSettings在要求主體中,指定配額調整工具設定資源容器,並將
enablement欄位設為DISABLED。您也可以指定 ETag,但這並非必要:{ name: RESOURCE_CONTAINER/ID/locations/global/quotaAdjusterSettings enablement: DISABLED etag: OPTIONAL_ETAG }更改下列內容:
RESOURCE_CONTAINER:資源容器類型,projects、folders或organizations。ID:要停用配額調整工具的專案、資料夾或組織 ID 或編號。OPTIONAL_ETAG:配額調整工具設定的選用 ETag 字串。
啟用狀態會更新為「
disabled」。
gcloud
向 gcloud CLI 驗證:
gcloud auth login如要停用配額調整工具設定,請使用
gcloud quotas adjuster settings update指令。停用專案的配額調整工具
如要指定專案,請使用
--project旗標:gcloud quotas adjuster settings update --project=PROJECT_ID_OR_NUMBER --enablement=disabled將
PROJECT_ID_OR_NUMBER替換為要停用配額調整工具的專案 ID 或專案編號。停用資料夾的配額調整工具
如要指定資料夾,請使用
--folder旗標:gcloud quotas adjuster settings update --folder=FOLDER_ID --enablement=disabled將
FOLDER_ID替換為要停用配額調整工具的資料夾 ID。停用組織的配額調整工具
如要指定組織,請使用
--organization旗標:gcloud quotas adjuster settings update --organization=ORGANIZATION_ID --enablement=disabled將
ORGANIZATION_ID替換為要停用配額調整工具的組織 ID。驗證啟用狀態:
gcloud quotas adjuster settings describe --RESOURCE_CONTAINER_TYPE=ID更改下列內容:
RESOURCE_CONTAINER_TYPE:資源容器類型:project、folder或organization。ID:要查看啟用狀態的專案、資料夾或組織 ID。
只要您具備必要權限,系統就會傳回
disabled狀態。
排解配額提高要求遭拒的問題
配額調整工具發起的配額提高要求可能會遭到拒絕。當 Google Cloud 無法將特定專案、資源或區域的配額提高到特定值以上時,有時就會發生這種情況。在這些情況下,您仍可要求手動提高配額。
如要在配額調整工具提出的配額調整要求遭拒時收到通知,請設定配額調整工具警告。