Document Type | Technical Information
Category | Monitoring/Inspection
Document Number | TMOTI032
Overview
tbiobench tool allows measuring the speed of not only file systems but also Raw Devices, making it useful for disk speed measurement tests when disk I/O issues occur.This document provides guidance on how to use the
tbiobench tool.Note
tbiobenchis a disk I/O performance measurement tool provided from Tibero 5 onwards.
Method
tbiobench Execution Options
Option | Description | Default |
|---|---|---|
-h <help> | Displays help for tbiobench options | - |
-b <block size> | Sets the I/O measurement block unit size | 8KB |
-s <total size> | Sets the total size of the I/O test | 1GB |
-F <flag> O_DIRECT | O_SYNC | O_TRUNC | O_NONBLOCK | Sets I/O flags. To set multiple flags, use the -F option multiple times | O_SYNC |
-t <target file> | Specifies the I/O target file. For raw devices, specify the device as the target file | Creates a .tmp file with a random name in the current directory |
-f <overwrite target file ("force")> | If the specified file cannot be opened, deletes it and creates a new one for use | - |
-k <keep target file after test> | Prevents deletion of the I/O target file after the test | - |
-i <io_type> SW | SR | RR | RW | SEQ | RND | ALL | Specifies the I/O type to measure | SW/RW |
-T <thread count> | Sets the number of threads | 1 |
-S <random seed> | Sets the random seed used in random I/O | - |
-o <output file> | Saves the test output to the specified file | - |
Note
To accurately measure values using tbiobench, you must verify the flags opened in datafile, redo, etc., and apply options accordingly.
How to Check Flags by OS
OS | Command <PID should be a process using redo, datafile.> | OPEN FLAGS by OS <To measure with O_DSYNC option, a separate tool request is required.> |
|---|---|---|
Linux | strace -f -o open -p <pid> lsof +fg -p <pid> | - archive : O_RDWR|O_CREAT|O_EXCL - redo : O_RDWR|O_DSYNC - datafile : O_RDWR|O_DSYNC (* Based on Tibero 6 FS06, for DBWR AIO feature usage [Tibero6 FS02-04], enable _USE_O_DIRECT=Y in tip file and measure.) |
AIX | truss -afpo <outfile> -p <pid> pfiles <pid> | - archive : O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE - redo : O_RDWR|O_DIRECT|O_DSYNC|O_LARGEFILE - datafile : O_RDWR|O_DIRECT|O_DSYNC|O_LARGEFILE |
Solaris | truss -afpo <outfile> -p <pid> pfiles <pid> | - archive : O_RDWR|O_CREAT|O_EXCL - redo : O_RDWR|O_DSYNC|O_LARGEFILE - datafile : O_RDWR|O_DSYNC|O_LARGEFILE |
HP | piles <pid> tusc -afpo <output file> <pid> <executable> | - redo : O_RDWR|O_DSYNC|O_LARGEFILE - datafile : O_RDWR|O_DSYNC|O_LARGEFILE |
Usage Examples
1. Check Used Flags
- File System / Linux Test
-- FILE SYSTEM / Linux [km@pub:/home/km]$ lsof +fg -p 30445 (DBWR process) / Measure using processes that use redo, datafile COMMAND PID USER FD TYPE FILE-FLAG DEVICE SIZE/OFF NODE NAME tbsvr 30445 km cwd DIR 253,2 6 2150965 /home/km/tibero6/bin/prof tbsvr 30445 km rtd DIR 253,0 4096 64 / tbsvr 30445 km txt REG 253,2 466078792 28844160 /home/km/tibero6/bin/tbsvr tbsvr 30445 km 86u REG RW,SYN,DIR,LG 253,2 209715200 282582779 /home/km/tibero6/database/km_test/TMS_VDS_DATA01.DTF tbsvr 30445 km 87u REG RW,SYN,DIR,LG 253,2 209715200 282582780 /home/km/tibero6/database/km_test/TMS_TMS_DATA01.dtf tbsvr 30445 km 89u REG RW,SYN,DIR,LG 253,2 134217728 270503305 /home/km/tibero6/database/km_test/usr001.dtf tbsvr 30445 km 90u REG RW,SYN,DIR,LG 253,2 104857600 270503301 /home/km/tibero6/database/km_test/redo021.redo
- Raw Device / HP Test
-- Raw Device / HP
BL890c-1@x162780_0:/dev/vg01 # pfiles 2685
2685: /home/ps_test/tibero6/bin/tbsvr
0: S_ISCHR mode:666 dev:64,3 ino:31265 uid:0 gid:0 rdev:157,1
flags = O_RDWR|O_LARGEFILE
file = /dev/pts/1
1: S_ISCHR mode:666 dev:64,3 ino:31265 uid:0 gid:0 rdev:157,1
flags = O_RDWR|O_LARGEFILE
63: S_ISCHR mode:640 dev:64,3 ino:158704 uid:105 gid:106 rdev:128,8197
flags = O_RDWR|O_DSYNC|O_LARGEFILE
file = /dev/vg02/rlvol15_250g
64: S_ISCHR mode:660 dev:64,3 ino:147848 uid:105 gid:106 rdev:128,8194
flags = O_RDWR|O_DSYNC|O_LARGEFILE
file = /dev/vg02/rlvol12_250g2. Execute tbiobench
Referencing the file-flag and name values, execute in the corresponding paths for redo and datafile respectively.
CautionIf the write speed is below 10 MB/s, it is considered that the DISK speed is slow.
< Reference speeds: redo log - sequential write / datafile - random write >
- File System / Linux
-- FILE SYSTEM / Linux
[km@pub:/home/km/tibero6/database/km_test]$ tbiobench -i all -s 10M -F O_SYNC -F O_DIRECT -k < To apply read/write options simultaneously, use the -k option>
* Option Description: Performs I/O test with O_SYNC, O_DIRECT flags on all IO types for 10M size
target: IV2N60ZQPMPOZHS4RVC1MDP6FFFN8F7Q.tmp
header size: 0 Gbytes
block size: 8 Kbytes
total size: 10 Mbytes
flags:
O_DIRECT
O_SYNC
thread count: 1
random seed: 0
sequential write
Thread# ms Mbytes Mbytes/sec
0 3618.80 10.00 2.76
Total 3618.80 10.00 2.76
sequential read
Thread# ms Mbytes Mbytes/sec
0 46.61 10.00 214.56
Total 46.61 10.00 214.56
random write
Thread# ms Mbytes Mbytes/sec
0 1404.85 10.00 7.12
Total 1404.85 10.00 7.12
random read
Thread# ms Mbytes Mbytes/sec
0 123.01 10.00 81.29
Total 123.01 10.00 81.29- Raw Device / HP
When running tbiobench on a raw device, the device will be overwritten, so caution is required.
Measurement should be done before installation or on an empty device.
-- Raw Device / HP
BL890c-1@x162780_0:/dev/vg01 # tbiobench -f -F O_SYNC -s 10M -t lvol8_1g
target: lvol8_1g
header size: 0 Gbytes
block size: 8 Kbytes
total size: 10 Mbytes
flags:
O_SYNC
thread count: 1
random seed: 0
sequential write
Thread# ms Mbytes Mbytes/sec
0 330.66 10.00 30.24
Total 330.66 10.00 30.24
random write
Thread# ms Mbytes Mbytes/sec
0 609.84 10.00 16.40
Total 609.84 10.00 16.40- Zeta (refer to raw device)
For Zeta, since I/O occurs on ssvr, tbiobench must be run on the physical path of ssvr. The _USE_O_DIRECT=Y option must be set, so measure with the O_DIRECT option enabled. (e.g., if the physical path of ssvr is /zeta_disk/zeta-disk0, run tbiobench -s 10M -F O_SYNC -F O_DIRECT -t /dev/zeta-disk02 -f)
- TAS (refer to raw device)
For TAS, specify the raw device as the target for measurement. Since write tests on raw devices overwrite data, caution is required, and separate tests before installation are necessary.
How to Use tbnetbench
tbnetbench can check if network performance between nodes is normal. Usage is as follows.Usage
tbnetbench <type: server or client> <ip> <port> <send#> <send size> <repeat#>
Example
<Node 1>
tbnetbench server <Node 1 local cluster ip> <port> 5 8192 100
<Node 2>
tbnetbench client <Node 1 local cluster ip> <port> 5 8192 100
Reference Knowledge
Sequential operations use buffer cache and measure relatively quickly, so random measurements are required to obtain accurate values.
I/O Type | Description |
|---|---|
SW | Sequential Write / writes sequentially |
SR | Sequential Read / reads sequentially |
RR | Random Read / reads randomly |
RW | Random Write / writes randomly |
SEQ | Sequential Read/Write / writes and reads sequentially |
RND | Random Read/Write / writes and reads randomly |
ALL | Sequential Read/Write, Random Read/Write / all sequential and random writes and reads |
Flag | Description |
|---|---|
O_DIRECT | Reads/writes directly to disk without caching in buffer during I/O |
O_SYNC | write() system call synchronizes file write operations (including metadata sync) |
O_TRUNC | If a file exists and is opened with write option, truncates content and sets file length to 0 |
O_NONBLOCK | For disks, returns -1 if there is no data to read or write |
O_DSYNC | Synchronizes only data immediately after write operation (metadata sync not included) |