From: Eric Wong <e@80x24.org>
To: cmogstored-public@bogomips.org
Subject: [PATCH] doc/design.txt: add a few more notes on compromises
Date: Thu, 15 Jan 2015 07:49:51 +0000 [thread overview]
Message-ID: <20150115074951.GA16191@dcvr.yhbt.net> (raw)
In case I forget, writing this down while my mind is on
the subject for other projects.
---
doc/design.txt | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/doc/design.txt b/doc/design.txt
index f873834..495e1bf 100644
--- a/doc/design.txt
+++ b/doc/design.txt
@@ -1,4 +1,3 @@
-
object relationships
--------------------
@@ -26,3 +25,35 @@ mog_cfg[0] -- mog_svc[0] --- mog_mgmt[N]
|
mog_cfg[1] -- mog_svc[1] --- mog_mgmt[M]
\-- mog_http[M]
+
+
+memory management
+-----------------
+
+cmogstored avoids dynamic memory allocation in common cases.
+Each file descriptor is mapped to a 128-byte (on 64-bit systems)
+slot of memory which maps all the critical data needed for most
+connections. See fdmap.c for details.
+
+Userspace socket read buffers are per-thread in the common case (rather
+than per-client), as most request buffers do not need to live longer
+than a single event loop step (iteration).
+
+performance compromises
+-----------------------
+
+We still use snprintf to generate HTTP response headers, and we use
+Ragel-generated code for the HTTP parser. These choices were made for
+maintainability and readability rather than performance.
+
+Even with these performance compromises, cmogstored performance is
+expected to be competitive in the best-case (hot cache[1]) scenarios
+with other HTTP servers.
+
+Where cmogstored (and the original Perl mogstored) shines is in avoiding
+pathological head-of-line blocking when serving files from multiple
+mountpounts. See queues.txt for more on the unique queue design for
+to take advantage of multiple cores and disks.
+
+[1] cmogstored does not do any caching on its own, it relies on the
+ operating system kernel.
--
EW
reply other threads:[~2015-01-15 7:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/cmogstored/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150115074951.GA16191@dcvr.yhbt.net \
--to=e@80x24.org \
--cc=cmogstored-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/cmogstored.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).