Table of Contents | ||
---|---|---|
|
Overview
DRBD is a host-based software replication that has a fundamental limitation on replication I/O transfer performance. These limits are measured at up to 5-6G bps transmissions on TCP / IP-based 10Gbps networks. Therefore, in such environments, it is difficult to measure the underlying performance of DRX's buffering or compression. In order to measure the performance of any equipment or software, data must be input without limitation and the resulting output can be calculated. In this regard, drbdsim is a tool developed to solve performance measurement problems.
drbdsim simulates a basic drbd connection and simulates unlimited replicated data transfers to provide an environment for measuring the inherent performance of DRX. The added advantage of I/O simulation also eliminates the need to pre-configure the replication resources (disks, network connections) that need to be prepared for testing.
Main Functions
- drbd connection simulation
- Simulates connection of Acceptor/Connector's two channels
- data transmission
- Transfer large amounts of data without hard disk access to measure DRX performance
- Data type
- zero-fill: Data filled with 0x00
- sequencial: Data that sequentially increases from 0x00 to 0xFF
- random: Randomly generated data
- Specifying a file: Repeatedly sending the contents of the specified file
- Data Integrity Check
- Includes low-level data integrity checking to determine only packet headers and data start / end to prioritize performance (CRC check)
How to use
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[root@proxy1 drbdsim_demo]# ./drbdsim Usage: .\drbdsim.exe [options] command {command_arguments...} Global options: -h [ --help ] Help message. -l [ --stdout-log-level ] arg (=info) Standard output log level -f [ --file-log-level ] arg (=debug) File log level -o [ --output ] arg Output file --command arg Command to execute --subargs arg Arguments for command Commands: standby, control, wait, send-once, send Log levels: trace(T), debug(D), info(I), warning(W), error(E), critical(C), off(O) * last modified : Nov 19 2018, 17:41:41 |
...
- l / stdout-log-level: Specify the level of the log output on the screen
- f / file-log-level: Specify the level of the log output to the file
- o / output: Specify file name to save log
StandAlone mode
wait mode
usage: drbdsim [options] wait peer_ip peer_port
...
An intermediate connection error occurs because the remote drbdsim is not yet running.
send-once mode
usage: drbdsim [options] send-once peer_ip peer_port
...
When data transmission is performed, the B/W measurement result is output. The B/W is output once per second and uses the average value by summing the total of 4 past data, so that the B/W measurement result of 4 seconds is outputted by one data transmission.
send mode
usage: drbdsim [options] send peer_ip peer_port
...
Code Block | ||||
---|---|---|---|---|
| ||||
[root@proxy1 drbdsim_demo]# ./drbdsim send -p 5000 200.60.211.252 5000 -s 5 -b 6G -t s [08:46:23.997586] [t83947] [app:info] Start [08:46:23.998114] [t83947] [resource:info] Start (Listen 5000, Peer 200.60.211.252:5000) [08:46:23.998241] [t83947] [resource:info] [C] Connect to 200.60.211.252:5000 [08:46:23.998289] [t83947] [resource:info] [A] Listen 0.0.0.0:5000 [08:46:23.998292] [t83947] [resource:info] [A] Accept... [08:46:23.998488] [t83950] [resource:error] [C] Can't connect to 200.60.211.252:5000. Connection refused [08:46:25.167158] [t83950] [resource:info] [A] Accepted 200.60.211.252:43890 [08:46:25.199745] [t83950] [resource:info] [C] Connected. Send magic packet [08:46:25.199780] [t83951] [resource:info] [C:meta] Start process [08:46:25.199793] [t83951] [resource:info] [A:data] Start process [08:46:25.199800] [t83951] [resource:info] [repl_test] Prepare test... [08:46:25.199888] [t83951] [resource:info] [repl_test] Start replication test (duration: 5s, limits: 6.00 Gbps, packet_type: sequencial) [08:46:26.199980] [t83950] [resource:info] [statistics] TX Bandwidth: 6.00 Gbps / 715.66 MB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s [08:46:27.199975] [t83951] [resource:info] [statistics] TX Bandwidth: 6.00 Gbps / 715.50 MB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s [08:46:28.199975] [t83950] [resource:info] [statistics] TX Bandwidth: 6.00 Gbps / 715.45 MB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s [08:46:29.199977] [t83951] [resource:info] [statistics] TX Bandwidth: 6.00 Gbps / 715.42 MB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s [08:46:30.199901] [t83951] [resource:info] [repl_test] Test finished [08:46:30.199974] [t83950] [resource:info] [statistics] TX Bandwidth: 6.00 Gbps / 715.31 MB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s [08:46:31.199971] [t83951] [resource:info] [statistics] TX Bandwidth: 4.50 Gbps / 536.48 MB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s [08:46:32.199997] [t83950] [resource:info] [statistics] TX Bandwidth: 3.00 Gbps / 357.64 MB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s [08:46:33.200004] [t83951] [resource:info] [statistics] TX Bandwidth: 1.50 Gbps / 178.80 MB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s |
Standby/Control mode
standby mode
usage: drbdsim.exe [options] standby
...
Code Block | ||||
---|---|---|---|---|
| ||||
[root@proxy1 drbdsim_demo]# ./drbdsim standby -p 9101 [08:51:56.413599] [t18932] [app:info] Start standby mode (port: 9101) |
Control mode
usage: drbdsim.exe [options] control [actions...]
...
In this mode, you must disable the standard output of the log to get the result of the operation.
list - Output resource list
Print a list of added resources.
Code Block | ||||
---|---|---|---|---|
| ||||
[root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=1 list {"code": 0, "result": ["r0", "r1"]} [root@proxy1 drbdsim_demo]# ./drbdsim control -l=O list code: 0 result: r0 r1 [root@proxy1 drbdsim_demo]# ./drbdsim control -l=O -p 9102 list code: 0 result: empty |
add - add resource
add [resource_name] [listen_ip] [listen_port] [peer_ip] [peer_port]
Code Block | ||||
---|---|---|---|---|
| ||||
[root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=0 -p 9101 add r0 0.0.0.0 9000 127.0.0.1 9001 code: 0 result: ok [root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=1 -p 9102 add r0 0.0.0.0 9001 127.0.0.1 9000 {"code": 0, "result": "ok"} |
del - del resource
del [resource_name]
Code Block | ||||
---|---|---|---|---|
| ||||
[root@proxy1 drbdsim_demo]# ./drbdsim control -l=O del r0 code: 0 result: ok [root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=1 del r0 {"code": -3000, "error": "There is no resource 'r0'.", "result": "failed"} |
send - Data transmission
send [resource_name] [packet_type or filename] [total_length] [duration] [bps_limit]
...
Code Block | ||||
---|---|---|---|---|
| ||||
[root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=1 -p 9101 send r0 data.db 1G 0 100M {"code": 0, "result": "ok"} |
stop - Stop sending data
stop [resource_name]
Code Block | ||||
---|---|---|---|---|
| ||||
[root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=1 -p 9101 stop r0 {"code": 0, "result": "ok"} |
states - Resource status output
states [resource_name or all]
...
Code Block | ||||
---|---|---|---|---|
| ||||
[root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=0 -p 9101 states r0 code: 0 result: rx_bps: 0 rx_bps_to_human: 0.00 bps state: connected testing: true tx_bps: 12501528 tx_bps_to_human: 100.01 Mbps [root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=1 -p 9102 states r0 {"code": 0, "result": {"rx_bps": 12501528, "rx_bps_to_human": "100.01 Mbps", "state": "connected", "testing": false, "tx_bps": 0, "tx_bps_to_human": "0.00 bps"}} [root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=0 -p 9101 states all code: 0 result: r0: rx_bps: 0 rx_bps_to_human: 0.00 bps state: connected testing: false tx_bps: 0 tx_bps_to_human: 0.00 bps [root@proxy1 drbdsim_demo]# ./drbdsim control -l=O --json=1 -p 9102 states all {"code": 0, "result": {"r0": {"rx_bps": 0, "rx_bps_to_human": "0.00 bps", "state": "connected", "testing": false, "tx_bps": 0, "tx_bps_to_human": "0.00 bps"}}} |
quit - End
Exit drbdsim, the standby mode. On success, there is no extra output.
...