暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

使用 Orion 测试存储性能

oracleace 2024-02-28
507

当对 I/O 子系统的性能进行粗略评估时,dd
命令已经足够。详情请参阅: 测试硬盘的性能,用dd就够了?

要对存储性能进行精确和全面的校准,Orion 是一个很好的选择。Orion 是由 Oracle 开发并随 Oracle 数据库一起提供的工具,它模拟了 Oracle 数据库的 I/O 工作负载以对存储进行基准测试。使用Orion并不需要安装 Oracle 软件或创建数据库。

关于号主,姚远:

  • Oracle ACE(Oracle和MySQL数据库方向)

  • 华为云最有价值专家

  • 《MySQL 8.0运维与优化》的作者

  • 拥有 Oracle 10g、12c和19c OCM等数十项数据库认证

  • 曾任IBM公司数据库部门经理

  • 20+年DBA经验,服务2万+客户

  • 精通C和Java,发明两项计算机专利


01


简单测试


以下命令是针对 HDD 设备 /dev/sde
进行的简单测试:
    $ echo "/dev/sde" > orion.lun
    $ sudo opt/oracle/product/23c/dbhomeFree/bin/orion -run simple -hugenotneeded
    ORION: ORacle IO Numbers -- Version RDBMS_23.2.0.0.0_LINUX.X64_230325
    orion_20240207_1526
    Calibration will take approximately 9 minutes.
    Using a large value for -cache_size may take longer.


    Setting ftype=0
    Maximum Large MBPS=536.98 @ Small=0 and Large=2


    Maximum Small IOPS=46447 @ Small=5 and Large=0
    Small Read Latency: avg=106.960 us, min=55.472 us, max=644.537 us, std dev=15.235 us @ Small=5 and Large=0


    Minimum Small Latency=54.889 usecs @ Small=1 and Large=0
    Small Read Latency: avg=54.889 us, min=51.637 us, max=216.917 us, std dev=10.820 us @ Small=1 and Large=0
    Small Read Write Latency Histogram @ Small=1 and Large=0
    Latency: # of IOs (read) # of IOs (write)
    0 - 32 us: 0 ( 0.00%) 0 ( 0.00%)
    32 - 64 us: 1057519 ( 97.95%) 0 ( 0.00%)
    64 - 128 us: 11053 ( 98.98%) 0 ( 0.00%)
    128 - 256 us: 11042 (100.00%) 0 ( 0.00%)
    256 - 268435456 us: 0 (100.00%) 0 ( 0.00%)
    此命令对指定设备执行简单测试,并生成吞吐量和延迟等各种指标。类似的测试也可以对 SSD 设备 /dev/nvme0n1
    进行:
      $ echo "/dev/nvme0n1" > orion.lun
      $ sudo opt/oracle/product/23c/dbhomeFree/bin/orion -run simple -hugenotneeded
      ORION: ORacle IO Numbers -- Version RDBMS_23.2.0.0.0_LINUX.X64_230325
      orion_20240207_1538
      Calibration will take approximately 9 minutes.
      Using a large value for -cache_size may take longer.


      Setting ftype=0
      Maximum Large MBPS=3217.10 @ Small=0 and Large=2


      Maximum Small IOPS=134352 @ Small=4 and Large=0
      Small Read Latency: avg=28.611 us, min=11.572 us, max=3603.936 us, std dev=13.502 us @ Small=4 and Large=0


      Minimum Small Latency=16.443 usecs @ Small=1 and Large=0
      Small Read Latency: avg=16.443 us, min=12.138 us, max=1528.563 us, std dev=12.727 us @ Small=1 and Large=0
      Small Read Write Latency Histogram @ Small=1 and Large=0
      Latency: # of IOs (read) # of IOs (write)
      0 - 8 us: 0 ( 0.00%) 0 ( 0.00%)
      8 - 16 us: 3363729 ( 95.96%) 0 ( 0.00%)
      16 - 32 us: 41453 ( 97.15%) 0 ( 0.00%)
      32 - 64 us: 21671 ( 97.76%) 0 ( 0.00%)
      64 - 128 us: 76284 ( 99.94%) 0 ( 0.00%)
      128 - 256 us: 2094 (100.00%) 0 ( 0.00%)
      256 - 512 us: 8 (100.00%) 0 ( 0.00%)
      512 - 1024 us: 1 (100.00%) 0 ( 0.00%)
      1024 - 2048 us: 3 (100.00%) 0 ( 0.00%)
      2048 - 268435456 us: 0 (100.00%) 0 ( 0.00%)
      这些测试的结果便于我们了解相应存储设备的性能。例如,这里的 SSD 设备的平均小读取延迟为 16.443 微秒,而这里 HDD 设备的平均小读取延迟为 106.96 微秒, SSD 设备比 HDD 设备快大约 5.5 倍。
      在这些测试过程中,还会生成各种文件供进一步检查,例如:
        $ ls orion*
        orion_20240207_1526_hist.txt orion_20240207_1526_mbps.csv
        orion_20240207_1538_hist.txt orion_20240207_1538_mbps.csv
        orion_20240207_1526_iops.csv orion_20240207_1526_summary.txt
        orion_20240207_1538_iops.csv orion_20240207_1538_summary.txt
        orion_20240207_1526_lat.csv orion_20240207_1526_trace.txt
        orion_20240207_1538_lat.csv orion_20240207_1538_trace.txt



        02


        关于数据损坏的担忧


        工程师们经常担心在运行 Orion 时可能会导致数据损坏。然而,除非明确指定了写入参数,否则 Orion 不会执行写入操作。以下是手册中有关此问题的摘录:
        $ orion -help
        ORION: ORacle IO Numbers -- Version RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417
        ...
        WARNING: IF YOU ARE PERFORMING WRITE TESTS, BE PREPARED TO LOSE ANY DATA STORED ON THE LUNS.
        ...
        write      Percentage of IOs that are writes (SEE WARNING ABOVE).      Default is 0.
        ...


        要了解更多有关 Orion 的功能的信息,请访问官方网站:

        https://docs.oracle.com/en/database/oracle/oracle-database/19/tgdba/IO-configuration-and-design.html#GUID-355C99D8-29C1-421F-8B65-47A3C48324A2

        文章转载自oracleace,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

        评论