yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: yahns-public@yhbt.net
Subject: Re: [RFC/WIP] support non-blocking listeners, too
Date: Mon, 13 May 2019 01:51:33 +0000	[thread overview]
Message-ID: <20190513015133.jtknn3gdp6gydl7g@dcvr> (raw)
In-Reply-To: <20190511121045.maebjf2wc4h4ljrs@dcvr>

Eric Wong <e@80x24.org> wrote:
> While a major design factor of this server was based
> load-balancing with blocking accept() in a dedicated thread,
> non-blocking accept() has become fairer with EPOLLEXCLUSIVE in
> Linux 4.5+.

Actually... not sure if it matters, even.  EPOLLEXCLUSIVE still
seems worse off than a blocking accept4() thread.  The process
which gets woken from epoll_wait can still be stuck dealing with
application processing or other I/O (the kernel has no way of
knowing that).

Blocking on accept4() is fairer in that regard since it
round-robins the processes.

On a related note, having a multi_accept parameter (like nginx)
should be beneficial to single-process deployments.

      reply	other threads:[~2019-05-13  1:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-11 12:10 [RFC/WIP] support non-blocking listeners, too Eric Wong
2019-05-13  1:51 ` Eric Wong [this message]

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: http://yhbt.net/yahns/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190513015133.jtknn3gdp6gydl7g@dcvr \
    --to=e@80x24.org \
    --cc=yahns-public@yhbt.net \
    /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

	http://yhbt.net/yahns.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).