Hi!

One thing you should check is the amount of TCP sessions you are starting
from one host. Since a TCP session is identified by the IP/Port in both
ends, and you communicate where some of those numbers stay the same, you
are probably limited to no more than 64000 ports at most (or such).

If you run 28k reqs/s and you have a high time-wait timeout, you will run
out of ports quickly.

A simple test is to have two "client" hosts and then checking if you can
run about the double amount through before getting into trouble.

The other thing you should worry about is that if you are truly building
new TCP sessions every time you have a request, you pay the session setup
time on every request. You could maybe look into batch-framing some of them
which will improve the TCP window and likely increase throughput.

On Sat, Jun 10, 2017 at 11:51 AM 刘桂祥 <liuguixiang...@gmail.com> wrote:

>      I just want to bench the simple server accept new connection
>      now I create a new simple tcp server and use tcp short connection to
> bench it
>      the result is also that  client have many dial i/o timeout
>      does it is client's question ??
>
> 在 2017年6月9日星期五 UTC+8下午9:28:55,Shawn Milochik写道:
>
>> I think the setting is more likely to need an increase on the client than
>> the server.
>>
>> Are you using HTTP/1 or HTTP/2? If HTTP/1, set the MaxIdleConnsPerHost
>> value on your client's Transport.
>>
>> More info:
>>
>> https://golang.org/pkg/net/http/#Transport
>> https://paperairoplane.net/?p=556
>>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to