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=1.6 required=3.0 tests=AWL,HK_RANDOM_FROM, 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: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: c10k paradigm Date: Tue, 16 Apr 2013 17:24:17 +0000 Message-ID: <20130416172417.GA12658@dcvr.yhbt.net> References: <516BE872.5060006@objectdata.com.br> <20130415183011.GA27317@dcvr.yhbt.net> <516C2A48.3070808@objectdata.com.br> <20130415193403.GA742@dcvr.yhbt.net> <516D338C.9060408@objectdata.com.br> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366134261 1729 80.91.229.3 (16 Apr 2013 17:44:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Apr 2013 17:44:21 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Tue Apr 16 19:44:25 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 Content-Disposition: inline In-Reply-To: <516D338C.9060408-VwDbj2YsoUp0ZRtCdD4y8VAUjnlXr6A1@public.gmane.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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:472 Archived-At: Received: from [50.56.192.79] (helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1US9vc-00048k-VB for gclrrg-rainbows-talk@m.gmane.org; Tue, 16 Apr 2013 19:44:25 +0200 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 3E39F2E124; Tue, 16 Apr 2013 17:44:24 +0000 (UTC) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id E3FA42E0BC for ; Tue, 16 Apr 2013 17:24:21 +0000 (UTC) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 920981F43F; Tue, 16 Apr 2013 17:24:19 +0000 (UTC) Alexandre Riveira wrote: > Em 15-04-2013 19:34, Eric Wong escreveu: > >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 > > * 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. With Matz Ruby, XEpollThreadPool is only a win if much of your code/extensions releases the GVL (or if you don't feel like porting your code to take advantage of EM). > *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. "lock slowness" - which version of Ruby is this? Did you modify your app to use app.deferred? + TryDefer as I pointed you to in the other message? > 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)? That should allow some rails controllers to use threads (app.deferred? => true) while others do not use threads (app.deferred? => false). Keep in mind this is not a very common configuration, so not many people have experience with it in production. _______________________________________________ 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