Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: algoritim schedule from linux nptl
Date: Thu, 9 Jun 2011 06:52:11 +0000	[thread overview]
Message-ID: <20110609065211.GA3853@dcvr.yhbt.net> (raw)
In-Reply-To: <4DF03E63.2030707-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>

Alexandre Riveira <alexandre-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org> wrote:
> As a matter of contract a customer of ours can have only one worker
> / multi threaded server.

That sucks.  Rainbows! works best with multiple worker processes
for CPU/memory-bound concurrency (as long as you have enough
memory/cores).

> In such cases, when a large report is generated using 100% of
> processing other requests are waiting in cases of multiple
> simultaneous requests however small the simultaneity is normal
> 
> Got a decrease in time using a kernel with ck patch (https: / /
> wiki.archlinux.org/index.php/Kernel26-ck) in the order of 12 seconds
> down to 3 seconds but this is not ideal.

How fast is the large report generation if there's only one simultaneous
request?  That's the fastest it'll ever be unless you optimize
the report generation code itself (and not the scheduling/concurrency).

> Does anyone know how the schedule works in linux and that you can
> adjust the schedule of linux?

Matz Ruby 1.9 is entirely at the mercy of Linux scheduler (a good
thing IMHO).

Unless your report generator is written to release the GVL (in C), you
won't get any CPU-bound concurrency with Ruby 1.9 threads.  Fortunately
the API for releasing the GVL is pretty good (even if most of the
documentation means reading thread.c comments in the Ruby source.

-- 
Eric Wong
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


  parent reply	other threads:[~2011-06-09  7:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09  3:30 algoritim schedule from linux nptl Alexandre Riveira
     [not found] ` <4DF03E63.2030707-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org>
2011-06-09  6:52   ` Eric Wong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-06-09 14:42 Alexandre Riveira

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/rainbows/

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

  git send-email \
    --in-reply-to=20110609065211.GA3853@dcvr.yhbt.net \
    --to=normalperson-rmlxzr9ms24@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.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/rainbows.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).