Optimization
Optimization Factor
Optimization of DRX is accomplished by adjusting the DRX internal parameters or by changing the settings of the system so that the buffering and compression functions provided by DRX can achieve optimal performance. The performance of DRX can be buffered up to 6 to 7 Gbps in a 10 Gbps network, and it can be said that the performance is adequate when the compression is 1.5 times more than that. However, these high-performance processing results are based on the assumption that the DRX transmission network bandwidth of the TX side is sufficient, and usually can not show such throughput in the WAN interval. Therefore, in the case of such a high level I/O load state, It is difficult to optimize the performance of DRX in situations where random high level I/O load occurs in such a low transmission band, and it is necessary to check the bandwidth situation of WAN section in advance through proper level simulation for I/O load. DRX provides the drxsim tool to perform these checks.
In general, the network bandwidth can be checked with tools such as iperf, and iperf calculates the maximum bandwidth the network can make. drxsim injects I/O load into DRX from local drxsim and receives remote relayed data from remote drxsim to calculate the throughput that DRX can process on the network. Therefore, DRX will perform best when iperf's result is equal to drxsim's or when drxsim's is greater than it by compression. Please refer to drxsim usage guide for more information on how to use it.
Based on the above, the factors of optimization are summarized as follows:
- Replication I/O load
- Network Bandwidth
- DRX Buffering
- Compression
Latency and throughput optimization on the local I/O side should be handled with optimization on the replication side. For this, please refer to the following.
Performance Indicator
Performance for the DRX can be viewed through the CLI commands provided by the DRX.
BAB Performance : memusage
This command checks the usage rate and latency of the BAB.
- Check the performance of BAB through BAB usage and latency.
You can check the usage rate of the BAB set by calculation of "2.4. Physical Memory Specifications".
- You can see where bottlenecks have occurred by increasing or decreasing the latency value.
Output Sample
- Capacity : Indicates the BAB size set in the resource, in Kilobytes.
- Use (Size) : Indicates BAB usage rate and Size. The unit of size is Kilobytes.
- BAB Latency is the current (cur), average (avg), maximum (max), and minimum (min) values for the TX, RX, Compress, and Decompress items. The unit is microseconds.
Compression performance statistics.: statistics
This command checks the DRX statistics information.
- To view compression statistics, use the filter option in Output mode.
- The compression ratio represents the average value and the compression efficiency of the data to be transmitted can be checked.
- Compression plug-in performance can be checked by the average compression time (cp-avg) and the decompression average time (dc-avg).
Sample command.
drx-ctl st all -v --filter=name,type,ratio,cur,best,worst,cp-avg,cp-cur,cp-min,cp-max,dc-avg,dc-cur,dc-min,dc-max
- Output Sample
- The unit of size is Kilobytes.
The compression ratio is calculated as (original size / compressed size), so it is round down to 2 decimal places for readability.
- The unit of compress(cp), decompress(de), encypto(ec), decrypto(dc) is microseconds.
Abbreviations
Abbreviation Description Abbreviation Description Abbreviation Description tx TX speed ratio compress average ratio ec encrypto rx RX speed cur compress current ratio dc decrypto t-net TX network total relayed bytes worst compress worst ratio t-raw TX network total transferred bytes best compress best ratio r-net RX network total relayed bytes cp compress r-raw RX network total transferred bytes de decompress
Optimization procedure
DRX can optimize by adjusting the buffer size and compression options.
Buffer size
Size of the buffer is set via "memlimit" value in "proxy" section of the bsr configuration file.
proxy { memlimit 1G; }
Compression type and level
DRX provides the following compression plug-ins.
Type | System | Level range | Remarks |
---|---|---|---|
ZLIB | SW | 1~9 | - |
LZ4 | SW | 1~9 | - |
NONE | - | - | OFF |
The command to set the compression plug-in is as follows.
Type | Commands | Example output |
---|---|---|
ZLIB | drx-ctl set compress zlib [level] [connect name] | |
LZ4 | drx-ctl set compress lz4 [level] [connect name] | |
NONE | drx-ctl set compress none 0 [connect name] |
Number of compressing threads
It is possible to change the number of threads processing packets.
The number of threads is set to "process-thread-count" value in the configuration file. If you do not set it or input "-1", it will operate at half the number of CPU cores.
- Commands
Others
For DRX Appliance, you can perform optimizations on the local replication I/O reception intervals that work with bsr. DRX is primarily designed to perform buffering in the application address space, so performance may vary depending on the receiving performance of the OS kernel of the appliance, which is directly linked to bsr. Therefore, you can tune the receive buffer of this OS kernel socket to further enhance RX receive performance. To ensure that the OS kernel has enough receive buffers, it is necessary to apply the following to the OS kernel.
Linux Kernel Network Parameter
Changing the value using sysctl should be aware that there is a risk that the system will crash.
If you set an unreasonable value to the system, it may stop immediately, so it should be done after enough testing.
- Change TCP socket buffer size
- Server used for testing : Server of /wiki/spaces/PX/pages/901775481
- References link : https://www.ibm.com/support/knowledgecenter/en/SSZTET_10.1/smpi01/smpi01_tysfbpjp.html
- Default : 208KBytes
[root@c73-1 bsr.d]# sysctl -a | grep net.core.[rw]mem net.core.rmem_default = 212992 net.core.rmem_max = 212992 net.core.wmem_default = 212992 net.core.wmem_max = 212992 [root@c73-1 bsr.d]#
- Modify command : Change the max entry to 2 MBytes.
sysctl -w net.core.rmem_max="2097152" sysctl -w net.core.wmem_max="2097152"
The set value is not an absolute value and the performance result may be different depending on server and network environment.