Re: [dev] [quark] Performance issues

From: Laslo Hunhold <dev_AT_frign.de>
Date: Tue, 24 Sep 2019 10:58:29 +0200

On Mon, 23 Sep 2019 13:07:47 -0700
Anselm Garbe <garbeam_AT_gmail.com> wrote:

Dear Anselm, Dear Richard,

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

> https://git.suckless.org/quark/file/main.c.html#l376
>
> The decision for making it fork() based was on purpose, to keep its
> implementation as simple as possible. However, I do see potential to
> revise quark's current implementation and to consider dropping various
> features, but up to Laslo. ;)

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!

However, OpenBSD's httpd is not available for most Linux distributions,
and that's why quark also has some features to set up simple servers
with it that can even serve multiple hosts at once. Surely we can
discuss if we need virtual host support and whatnot, but most
"complexity" in quark is a deliberate focus on data structures to make
modifications very easy. An example is the cgi-patch[0] that is pretty
straightforward.

With best regards

Laslo

[0]:https://tools.suckless.org/quark/patches/basecgi/quark-basecgi-20190317-4677877.diff
Received on Tue Sep 24 2019 - 10:58:29 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 24 2019 - 11:12:08 CEST