IBM Cloud Docs
调整 IOPS

调整 IOPS

通过此功能,您可以立即调整现有 Block Storage for Classic 的 IOPS。 您无需创建副本或手动将数据复制到新的存储空间。 此调整不会导致任何类型的中断或无法访问存储器。

存储费用账单将更新,以在当前账单周期内添加新价格按比例计算的差额。 在下一个计费周期中将采用整个新金额记帐。

可调整 IOPS 的优点

  • 成本管理 - 某些客户可能只在峰值使用时间内需要高 IOPS。 例如,大型零售店在节假日期间使用量达到峰值,此时可能需要更高的存储IOPS率。 然而,零售店在盛夏时节并不需要更高的IOPS。 借助此功能,您可以管理成本,并在需要时为更高的 IOPS 付费。

限制

在调整IOPS时,无法在“耐用性”和“性能”之间切换。 但是,您可以根据以下条件为存储器指定新的 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 选项。 如果选择的卷大小无效,那么 UI 会通知您。
  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 Service 进行 API 调用来调整 IOPS。 可以使用您选择的脚本语言来发出以下样本 API 请求。

有关 SLAPI 的更多信息,请参阅 SLDN

  • 以下示例展示了如何在性能存储卷上请求更改 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>
    
  • 以下示例展示了如何调整持久性存储卷上的 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