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: AS33070 50.56.128.0/17 X-Spam-Status: No, score=2.2 required=3.0 tests=AWL,DATE_IN_PAST_03_06, MISSING_HEADERS,MSGID_FROM_MTA_HEADER,NORMAL_HTTP_TO_IP,RDNS_NONE,WEIRD_PORT shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Alexandre Riveira Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: c10k paradigm Date: Tue, 16 Apr 2013 10:59:55 +0000 Message-ID: <516D2F2B.2080600@objectdata.com.br> References: <516BE872.5060006@objectdata.com.br> <20130415183011.GA27317@dcvr.yhbt.net> <516C2A48.3070808@objectdata.com.br> <20130415193403.GA742@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366123085 30823 80.91.229.3 (16 Apr 2013 14:38:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Apr 2013 14:38:05 +0000 (UTC) Cc: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Tue Apr 16 16:38:09 2013 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 X-Greylist: delayed 1498 seconds by postgrey-1.31 at rubyforge; Tue, 16 Apr 2013 14:30:48 UTC X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=G+n1GJjvq5HVVyC44TxTfQ0hx+LexWi6BUJr9EW3K0s=; b=QJamvP6SIag06286eQeQK9wEb7FRYQUbUMRSPtoKnnW//mIkb/O/cKfJ6VvTNpEccP 3QmlN1Lb7qPQohPXf+nJUo0NnboRA9+IX906wrDgPvw96rP5LCnTXiv62KwbAYZ7MRxy spushe26pJ4gjJP5ATOOpStJ+Qd4+rBoSGwV2Z+KEjL6r9HRNFPxp4PcMo8foALTxCw0 BlNBjoqWkLcCpIwFPmuKGaGR8a2hDj/yiwx6QBACKBxGd7wg9FaeRYVlXY9DI22omf1P KBV+45hdcg/25jAySfT0ZNV9ivGdisem3JIJ2QUtDOvKV3In2D9W65YjIdlijhXdTWP+ IX/w== X-Received: by 10.229.145.2 with SMTP id b2mr714906qcv.73.1366120800259; Tue, 16 Apr 2013 07:00:00 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: <20130415193403.GA742-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Gm-Message-State: ALoCoQmRivz8jAuvQuIJUplNYiNkl7NjJaMRLy5KeLUwgDKG2Tt4xRA0RysG1skYMczCSyHmyVJV 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 X-Broken-Reverse-DNS: no host name found for IP address 50.56.192.79 Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:471 Archived-At: Received: from [50.56.192.79] (helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1US71N-0008TU-3P for gclrrg-rainbows-talk@m.gmane.org; Tue, 16 Apr 2013 16:38:09 +0200 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 5644C2E122; Tue, 16 Apr 2013 14:38:09 +0000 (UTC) Received: from mail-qe0-f43.google.com (mail-qe0-f43.google.com [209.85.128.43]) by rubyforge.org (Postfix) with ESMTP id BAE5B2E0EE for ; Tue, 16 Apr 2013 14:30:48 +0000 (UTC) Received: by mail-qe0-f43.google.com with SMTP id f6so278011qej.16 for ; Tue, 16 Apr 2013 07:30:47 -0700 (PDT) Received: from [192.168.0.74] ([189.78.153.40]) by mx.google.com with ESMTPS id r3sm2518445qef.5.2013.04.16.06.59.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Apr 2013 06:59:59 -0700 (PDT) Em 15-04-2013 19:34, Eric Wong escreveu: Hi Eric, * EventMachine (less memory and cpu usage) I did a test using a core with ab-n 3000-c 1000 http://127.0.0.1:3000/manager and rainbows with 3 workers, EventMachine then 25% cpu free while XEpollThreadPool left only 5% free. *EventMachine.threadpool_size = 50 I found this code and run perfectly. But he has a kind of lock slowness as if using XEpollThreadPool but memory consumption was lower. Wonder you can put some of the rails Controllers work by EventMachine without using threads while others controlles using threads. Explain the need. The application that runs on rainbows + rails is an Enterprise Resource Planning ERP to support e-commerce. That same ERP and e-commerce rotate in the same rainbows. But the conclusion that ERP is best run with XEpollThreadPool (or EventMachine + pool threads),while the site was high competition C10K is best run with EventMachine.A detail about e-commerce is that as much as possible the pages are cached. Could it be that the controllers of the rails would run without party pool threads only with EventMachine (C10K) while others would use the controller with EventMachine thread pool (erp)? I appreciate the help! Alexandre Riveira Em 15-04-2013 19:34, Eric Wong escreveu: > Alexandre Riveira wrote: >> Em 15-04-2013 18:30, Eric Wong escreveu: >>> Alexandre Riveira wrote: >>>> What is A better paradigm for C10K paradigm >>>> >>>> >>>> From what I'm seeing are the best: >>>> >>>> EventMachine (less memory and cpu usage) >>> Not all DB adapters are fully non-blocking. If you want to do uncached >>> filesystem I/O, you'll either have to use threads or block, too. >> would be possible to combine being EventMachine and Threads, >> If the thread is blocked it would to anotherexample: >> >> use :EventMachine, :pool_size => 50 > (top-posting corrected, Cc: to list re-added) > > Yes, you would use EventMachine.threadpool_size = 50, though, with > Rainbows::EventMachine::TryDefer > > http://rainbows.rubyforge.org/Rainbows/EventMachine/TryDefer.html > > I forgot about this, not sure if it's used much, but "app.deferred?" is > an ad-hoc extension which Thin also supports > _______________________________________________ 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