I'm new to network administration and have a question. I am conducting research on whether it is possible to carry out TCP tuning using the genetic algorithm method. To do this, I wrote a Python program that takes a set of parameters and iterates through it using a genetic algorithm. After setting each set of parameters, I check the speed with the iperf utility. However, ultimately the speed does not increase. What am I doing wrong?
Here is a set of parameters that the program changes and a set of values that the genetic algorithm tries for each parameter.
'net.ipv4.tcp_app_win' : (0, 31),
'net.ipv4.tcp_window_scaling': [0, 1],
'net.ipv4.tcp_congestion_control' : ['reno', 'cubic', 'htcp'],
'net.ipv4.tcp_no_metrics_save' : [0, 1],
'net.core.netdev_max_backlog' : (1000, 10000),
'net.ipv4.tcp_timestamps' : [0, 1],
'net.core.rmem_max': (4096, 16777216),
'net.core.wmem_max': (4096, 16777216),
'net.core.rmem_default': (4096, 16777216),
'net.core.wmem_default': (4096, 16777216),
'net.ipv4.tcp_rmem' : [4096 ,131072, 5912352],
'net.ipv4.tcp_wmem' : [4096 ,131072, 5912352],
'net.ipv4.tcp_sack' : [0, 1],
'net.ipv4.tcp_dsack' : [0, 1],
'net.ipv4.tcp_fack' : [0, 1],
'net.ipv4.tcp_fastopen' : [1, 2, 4],
'net.ipv4.tcp_slow_start_after_idle': [0, 1],
'net.ipv4.tcp_keepalive_time' : (60, 7200),
'net.ipv4.tcp_keepalive_intvl' : (1, 75),
'net.ipv4.tcp_keepalive_probes' : (1, 9),
'net.core.netdev_max_backlog' : [1000, 5000],
'net.ipv4.tcp_max_syn_backlog' : (256, 300000),
'net.core.somaxconn' : (1024, 30000),
'net.ipv4.tcp_fin_timeout' : (10, 60),
'net.ipv4.tcp_syncookies' : [0, 1],
'net.ipv4.tcp_tw_reuse' : [0, 1],
'tcp_moderate_rcvbuf' : [0, 1],
'net.ipv4.tcp_synack_retries' : (1, 5),
'net.ipv4.tcp_max_orphans' : [512, 1024, 2048, 4096]
I will also note. Let's say that based on the results I get a fairly good set of parameter values, the network bandwidth in iperf is, say, 500 megabytes per second. If I test the bandwidth again on this set of values, the bandwidth value changes, sometimes significantly. Is there a way to do more definitive testing?