Versions Compared

Key

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

Table of Contents

7.1. Optimization Factor

Optimization of DRX is accomplished by adjusting the DRX internal parameters or by changing the settings of the

Table of Contents

7.1. 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 drbdsim tool to perform these checks.

...

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

    Code Block
    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.


      Code Block
      themeDJango
      titlestatistics
      collapsetrue
      < verbose output >
      [root@c69-1 drbd.d]# drx-ctl st all -v
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name           type tx  rx t-raw t-net r-raw r-net ratio cur  best  worst cp-avg   cp-cur cp-min   cp-max   ec-avg ec-cur ec-min ec-max dc-avg dc-cur dc-min dc-max de-avg   de-cur de-min   de-max   
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      r0-c69-2-c69-1 data 184 0  13660 6821  0     1     1.93  0.00 18.07 1.00  0.000098 0      0.000001 0.013818 0      0      0      0      0      0      0      0      0.000189 0      0.000001 0.002338 
      r0-c69-2-c69-1 meta 0   0  
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       All connections : 2, Established : 2
      [root@c69-1 drbd.d]#
      
      
      < use the filter option output>
      [root@c69-1 drbd.d]# 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
      -----------------------------------------------------------------------------------------------------------
      name           type ratio cur  best  worst cp-avg   cp-cur   cp-min   cp-max   dc-avg dc-cur dc-min dc-max 
      -----------------------------------------------------------------------------------------------------------
      r0-c69-2-c69-1 data 1.91  1.94 18.07 1.00  0.000088 0.000139 0.000001 0.013818 0      0      0      0      
      r0-c69-2-c69-1 meta 
      -----------------------------------------------------------------------------------------------------------
       All connections : 2, Established : 2
      [root@c69-1 drbd.d]#
      
      

      Abbreviations

      AbbreviationDescriptionAbbreviationDescriptionAbbreviationDescriptiontxTX speedratiocompress average ratioecencryptorxRX speedcurcompress current ratio dcdecryptot-netTX network total relayed bytesworstcompress worst ratiot-rawTX network total transferred bytesbestcompress best ratior-netRX network total relayed bytescpcompressr-rawRX network total transferred bytesdedecompress

7.3. Optimization procedure

DRX can optimize by adjusting the buffer size and compression options.

7.3.1 Buffer size

Size of the buffer is set via "memlimit" value in "proxy" section of the DRBD configuration file.

Code Block
proxy {
	memlimit 1G;
}

7.3.2 Compression type and level

DRX provides the following compression plug-ins.

...

Type

...

System

...

Level range

...

Remarks

...

The command to set the compression plug-in is as follows.

...

themeDJango
titleset compress
collapsetrue

...

    • -----------------
       All connections : 2, Established : 2
      [root@c69-1 drbd.d]#
      
      


    • Abbreviations

      AbbreviationDescriptionAbbreviationDescriptionAbbreviationDescription
      txTX speedratiocompress average ratioecencrypto
      rxRX speedcurcompress current ratio dcdecrypto
      t-netTX network total relayed bytesworstcompress worst ratio

      t-rawTX network total transferred bytesbestcompress best ratio

      r-netRX network total relayed bytescpcompress

      r-rawRX network total transferred bytesdedecompress


7.3. Optimization procedure

DRX can optimize by adjusting the buffer size and compression options.

7.3.1 Buffer size

Size of the buffer is set via "memlimit" value in "proxy" section of the DRBD configuration file.

Code Block
proxy {
	memlimit 1G;
}

7.3.2 Compression type and level

DRX provides the following compression plug-ins.


Type
System
Level range
Remarks
ZLIBSW1~9-
LZ4SW1~9-
NONE--OFF


The command to set the compression plug-in is as follows.

TypeCommandsExample output
ZLIB drx-ctl set compress zlib [level] [connect name] 


Code Block
themeDJango
titleset compress
collapsetrue
< Set compression plug-in to ZLIB >
[root@c73-qat-1 drbd.d]# drx-ctl set compress zlib 1 r0-c73-qat-2-c73-qat-1
r0-c73-qat-2-c73-qat-1: updated.
Result: 1 resource(s) updated.

[root@c73-qat-1 drbd.d]#


LZ4drx-ctl set compress lz4 [level] [connect name] 


Code Block
themeDJango
titleset compress
collapsetrue
< Set compression plug-in to LZ4 >
[root@c73-qat-1 drbd.d]# drx-ctl set compress lz4 1 r0-c73-qat-2-c73-qat-1
r0-c73-qat-2-c73-qat-1: updated.
Result: 1 resource(s) updated.

[root@c73-qat-1 drbd.d]#


NONEdrx-ctl set compress none 0 [connect name] 


Code Block
themeDJango
titleset compress
collapsetrue
< Turn off compression plug-ins >
[root@c73-qat-1 drbd.d]# drx-ctl set compress none 0 r0-c73-qat-2-c73-qat-1
r0-c73-qat-2-c73-qat-1: updated.
Result: 1 resource(s) updated.

[root@c73-qat-1 drbd.d]#



...

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.

...

/wiki/spaces/QA/pages/925794470

...

  • 8 Core / 1GBps 4H/W Zlib Level 116 Core / 2GBps8Commands


    Code Block
    themeDJango
    titleprocess-thread-count
    collapsetrue
    < Configuration >
    [root@c73-qat-1 drbd.d]# drx-ctl set process-thread-count 10
    Result: done.
    
    [root@c73-qat-1 drbd.d]# 
    
    
    < Check > 
    [root@c73-qat-1 drbd.d]# drx-ctl show all
    ...
    ip-verification=on
    process-thread-count=10
    
    [root@c73-qat-1 drbd.d]#
    
    


...