Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3

Overview

DRBD BSR 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 drxsim is a tool developed to solve performance measurement problems.

drbdsim drxsim simulates a basic drbd bsr 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 bsr 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)

...

Code Block
languagetext
themeRDark
titledrbdsim
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim
Usage: .\drbdsimdrxsim.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

drbdsim drxsim has stand alone mode (wait, send-once, send) and standby / control mode (standby, control).

...

StandAlone mode

wait mode

usage: drbdsim drxsim [options] wait peer_ip peer_port

In the most basic mode, establish a connection with the remote drbdsim drxsim and wait.

option:

  • i / ip:Specify Listen IP (default is 0.0.0.0)
  • p / port: Specify Listen port (default: 7780)
  • peer_ip: IP of remote drbdsim drxsim or DRX
  • peer_port: Port of remote drbdsim drxsim or DRX
Code Block
languagetext
themeRDark
titlewait mode
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim wait -p 5000 200.60.211.252 5000
[08:33:24.794367] [t81616] [app:info] Start
[08:33:24.794482] [t81616] [resource:info] Start (Listen 5000, Peer 200.60.211.252:5000)
[08:33:24.794589] [t81616] [resource:info] [C] Connect to 200.60.211.252:5000
[08:33:24.794629] [t81616] [resource:info] [A] Listen 0.0.0.0:5000
[08:33:24.794632] [t81616] [resource:info] [A] Accept...
[08:33:24.794823] [t81619] [resource:error] [C] Can't connect to 200.60.211.252:5000. Connection refused
[08:33:34.653542] [t81619] [resource:info] [A] Accepted 200.60.211.252:41072
[08:33:34.710491] [t81620] [resource:info] [C] Connected. Send magic packet
[08:33:34.710534] [t81619] [resource:info] [C:meta] Start process
[08:33:34.710546] [t81619] [resource:info] [A:data] Start process

An intermediate connection error occurs because the remote drbdsim drxsim is not yet running.

send-once mode

usage: drbdsim drxsim [options] send-once peer_ip peer_port

...

Code Block
languagetext
themeRDark
titlesend-once mode
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim send-once -p 5000 -t random 200.60.211.252 5000
[08:38:17.514085] [t82488] [app:info] Start
[08:38:17.514271] [t82488] [resource:info] Start (Listen 5000, Peer 200.60.211.252:5000)
[08:38:17.514398] [t82488] [resource:info] [C] Connect to 200.60.211.252:5000
[08:38:17.514449] [t82488] [resource:info] [A] Listen 0.0.0.0:5000
[08:38:17.514452] [t82488] [resource:info] [A] Accept...
[08:38:17.514650] [t82491] [resource:error] [C] Can't connect to 200.60.211.252:5000. Connection refused
[08:38:19.558009] [t82491] [resource:info] [A] Accepted 200.60.211.252:41210
[08:38:19.617391] [t82491] [resource:info] [C] Connected. Send magic packet
[08:38:19.617439] [t82492] [resource:info] [C:meta] Start process
[08:38:19.617453] [t82492] [resource:info] [A:data] Start process
[08:38:19.617460] [t82492] [resource:info] [repl_test] Prepare test...
[08:38:19.621709] [t82492] [resource:info] [repl_test] Start packet test (packet_type: random)
[08:38:19.621770] [t82492] [resource:info] [repl_test] Test finished
[08:38:20.621796] [t82491] [resource:info] [statistics] TX Bandwidth: 524.34 Kbps / 64.01 KB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s
[08:38:21.621784] [t82492] [resource:info] [statistics] TX Bandwidth: 262.17 Kbps / 32.00 KB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s
[08:38:22.621789] [t82491] [resource:info] [statistics] TX Bandwidth: 174.78 Kbps / 21.33 KB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s
[08:38:23.621766] [t82492] [resource:info] [statistics] TX Bandwidth: 131.08 Kbps / 16.00 KB/s, RX Bandwitdh: 0.00 bps / 0.00 B/s

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 drxsim [options] send peer_ip peer_port

...

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim 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: drbdsimdrxsim.exe [options] standby

Standby mode waiting for external control. Open the TCP port for control and wait.

...

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim standby -p 9101
[08:51:56.413599] [t18932] [app:info] Start standby mode (port: 9101)

Control mode

usage: drbdsim drxsim.exe [options] control [actions...]

This mode controls drbdsim drxsim running in standby mode.

Additional options:

  • i / peer_ip: The IP of drbdsim drxsim to control. (Default: 127.0.0.1)
  • p / peer_port: The port number of drbdsim drxsim to control. (Default: 9091)
  • json: Output the results in JSON format. It only works when the standard output log is Off. (Default is 0)

...

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O --json=1 list
{"code": 0, "result": ["r0", "r1"]}
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O list
code: 0
result:
  r0
  r1
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O -p 9102 list
code: 0
result: empty

...

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim 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 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O --json=1 -p 9102 add r0 0.0.0.0 9001 127.0.0.1 9000
{"code": 0, "result": "ok"}

...

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O del r0
code: 0
result: ok
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O --json=1 del r0
{"code": -3000, "error": "There is no resource 'r0'.", "result": "failed"}

...

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O --json=1 -p 9101 send r0 data.db 1G 0 100M
{"code": 0, "result": "ok"}

...

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O --json=1 -p 9101 stop r0
{"code": 0, "result": "ok"}

...

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim 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 drbdsimdrxsim_demo]# ./drbdsimdrxsim 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 drbdsimdrxsim_demo]# ./drbdsimdrxsim 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 drbdsimdrxsim_demo]# ./drbdsimdrxsim 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 drbdsimdrxsim, the standby mode. On success, there is no extra output.

Code Block
languagetext
themeRDark
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O quit
[root@proxy1 drbdsimdrxsim_demo]# ./drbdsimdrxsim control -l=O --json=1 quit
{"code": -6000, "error": "Communication error: No connection could be made because the target machine actively refused it", "result": "failed"}

...