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=0.0 required=3.0 tests=none shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: chris mckenzie Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: Page request roundtrip time increases substantially after a bit of use Date: Mon, 24 Jan 2011 17:14:04 -0800 (PST) Message-ID: <443004.19531.qm@web63301.mail.re1.yahoo.com> References: <571697.98064.qm@web63303.mail.re1.yahoo.com> <20110124215440.GA25489@dcvr.yhbt.net> <20110125001107.GA1921@dcvr.yhbt.net> 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 1295918158 30196 80.91.229.12 (25 Jan 2011 01:15:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 25 Jan 2011 01:15:58 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Tue Jan 25 02:15:54 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1295918044; bh=vXk7PdpFBS+NwqNi0UYqLywViV/Gq/S9nkfdyNe31Zw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=nUh8LLS+LpMT/5G4l29OYCQSvOGcMz33lXnf6ODTDofTUvuDCNAqC6ceKA0VmIZPWWOH41dQYf2M4fXBQCBv8BiuyK8cKSbtmdukVwx4GqU8myU/swCv+iNexoYWPHaGzVmmyvflZiM+dY/I2xnNgv/rwI3tGBLszjAFb7ldxCk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Q6b3qN6MFMNQenx+IYuE4RkBY5EFpG5DczIPN2yRAxFibOQoIqIe5GMepRGGTzZvkFW1tUpdYnRh1tysDnclcY/pmgTpFZ/zC4QaqdG1PBppFhyjIZyeTyT5+FPtek57J+38JCn6/fGYbfPqKgHeOeYz4jkqgAu/0Or7hKqRMY4=; X-YMail-OSG: DYdWrogVM1mG5SfwE4LcCNXPf2iQgbUx59S2lJfK2djOY1s 38SI1ZfVCkLDpfjLmWUT7HVZ2dAQaS0ITrg2o_bpjpUGUpBqS8U_50K80cJg 151ig.Wls29EhhAjvAL7fV0ZnTi71_.5f4QHpGhqTF8OdngVf.42gk7aQD0y 8046nKke9OFPiNnjT3y9ejYHKknOMVdMywnHoGshhQxLfal_0_amOK9Z9lLV vXf9xZwlAR4WHPiYolhdEyjps7kMjO7OcSz.qufapL0cXz9mE1gSJ7KTxIAJ l6qdevHnpV2DB7xOVBupun6e29Q-- X-Mailer: YahooMailRC/555 YahooMailWebService/0.8.107.285259 In-Reply-To: <20110125001107.GA1921-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> 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:199 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PhXVi-0006BD-BQ for gclrrg-rainbows-talk@m.gmane.org; Tue, 25 Jan 2011 02:15:54 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 51AC619783C8; Mon, 24 Jan 2011 20:15:53 -0500 (EST) Received: from web63301.mail.re1.yahoo.com (web63301.mail.re1.yahoo.com [69.147.97.26]) by rubyforge.org (Postfix) with SMTP id AEEE9185838E for ; Mon, 24 Jan 2011 20:14:04 -0500 (EST) Received: (qmail 26459 invoked by uid 60001); 25 Jan 2011 01:14:04 -0000 Received: from [173.243.145.79] by web63301.mail.re1.yahoo.com via HTTP; Mon, 24 Jan 2011 17:14:04 PST Hi Eric, I'll prepare a more formal response in a bit, but here is my test run: My rackup file for this is: use Rack::ShowExceptions use Rack::ShowStatus map "/static/" do run Rack::File.new(File.dirname(__FILE__)) end My config file is: pid "/tmp/my-pid.pid" timeout 300 listen "*:7788", :backlog => 2048 stderr_path "/tmp/my-log.stderr.log" stdout_path "/tmp/my-log.stdout.log" worker_processes 10 Rainbows! do use :ThreadSpawn worker_connections 400 end I have a static file, test.txt with the contents "Hello world" After doing rainbows -c config.rb rackup.ru I then executed the shell script below: #!/bin/tcsh rm testrun loop: echo -n `/bin/date +%s.%N`," " >> testrun curl -s -w "%{time_connect}, %{time_pretransfer}, %{time_starttransfer}, %{time_total}\n" $1 -o /dev/null >> testrun goto loop On the localhost, for some time. The memory footprint remained flat. The CPU usage did not spike noticeably netstat -an did reveal some CLOSE_WAIT values on the ports but nothing that hadn't previously been pointed out. The (CSV) output of the test can be seen here: http://qaa.ath.cx/single-request.csv.gz For those of you without any visualization software, I made a rudimentary graph from the data here: http://qaa.ath.cx/single-request.png You can clearly see how the delay increases and then doesn't ever go back down to previous levels. No web browser was running while this test was done and a grep -v on the stderr revealed that no other request other then for the localhost was satisfied. I'll research answers to your previous questions now. Thanks for looking into this! ~chris. ----- Original Message ---- From: Eric Wong To: Rainbows! list Sent: Mon, January 24, 2011 4:11:07 PM Subject: Re: Page request roundtrip time increases substantially after a bit of use Eric Wong wrote: > chris mckenzie wrote: > > On the machine running rainbows if I do a netstat, I get this: > > > > tcp 1 0 10.10.192.12:7788 10.10.131.165:17443 >CLOSE_WAIT > > tcp 1 0 10.10.192.12:7788 10.10.131.165:17352 >CLOSE_WAIT > > tcp 1 196 10.10.192.12:7788 10.10.131.165:17317 >CLOSE_WAIT > > tcp 1 196 10.10.192.12:7788 10.10.131.165:17310 >CLOSE_WAIT > > ^ Strange that Send-Q is 1 across all those connections.. > > Did you see the machine/connection that ran curl in there? How does > hitting Rainbows! from localhost work? One more thing, do you use Thread#{kill,exit,terminate}! or anything that would prevent an ensure statement from firing and calling IO#close on the client socket? -- 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 _______________________________________________ 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