<div dir="ltr">Out of the box Linux isn't optimized for high speed networking - if you google for linux and 1g or 10g you'll find a ton of pages about configuration changes.<div><br></div><div>I think you'll want to do something like:</div><div><br></div><div><span id="gmail-docs-internal-guid-f7fda068-840c-d93a-8cbf-22c3dbf6c4bf"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">ifconfig eth0 txqueuelen 10000</span></span><br></div><div><span id="gmail-docs-internal-guid-f7fda068-840d-8b9b-124c-26dfe7c99273"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">ethtool -G eth0 rx 4096 tx 4096</span></span><span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></span></div><div><span id="gmail-docs-internal-guid-f7fda068-840e-1a14-acd9-6a40fc433d5f"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">ip route | while read x; do ip route change $x initcwnd 10 initrwnd 10; done</span></span><span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></span></div><div><span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></span></div><div><span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">And these sysctl settings:</span></span></div><div><span><span style="background-color:transparent;vertical-align:baseline;font-size:14.6667px;white-space:pre-wrap"><font color="#000000" face="arial"><div>net.ipv4.tcp_tw_reuse = 1</div><div>net.ipv4.tcp_fin_timeout = 10</div><div>net.ipv4.tcp_keepalive_time = 60</div><div>net.ipv4.tcp_keepalive_probes = 14</div><div>net.ipv4.tcp_keepalive_intvl = 15</div><div>net.ipv4.conf.all.accept_redirects = 0</div><div>net.ipv4.tcp_syncookies = 1</div><div>net.ipv4.ip_nonlocal_bind = 1</div><div>net.ipv4.tcp_sack = 1</div><div>net.ipv4.ip_local_port_range = 1024 65535</div><div>net.core.rmem_max = 33554432</div><div>net.core.wmem_max = 33554432</div><div>net.core.rmem_default = 524288</div><div>net.core.rmem_default = 524288</div><div>net.ipv4.tcp_rmem = 4096 524288 33554432</div><div>net.ipv4.tcp_wmem = 4096 524288 33554432</div><div>net.ipv4.ip_forward = 0</div><div>net.ipv4.conf.default.rp_filter = 1</div><div>net.ipv4.conf.default.accept_source_route = 0</div><div>net.ipv4.tcp_max_tw_buckets = 2000000</div><div>net.ipv4.tcp_max_syn_backlog = 65536</div><div>net.ipv4.tcp_max_orphans = 262144</div><div>net.core.netdev_max_backlog = 300000</div><div>net.core.somaxconn = 65536</div><div>net.ipv4.tcp_synack_retries = 2</div><div>net.ipv4.tcp_syn_retries = 2</div><div>net.ipv4.tcp_slow_start_after_idle = 0</div><div><br></div><div>At least these are the settings I've used for benchmarking, may do less or more on your setup. The NIC vendor can be really important - Intel NICs are really good and work really well with Linux. Broadcom NICs tend to flake out around line rate and are also notorious for dropping packets in hardware and not telling the kernel, so I try not to use those.</div><div><br></div></font></span></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 9, 2017 at 3:31 AM, MrFastDie <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The OS of the server is debian 8, at my testing machine i'm using arch<br>
linux. Both NIC supports the speed of 1000Mb/s the server got round about<br>
600 Mb/s up and 13Mb/s down.<br>
<br>
CJ Ess Wrote:<br>
------------------------------<wbr>-------------------------<br>
<div><div class="h5">> Which OS? What NIC? You also have to consider the traffic source, is<br>
> it<br>
> known capable of of saturating the NIC on your server?<br>
><br>
> On Fri, Jan 6, 2017 at 10:24 AM, MrFastDie<br>
> <<a href="mailto:nginx-forum@forum.nginx.org">nginx-forum@forum.nginx.org</a>><br>
> wrote:<br>
><br>
> > Hello,<br>
> ><br>
> > the last days I played a little with the NGINX settings and the tcp<br>
> stack<br>
> > to<br>
> > test the best performance. I used direct connection between my<br>
> testing<br>
> > machine and my server using a cat5e cable.<br>
> > My nginx.conf can be found at pastebin: <a href="http://pastebin.com/rRAEwvNc" rel="noreferrer" target="_blank">http://pastebin.com/rRAEwvNc</a><br>
> > My sysctl.conf also provides lot of changes:<br>
> <a href="http://pastebin.com/KmPjEnHN" rel="noreferrer" target="_blank">http://pastebin.com/KmPjEnHN</a><br>
> > My /etc/security/limits.conf provides soft nofile at 1048576 and<br>
> hard<br>
> > nofile<br>
> > at the same value.<br>
> ><br>
> > I'm not using any kind of firewall, all logs are disabled, neither<br>
> the cpu<br>
> > nor the ram is at it's limit, the i/o load seems fine to me too, but<br>
> the<br>
> > internet speed caps round about 600 Mbit/s. This test was made with<br>
> 2000<br>
> > connections per time and a 1MB file.<br>
> ><br>
> > The server contains an Intel(R) Pentium(R) Dual  CPU  E2220  @<br>
> 2.40GHz and<br>
> > has 3.5G of Ram.<br>
> > My local computer contains an Intel(R) Core(TM) i7-4710HQ CPU @<br>
> 2.50GHz and<br>
> > has 16G of Ram.<br>
> ><br>
> > The limits and tcp changes were also made on my local computer.<br>
> ><br>
> > Is there someone who can help me to deal with this problem?<br>
> ><br>
> > Posted at Nginx Forum: <a href="https://forum.nginx.org/read" rel="noreferrer" target="_blank">https://forum.nginx.org/read</a>.<br>
> > php?2,271846,271846#msg-271846<br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > nginx mailing list<br>
> > <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > <a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
> ><br>
> ______________________________<wbr>_________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
<br>
</div></div>Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,271846,271869#msg-271869" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?2,271846,271869#msg-271869</a><br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>