From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=1.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: algoritim schedule from linux nptl Date: Thu, 9 Jun 2011 06:52:11 +0000 Message-ID: <20110609065211.GA3853@dcvr.yhbt.net> References: <4DF03E63.2030707@objectdata.com.br> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1307604220 21828 80.91.229.12 (9 Jun 2011 07:23:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2011 07:23:40 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Thu Jun 09 09:23:36 2011 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Content-Disposition: inline In-Reply-To: <4DF03E63.2030707-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:261 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QUZaW-0003KG-Mz for gclrrg-rainbows-talk@m.gmane.org; Thu, 09 Jun 2011 09:23:32 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 306C83C807E; Thu, 9 Jun 2011 03:23:28 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 1BD8918583CB for ; Thu, 9 Jun 2011 02:52:12 -0400 (EDT) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 02C9020E40; Thu, 9 Jun 2011 06:52:11 +0000 (UTC) Alexandre Riveira 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