I would add that engineering is the art of tradeoffs.
The language authors decided to route all network scheduling
through netpoll, and launch a new goroutine for every incoming http
request. These decisions carry a significant overhead. But they mean
that users of the language can effortlessly
So, I *did* invest a little more time, and ISTM that the data you're
getting are mostly a result of Go handling requests in parallel and perl
not doing that.
The statistics on top of the ab-output average over all requests by total
time taken. Whereas the data you dumped and plotted contains the ti
I just want to re-emphasize one specific thing: Neither I, nor anyone else,
actually owes you any of their time. I don't know you and I don't feel like
it is a good investment of my time to convince strangers on the internet.
So yes. You asked me to blog about things. I won't and I also won't spend
On Thu, Jun 13, 2019 at 4:47 PM Tong Sun wrote:
If you want or need to discuss personal feelings, please do it off-list.
Thank you.
--
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 i
Hi Damian & all.
I think I need to set the record straight, as most of the technical
discussions has been taken place elsewhere, so I feel that I was treated
unfairly because of that. If you only see one site of the story, then it is
very easy to do that, I get it and understand it however.
So fi
Yeah, no doubt, I totally agree with that as well.
But now, I can proudly say ...
My Go beats C :-)
On Thu, Jun 13, 2019 at 12:09 AM Justin Israel wrote:
>
>
>
> On Thu, Jun 13, 2019 at 4:05 PM Tong Sun wrote:
>>
>> Yep, thanks Justin, both your points really made the difference,
>> because I
On Thu, Jun 13, 2019 at 4:05 PM Tong Sun wrote:
> Yep, thanks Justin, both your points really made the difference,
> because I do believe that the buffered socket write is the key
> component for the 3-time improvement that I'm getting (from using
> FastHTTP), IMHO. And FastHTTP recommends GOMAXP
Yep, thanks Justin, both your points really made the difference,
because I do believe that the buffered socket write is the key
component for the 3-time improvement that I'm getting (from using
FastHTTP), IMHO. And FastHTTP recommends GOMAXPROCS=1 too, which I
used this time as well.
So thanks aga
On Mon, Jun 10, 2019 at 5:27 PM Tong Sun wrote:
> > IMO this is just not a meaningful test. Or its results are totally
> > unsurprising.
>
> Again, I was trying to improve Perl performs with Go. That
> "ridiculously simple" Perl code is the foundation of the Debian dbab
> package, and I was tryin
Thanks Amnon for the insight, which confirmed my guessing when
answering the following question against ab in my blog:
> I'm unclear how to interpret the results from ab. From the top chunk of the
> results (time taken for tests, requests per second, time per request, etc.),
> it would appear th
For those interested, you can find some web benchmarks
here https://www.techempower.com/benchmarks/
For the trivial http ping type server, you would expect latency to be
dominated by system time.
strace'ing your code will give you an idea what it is doing. Go allows you
to have multiple gorouti
Thanks a lot for all your help Marcin! Your expertise makes a total
difference here!
Double-thumbs up!
On Mon, Jun 10, 2019 at 7:46 PM Marcin Romaszewicz wrote:
>
> In my example in the previous email, I accidentally used a very old version
> of echo. If you use the latest ("github.com/labstac
On Mon, Jun 10, 2019 at 7:50 PM Axel Wagner
wrote:
>
>
>
> On Mon, Jun 10, 2019 at 11:28 PM Tong Sun wrote:
>>
>> There is a second test well before your this post, which is a direct
>> translation of Perl code, that is now reading and writing directly to
>> a socket. Hanging on to the first test
On Mon, Jun 10, 2019 at 11:28 PM Tong Sun wrote:
> There is a second test well before your this post, which is a direct
> translation of Perl code, that is now reading and writing directly to
> a socket. Hanging on to the first test method and not referring to the
> second test is not a very cons
In my example in the previous email, I accidentally used a very old version
of echo. If you use the latest ("github.com/labstack/echo/v4"), then it's a
lot faster than using simple string splitting, resulting in about 22,000
requests per second.
Concurrency Level: 100
Time taken for tests:
One more followup.
Here's an example using an HTTP router named Echo, which I use in
production. With proper HTTP parsing and validation, and no regular
expressions involved in routing, it still does about 14,000 requests per
second. I stubbed some of your stuff which doesn't affect the result. Th
I think the others were correct in pointing the finger at the RegEx engine
in Go. It is quite slow. I hacked your inside loop which checks the request
not to use regular expressions, and it's tons faster. You can't say that
something can't be responsible for too much slowdown because it "1 line",
s
Just to clarify some facts.
On Sun, Jun 9, 2019 at 11:09 AM 'Axel Wagner' wrote:
>
> As I've also mentioned: I don't think this test is meaningful.
>
> First, as it has been pointed out, your Perl program isn't actually a web
> server. It only understands ridiculously simple requests and as such
As I've also mentioned: I don't think this test is meaningful.
First, as it has been pointed out, your Perl program isn't actually a web
server. It only understands ridiculously simple requests and as such
violates the spec left and right. It's also super naive in how it treats
malformed input or
I'm wondering about a couple factors in this comparison that seem to make a
difference in my local test:
1. I think perl sockets are write buffered. So would the equivalent be
to wrap the net.Conn in bufio.NewWriter(c) and flush before the Close?
2. Since this is a straigh-line test whe
On Sat, Jun 8, 2019 at 3:01 PM Wojciech S. Czarnecki wrote:
>
> On Sat, 8 Jun 2019 09:56:05 -0400
> Tong Sun wrote:
>
> > Agree that it was not an apples to apples comparison. So please check
> > out my 2nd blog:
> >
> > https://dev.to/suntong/simple-web-server-in-perl-and-go-revisit-5d82
> >
>
>
On Sat, 8 Jun 2019 09:56:05 -0400
Tong Sun wrote:
> Agree that it was not an apples to apples comparison. So please check
> out my 2nd blog:
>
> https://dev.to/suntong/simple-web-server-in-perl-and-go-revisit-5d82
>
Trying to make sense of your measures...
...Still apples to oranges due to te
Couple of things that you might want to investigate:
1. Is SetReadDeadline the same as SO_RCVTIMEO (vm vs socket)?
2. Is c.Close() the same as shutdown (flushes vs doesn't)?
3. Is print is the same as fmt.Fprintf / c.Write (buffered vs unbuffered)?
With the go I'd be tempted to put everything fr
Agree that it was not an apples to apples comparison. So please check
out my 2nd blog:
https://dev.to/suntong/simple-web-server-in-perl-and-go-revisit-5d82
> thanks to Axel Wagner, who replaced the net/http.Server layer with direct
> translation of Perl code, the code is now reading and writing
Looking a the two code samples I wouldn't say this is an apples to apples
comparison... The Perl script seems to be a simple single-threaded loop
that understands a tiny subset of HTTP vs. a fully-fledged (and secure) web
server from the Go standard library. I would definitely not run that Perl
Yeah, you probably want to avoid fasthttp.
Chi https://github.com/go-chi/chi
and
Gin https://github.com/gin-gonic/gin
Are both better than the base httpserver and I've using them in large scale
adtech deployments without issue.
Also you can get BETTER performance out of the base http client (over
On Fri, Jun 7, 2019 at 9:01 AM Ronny Bangsund wrote:
>
> Yes, the built-in is pretty awful in many ways. There are fortunately lots of
> alternatives, all with roughly an order of magnitude better performance. I
> inspected this list yesterday to finally make a choice of packages to use:
> http
Yes, the built-in is pretty awful in many ways. There are fortunately lots
of alternatives, all with roughly an order of magnitude better performance.
I inspected this list yesterday to finally make a choice of packages to
use: https://github.com/smallnest/go-web-framework-benchmark
I ended up
28 matches
Mail list logo