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)

How to use

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

There are three modes of drbdsim: drxsim has stand alone mode (wait, send-once, and send. If mode is not specified, help is displayed.
공통 옵션send) and standby / control mode (standby, control).

Common options:

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

가장 기본이 되는 모드로, 원격 drbdsim과의 연결을 수립하고 대기한다.

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

option:

  • i / ip:Specify Listen IP 지정 (기본값: default is 0.0.0.0)
  • p / port: Specify Listen port 지정 (기본값default: 7780)
  • peer_ip: 원격 drbdsim 또는 DRX의 IP IP of remote drxsim or DRX
  • peer_port: 원격 drbdsim 또는 DRX의 Port Port of remote 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

중간의 접속 오류는 원격 drbdsim이 아직 가동중이 아니기 때문에 발생한 것이다An intermediate connection error occurs because the remote drxsim is not yet running.

send-once

...

mode

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

데이터 전송이 정상적으로 이루어지는지를 확인하기 위해, 접속 후 한번의 데이터 전송을 수행하는 모드이다.
DRX의 플러그인 사용시 패킷 스니핑을 통해 해당 플러그인의 동작이 정상적으로 이루어지는지 확인하기 위해 제작되었다.

추가 옵션In order to check whether data transfer is normally performed, it is a mode for performing one data transfer after connection.
The DRX plug-in is designed to check if the plug-in works normally through packet sniffing.

Additional options:

  • t / packet-type: 패킷 유형 지정 Specifying Packet Type
    • z / zero-fill
    • s / sequencial
    • r / random
  • packet-file: 파일 기반 패킷 지정 File-based packet.
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 측정 결과가 출력된다. B/W는 초당 한번 출력되고 총 4개의 과거 데이터를 합산하여 평균 값을 사용하므로, 한번의 데이터 전송으로 4초간의 B/W 측정 결과가 출력되었다.

send 모드

...

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

지속적인 데이터 전송을 수행하는 모드이다. 네트워크 성능이나 DRX의 성능을 측정하기 위해서 사용한다.

추가 옵션It is a mode to perform continuous data transmission. It is used to measure network performance or DRX performance.

Additional options:

  • t / packet-type: 패킷 유형 지정 Specifying Packet Type
    • z / zero-fill
    • s / sequencial
    • r / random
  • packet-file: 파일 기반 패킷 지정. 지정한 파일의 내용을 반복적으로 전송한다 File-based packet assignment. Repeatedly transfers the contents of the specified file.
  • s / transfer-duration: 전송 시간 지정 (초단위 Specify transmission time (in seconds)
  • b / bps-limits: 전송 속도 제한 (bps 단위 Transfer rate limit (in bps)
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

외부 제어를 기다리는 대기 모드이다. 제어를 위해 TCP 포트를 열고 대기한다.

추가 옵션Standby mode waiting for external control. Open the TCP port for control and wait.

Additional options:

  • i / ip: 제어 서버  Control Server IP (기본값: default is 0.0.0.0)
  • p / port: 제어 서버 포트 번호 (기본값 Control server port number (default: 9101)
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...]

standby 모드로 실행되어 있는 drbdsim을 제어하는 모드이다.

추가 옵션This mode controls drxsim running in standby mode.

Additional options:

  • i / peer_ip: 제어할 drbdsim의 IP The IP of drxsim to control. (기본값Default: 127.0.0.1)
  • p / peer_port: 제어할 drbdsim의 포트 번호 The port number of drxsim to control. (기본값Default: 9091)
  • json: 결과를 JSON 포맷으로 출력. 표준 출력 로그가 Off일 때만 동작한다. (기본값: 0)

이 모드에서 동작의 결과를 얻기 위해서는 로그의 표준 출력을 비활성화해야 한다.

list - 리소스 목록 출력

...

  •  Output the results in JSON format. It only works when the standard output log is Off. (Default is 0)

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
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

add -

...

add resource

add [resource_name] [listen_ip] [listen_port] [peer_ip] [peer_port]

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"}

del -

...

del resource

del [resource_name]

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"}

send -

...

 Data transmission

send [resource_name] [packet_type or filename] [total_length] [duration] [bps_limit]

옵션 목록option list:

  • packet_type or filename: 패킷 유형 또는 파일명. 사용가능한 패킷 유형은 단독 실행 모드와 같다 Packet type or filename. Available packet types are the same as Standalone mode.
    • z / zero-fill
    • s / sequencial
    • r / random
  • total_length: 전송할 데이터 길이 The length of the data to be transmitted.
  • duration: 전송 유지 시간. 0이면 무제한이고, 시간안에 지정한 데이터 길이를 다 보낸 경우 전송을 종료한다 Transmission duration. 0 is unlimited, and if the specified data length is reached within the time, the transmission is terminated.
  • bps_limit: 전송 속도 제한. 0이면 무제한이다 Transfer rate limit. 0 is unlimited.
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"}

stop -

...

 Stop sending data

stop [resource_name]

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

states -

...

 Resource status output

states [resource_name or all]

동작중인 리소스의 상태를 출력한다. 'all'을 입력하면 모든 리소스의 정보가 출력된다.

출력 항목Outputs the status of the active resource. If you enter 'all', all resource information is displayed.

Output items:

  • rx_bps, tx_bps, rx_bps_to_human, tx_bps_to_human: 전송 속도Transmission speed.
  • state: 리소스의 상태 Status of the resource
    • connecting: 접속 시도중 Attempting to connect
    • connected: 접속됨
  • testing: 패킷 전송중인 경우 true, 아니면 false True if the packet is being sent, false if not
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 drxsim, 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"}

...