IBM Cloud Docs
調整 IOPS

調整 IOPS

使用此特性,您可以立即調整現有 Block Storage for Classic 的 IOPS。 您不需要建立複本或手動複製資料到新的儲存空間。 此調整不會導致任何類型的中斷或無法存取儲存體。

儲存的帳單會更新,將按比例計算的新價格差額加入目前的帳單週期。 會在下一個計費週期收取新的完整金額。

可調式 IOPS 的優點

  • 成本管理 - 部分客戶可能只有在用量尖峰時間才需要高 IOPS。 舉例來說,大型零售商店在假日期間會出現使用高峰,這時可能需要較高的儲存 IOPS 率。 然而,零售商店在盛夏時節不需要更高的 IOPS。 使用此功能,您可以管理成本,並在需要時支付更高的 IOPS。

限制

調整 IOPS 時,您無法在 Endurance 和 Performance 之間切換。 不過,您可以根據下列準則為儲存空間指定新的 IOPS:

根據磁碟區大小的可用 IOPS 範圍清單。
磁區大小 (GB) IOPS 範圍
10 - 39 100 - 1,000
40 - 79 100 - 2,000
80 - 99 100 - 4,000
100 - 499 100 - 6,000
500 - 999 100 - 10,000
1,000 - 1,999 100 - 20,000
2,000 - 2,999 200 - 40,000
3,000 - 3,999 200 - 48,000
4,000 - 7,999 300 - 48,000
8,000 - 9,999 500 - 48,000
10,000 - 12,000 1,000 - 48,000

區塊儲存空間磁區的 IOPS 上限會根據磁區大小而有所不同。 磁區的 IOPS 上限為 48,000 IOPS。

IOPS 調整對於抄寫的效果

如果磁區已有抄寫,則會自動更新抄本,以符合主要磁區的 IOPS 選取項目。

在控制台中調整儲存的 IOPS

  1. 移至您的 Block Storage for Classic 清單。 按一下 功能表 「功能表」圖示 圖示,然後按一下 基礎架構 標準圖示 > 儲存空間 > Block Storage for Classic

  2. 從清單中選取 iSCSI 磁區,然後按一下省略符號 「動作」圖示 > 修改磁區

  3. 調整儲存空間 IOPS 下,進行新的選取:

    • 對於耐久性 (分層 IOPS),請選取不同的層級。 您隨時可以增加 IOPS 層級。 不過,一個月只能減少一次。
    • 針對效能 (分配的 IOPS),輸入 100-48,000 IOPS 範圍內的值,為您的儲存指定新的 IOPS 選項。 如果選項對您的磁區大小無效,使用者介面會通知您。
  4. 檢閱您的選取項目及新的定價。

  5. 按一下 修改

  6. 在幾分鐘之後,就可以使用您的新儲存空間配置。

從 CLI 調整儲存空間上的 IOPS

開始處理程序之前,請先決定您要使用的 CLI 用戶端。

從 IBMCLOUD CLI 調整 IOPS

您可以使用 ibmcloud sl block volume-modify 指令來更新 IOPS。 下列範例透過指定新的 IOPS 值來修改效能磁區。

ibmcloud sl block volume-modify 12345678 --new-iops 4000

下列範例會指定新的 IOPS 層級來修改「耐久性」檔案共用。

ibmcloud sl block volume-modify 12345678 --new-tier 4

如需此指令可用的所有參數的相關資訊,請參閱 ibmcloud sl block volume-modify

從 SLCLI 調整 IOPS

您可以使用下列指令更新 IOPS。

$ slcli block volume-modify --help
Usage: slcli block volume-modify [OPTIONS] VOLUME_ID

Options:
  -c, --new-size INTEGER        New Size of block volume in GB. ***If no size
                                is given, the original size of volume is
                                used.***
                                Potential Sizes: [20, 40, 80, 100,
                                250, 500, 1000, 2000, 4000, 8000, 12000]
                                Minimum: [the original size of the volume]
  -i, --new-iops INTEGER        Performance Storage IOPS, between 100 and 6000
                                in multiples of 100 [only for performance
                                volumes] ***If no IOPS value is specified, the
                                original IOPS value of the volume will be
                                used.***
  -t, --new-tier [0.25|2|4|10]  Endurance Storage Tier (IOPS per GB) [only for
                                endurance volumes] ***If no tier is specified,
                                the original tier of the volume will be
                                used.***
  -h, --help                    Show this message and exit.

使用 API 調整儲存空間上的 IOPS

您可以對 SOAP Web 服務發出 API 呼叫來調整 IOPS。 下列範例 API 要求可以從您選擇的 Scripting 語言進行。

如需 SLAPI 的相關資訊,請參閱 SLDN

  • 以下範例顯示如何要求變更 Performance 儲存磁碟區的 IOPS。XXXXXXXXX 是您要修改的磁碟區的 ID。3000 是您希望磁碟區擁有的新 IOPS 值。189433 是最大等級價格的 ID。190233 是 2000 - 2999 GB 容量範圍的 ID。190293 是 200 - 40000 IOPS 範圍的 ID。

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <SOAP-ENV:Header>
       <ns1:authenticate>
       </ns1:authenticate>
     </SOAP-ENV:Header>
     <SOAP-ENV:Body>
       <ns1:placeOrder>
         <orderData xsi:type="ns1:SoftLayer_Container_Product_Order_Network_Storage_AsAService_Upgrade">
           <volume xsi:type="ns1:SoftLayer_Network_Storage">
               <id xsi:type="xsd:int">XXXXXXXXX</id>
           </volume>
           <iops xsi:type="xsd:int">3000</iops>
           <packageId xsi:type="xsd:int">759</packageId>
           <prices SOAP-ENC:arrayType="ns1:SoftLayer_Product_Item_Price[3]" xsi:type="SOAP-ENC:Array">
               <item xsi:type="ns1:SoftLayer_Product_Item_Price">
                   <id xsi:type="xsd:int">189433</id>
               </item>
               <item xsi:type="ns1:SoftLayer_Product_Item_Price">
                   <id xsi:type="xsd:int">190233</id>
               </item>
               <item xsi:type="ns1:SoftLayer_Product_Item_Price">
                   <id xsi:type="xsd:int">190293</id>
               </item>
           </prices>
         </orderData>
       </ns1:placeOrder>
     </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    
  • 以下範例顯示如何調整 Endurance 儲存磁碟區的 IOPS。XXXXXXXXX 是您要修改的磁碟區 ID。4 是您希望磁碟區擁有的新 IOPS 層級值。189433 是最大層級價格的 ID。193373193433 是磁碟區擁有的容量和 IOPS 的價格範圍 ID。

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.service.softlayer.com/soap/v3.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <SOAP-ENV:Header>
       <ns1:authenticate>
       </ns1:authenticate>
     </SOAP-ENV:Header>
     <SOAP-ENV:Body>
       <ns1:placeOrder>
         <orderData xsi:type="ns1:SoftLayer_Container_Product_Order_Network_Storage_AsAService_Upgrade">
           <volume xsi:type="ns1:SoftLayer_Network_Storage">
               <id xsi:type="xsd:int">XXXXXXXX</id>
           </volume>
           <packageId xsi:type="xsd:int">759</packageId>
           <iops xsi:type="xsd:int">4</iops>
           <prices SOAP-ENC:arrayType="ns1:SoftLayer_Product_Item_Price[3]" xsi:type="SOAP-ENC:Array">
             <item xsi:type="ns1:SoftLayer_Product_Item_Price">
                 <id xsi:type="xsd:int">189433</id>
             </item>
             <item xsi:type="ns1:SoftLayer_Product_Item_Price">
                 <id xsi:type="xsd:int">193373</id>
             </item>
             <item xsi:type="ns1:SoftLayer_Product_Item_Price">
                 <id xsi:type="xsd:int">193433</id>
             </item>
           </prices>
         </orderData>
       </ns1:placeOrder>
     </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    

使用 Terraform 調整儲存設備的 IOPS

您可以使用 ibm_storage_block 資源,並在 iops 引數中指定不同的數字,來調整 IOPS。 下列範例會將「耐久性」磁區的效能層級增加至 4 IOPS/GB 層級。

resource "ibm_storage_block" "test1" {
        type = "Endurance"
        datacenter = "dal09"
        capacity = 40
        iops = 4
        os_format_type = "Linux"

        # Optional fields
        allowed_virtual_guest_ids = [ 27699397 ]
        allowed_ip_addresses = ["10.40.98.193", "10.40.98.200"]
        snapshot_capacity = 10
        hourly_billing = true
}

下列範例會將「效能」磁區的效能層次變更為 150 IOPS。

resource "ibm_storage_block" "test2" {
        type = "Performance"
        datacenter = "dal09"
        capacity = 40
        iops = 150
        os_format_type = "Linux"

        # Optional fields
        allowed_virtual_guest_ids = [ 27699397 ]
        allowed_ip_addresses = ["10.40.98.193", "10.40.98.200"]
        hourly_billing = true
}

如需引數及屬性的相關資訊,請參閱 ibm_storage_block