Re: [go-nuts] golang thrift server 28k/s request client many dial tcp timeout ,why??

2017-06-11 Thread 刘桂祥
I truely try with two client server to bench it; and the result  is the 
same, so I doubt the performance bottleneck 
 is in the 
server side 
but I don't konw the concrete  

question 


在 2017年6月11日星期日 UTC+8下午8:10:49,Jesper Louis Andersen写道:
>
> 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 刘桂祥  
> 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...@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.


Re: [go-nuts] golang thrift server 28k/s request client many dial tcp timeout ,why??

2017-06-11 Thread Jesper Louis Andersen
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 刘桂祥  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.


Re: [go-nuts] golang thrift server 28k/s request client many dial tcp timeout ,why??

2017-06-10 Thread 刘桂祥
 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.


Re: [go-nuts] golang thrift server 28k/s request client many dial tcp timeout ,why??

2017-06-08 Thread 刘桂祥
client: dial tcp 100.70.186.38:9783: i/o timeout
when I modify the server 
/proc/sys/net/core/netdev_max_backlog16384
/proc/sys/net/core/somaxconn  16384

the client dial timeout decrease some percent

在 2017年6月9日星期五 UTC+8上午12:10:15,Shawn Milochik写道:
>
> What error are you getting along with the timeout? I suspect that it has 
> something to do with the limit of filehandles on the client. 
>
> Have a look at this:
>
> https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
>
>

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


Re: [go-nuts] golang thrift server 28k/s request client many dial tcp timeout ,why??

2017-06-08 Thread Shawn Milochik
What error are you getting along with the timeout? I suspect that it has
something to do with the limit of filehandles on the client.

Have a look at this:
https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

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