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, drxsim is a tool developed to solve performance measurement problems.
drxsim simulates a basic 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.
[root@proxy1 drxsim_demo]# ./drxsim Usage: .\drxsim.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 |
drxsim has stand alone mode (wait, send-once, send) and standby / control mode (standby, control).
Common options:
usage: drxsim [options] wait peer_ip peer_port
In the most basic mode, establish a connection with the remote drxsim and wait.
option:
[root@proxy1 drxsim_demo]# ./drxsim 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 drxsim is not yet running.
usage: drxsim [options] send-once peer_ip peer_port
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:
[root@proxy1 drxsim_demo]# ./drxsim 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.
usage: drxsim [options] send peer_ip peer_port
It is a mode to perform continuous data transmission. It is used to measure network performance or DRX performance.
Additional options:
[root@proxy1 drxsim_demo]# ./drxsim 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 |
usage: drxsim.exe [options] standby
Standby mode waiting for external control. Open the TCP port for control and wait.
Additional options:
[root@proxy1 drxsim_demo]# ./drxsim standby -p 9101 [08:51:56.413599] [t18932] [app:info] Start standby mode (port: 9101) |
usage: drxsim.exe [options] control [actions...]
This mode controls drxsim running in standby mode.
Additional options:
In this mode, you must disable the standard output of the log to get the result of the operation.
Print a list of added resources.
[root@proxy1 drxsim_demo]# ./drxsim control -l=O --json=1 list {"code": 0, "result": ["r0", "r1"]} [root@proxy1 drxsim_demo]# ./drxsim control -l=O list code: 0 result: r0 r1 [root@proxy1 drxsim_demo]# ./drxsim control -l=O -p 9102 list code: 0 result: empty |
add [resource_name] [listen_ip] [listen_port] [peer_ip] [peer_port]
[root@proxy1 drxsim_demo]# ./drxsim 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 drxsim_demo]# ./drxsim control -l=O --json=1 -p 9102 add r0 0.0.0.0 9001 127.0.0.1 9000 {"code": 0, "result": "ok"} |
del [resource_name]
[root@proxy1 drxsim_demo]# ./drxsim control -l=O del r0 code: 0 result: ok [root@proxy1 drxsim_demo]# ./drxsim control -l=O --json=1 del r0 {"code": -3000, "error": "There is no resource 'r0'.", "result": "failed"} |
send [resource_name] [packet_type or filename] [total_length] [duration] [bps_limit]
option list:
[root@proxy1 drxsim_demo]# ./drxsim control -l=O --json=1 -p 9101 send r0 data.db 1G 0 100M {"code": 0, "result": "ok"} |
stop [resource_name]
[root@proxy1 drxsim_demo]# ./drxsim control -l=O --json=1 -p 9101 stop r0 {"code": 0, "result": "ok"} |
states [resource_name or all]
Outputs the status of the active resource. If you enter 'all', all resource information is displayed.
Output items:
[root@proxy1 drxsim_demo]# ./drxsim 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 drxsim_demo]# ./drxsim 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 drxsim_demo]# ./drxsim 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 drxsim_demo]# ./drxsim 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"}}} |
Exit drxsim, the standby mode. On success, there is no extra output.
[root@proxy1 drxsim_demo]# ./drxsim control -l=O quit [root@proxy1 drxsim_demo]# ./drxsim 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"} |