I would also try to test the load on a different host too. On Monday, January 14, 2019 at 6:38:27 PM UTC+5:30, Jesper Louis Andersen wrote: > > This might not be due to Go, but rather due to a resource limit imposed by > the operating system: > > # 5000. *. (1. -. 0.1954);; > - : float = 4023. > > This is close to 4096, assuming a constant factor of other stuff needing > resources. Also, as a first step, I'd recommend running your load generator > on a host separate from the system under test. There are situations in > which your load generator takes enough resources to mess with the SUT. > > On Mon, Jan 14, 2019 at 12:48 PM Kasun Vithanage <alan...@gmail.com > <javascript:>> wrote: > >> I'm doing a simple load test with Apache JMeter. My ambition was to >> benchmark a go server. Here is the code I've been using, its a simple web >> server >> >> package main >> >> >> import ( >> "fmt" >> "log" >> "net/http" >> "runtime" >> ) >> >> >> func handler(w http.ResponseWriter, r *http.Request) { >> fmt.Fprintf(w, "welcome") >> } >> >> >> func main() { >> runtime.GOMAXPROCS(runtime.NumCPU()) >> http.HandleFunc("/function", handler) >> log.Fatal(http.ListenAndServe(":8080", nil)) >> } >> >> When i test the JMeter with 5000 users with Ramp Up Period 1s, Loop Count >> 1 as stated below >> >> [image: Screenshot_27.png] >> >> The result is as follows, it has *around 20% error rate* for the HTTP >> requests. >> >> [image: Screenshot_28.png] >> >> When i examine the reason for an error JMeter states that the *Connection >> was refused* by host. >> >> I would like to know how to increase concurrency in here, at least not >> dropping the connections in that rate. If the server handler code was bit >> complex than this, the error rate is increasing to at least 80%. >> >> I tried the same kind of scenario with Java NIO(*com.sun.net.httpserver*). >> It resulted better as it had a lower error rate. But it caused a high >> latency when the work is done(Tested with same load). >> >> -- >> 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. >> > > > -- > J. >
-- 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.