Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Settings for Xmrig-Proxy #2377

Closed
masterjek opened this issue May 9, 2024 · 10 comments
Closed

Network Settings for Xmrig-Proxy #2377

masterjek opened this issue May 9, 2024 · 10 comments

Comments

@masterjek
Copy link

Hello Unam. I read an article that said that on a server under load, one important parameter should be equal to a maximum of 1.
netstat -an | grep SYN_RECV | wc -l - I checked this on the server and there this parameter reaches values from 10 to 50, sometimes up to 100. But in all the articles they write that ideally, even with maximum load on the server, it should be equal to 1 and not higher.
On various forums I collected network settings, which, as written in the article, are just for loaded servers.
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.tcp_syn_retries = 5
net.ipv4.tcp_max_orphans = 65536
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_keepalive_intvl = 15
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_max_syn_backlog = 102400
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_mem = 96552 128739 193104
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_orphan_retries = 0
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_abort_on_overflow = 0
net.ipv4.netfilter.ip_conntrack_max = 16777216
net.netfilter.nf_conntrack_max = 16777216
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_congestion_control = htcp
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.route.flush = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.lo.rp_filter = 1
net.ipv4.conf.eth0.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.lo.accept_source_route = 0
net.ipv4.conf.eth0.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_forward = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.core.somaxconn = 15000
net.core.netdev_max_backlog = 1000
net.core.rmem_default = 65536
net.core.wmem_default = 65536
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
fs.inotify.max_user_watches = 16777216
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
I would like to know these settings are correct? I won't make things worse on the server?

@masterjek
Copy link
Author

masterjek commented May 10, 2024

Unam I also wanted to ask. And the latest version 3.4.0 uses the version - XMRig/6.19.3

@UnamSanctam
Copy link
Owner

Those settings look fine, though make sure that you don't need IPv6 since you're disabling it.

Unam I also wanted to ask. And the latest version 3.4.0 uses the version - XMRig/6.19.3

The latest one uses xmrig 6.20.0, I just forgot to update/merge the versioning file since it was on the ignore list.

@masterjek
Copy link
Author

Those settings look fine, though make sure that you don't need IPv6 since you're disabling it.

What does IPv6 do in general? When I buy a server, I always remove the Ipv6 option. This does not affect the performance of xmrig-proxy in any way?

@UnamSanctam
Copy link
Owner

Since the internet has technically run out of IPv4 addresses (xxx.xxx.xxx.xxx) the newer protocol is called IPv6 which supports more addresses. IPv6 isn't generally mandatory and not really used for servers, especially if miners connect with an IPv4 address, so for your purposes it shouldn't matter.

@masterjek
Copy link
Author

Unam I forgot to ask, but the MTU value is very important. By default it is 1500, I change it to 9000.

@masterjek masterjek reopened this May 15, 2024
@UnamSanctam
Copy link
Owner

MTU is important but I believe 1500 is the maximum so if you set it higher than that I believe it will automatically still be 1500.

@masterjek
Copy link
Author

MTU важен, но я считаю, что 1500 — это максимум, поэтому, если вы установите его выше этого значения, я считаю, что оно автоматически все равно будет 1500.

I changed like this - /etc/network/interfaces - to the end of the file mtu 9000
And after rebooting the server - ip link - shows MTU value 9000
I was just asking if increasing this value would harm the server?

@UnamSanctam
Copy link
Owner

Sure there can be problems, since I believe both sender (miner) and receiver (your server) and also all the infrastructure in between needs to support jumbo frames (MTU over 1500) then it can lead to packet loss and fragmentation if one part does not support it. And it's quite likely that something doesn't support it.

@masterjek
Copy link
Author

Sure there can be problems, since I believe both sender (miner) and receiver (your server) and also all the infrastructure in between needs to support jumbo frames (MTU over 1500) then it can lead to packet loss and fragmentation if one part does not support it. And it's quite likely that something doesn't support it.

I understood correctly, it’s better not to touch this value and leave it as default.

@UnamSanctam
Copy link
Owner

Yes, going over 1500 is not recommended .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants