On Tue, Sep 24, 2019 at 07:58:01PM +0200, maillists.rul...@mailbox.org wrote:
> Hi Laslo and Anselm,
> 
> Laslo Hunhold <d...@frign.de> wrote:
> > On Mon, 23 Sep 2019 13:07:47 -0700
> > Anselm Garbe <garb...@gmail.com> wrote:
> > > Thanks for doing that and letting me know. So the reason you see this
> > > performance penalty in contrast to the other web servers you mention
> > > is, that quark is a fork() based web server (and current HEAD is still
> > > fork() based). That's the whole reason ;)
> > 
> > I also guessed that this might be the reason before the results came.
> > Now it is pretty certain, especially when we also note that fork() has
> > a higher penalty on OpenBSD compared to Linux.
> 
> Thanks for your assessments! I think you've hit the nail on the head. I
> got my initial test results on an OpenBSD machine. I tested the golang
> server and quark again on a Linux machine today and the difference is
> much less pronounced:
> 
> quark  (Linux): 14494 requests/second
> golang (Linux): 16601 requests/second
> 
> As you'd expect the difference also declines when the requested file is
> larger. With an index.html, that is 1MiB in size I got these results:
> 
> quark  (OpenBSD; 1MiB index.html): 160 requests/second
> golang (OpenBSD; 1MiB index.html): 198 requests/second
> 
> > Quark is actually very lean and offers 99% of the features you would
> > expect for a static server. I personally am a big fan of OpenBSD's
> > httpd and will use it on the server I am currently setting up.
> > 
> > I see quark's role more like a "drop-in" server you can invoke
> > literally in seconds from the command line to share some data on the
> > network. In this form, it is not so trivial with other servers. For
> > "settled" servers with a fixed configuration, OpenBSD httpd works
> > flawlessly in my opinion!
> 
> Thanks for the insight! I was thinking about using quark instead of
> OpenBSD's httpd, because it simpler to use and probably even more
> secure. I think ~1000 requests/second is still plenty for all my
> projects, but in case I need the extra performance some day, I know what
> the bottleneck is.
> 

To setup OpenBSD httpd it is 3 lines of text for a static-serving httpd:

        server "default" {
                listen on egress port 80
        }

It can be used with a nicely priviledge-separated model with the slowcgi
program too:

        server "default" {
                listen on egress port 80

                location "/" {
                        root "/cgi-bin/program"
                        fastcgi
                }
        }

Regarding "performance": have you tried to look at login.conf resource-limits
or tuning the system in other ways for your actual needs?

-- 
Kind regards,
Hiltjo

Reply via email to