I truely try with two client server to bench it; and the result is the same, so I doubt the performance bottleneck <https://groups.google.com/forum/#!topic/golang-nuts/aHj0T4mx6Uc> is in the server side but I don't konw the concrete <http://www.baidu.com/link?url=-DlmohrXhQQnIfxnBK-Tt3rYAF5agKj8uD4t6EqlOf8pAAFMZxXO_ufb0GT4arfhGV7Sxry5aWm9C4XAupL3dobAL-LE-ISgDILB94JLQATdeO_F-S7xy7Y8Tf0r_VMh> 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 刘桂祥 <liuguix...@gmail.com <javascript:>> > 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 <javascript:>. >> 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.