Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: chris mckenzie <kristopolous-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: Page request roundtrip time increases substantially after a bit of use
Date: Mon, 24 Jan 2011 17:14:04 -0800 (PST)	[thread overview]
Message-ID: <443004.19531.qm@web63301.mail.re1.yahoo.com> (raw)
In-Reply-To: <20110125001107.GA1921-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>

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 <normalperson-rMlxZR9MS24@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Sent: Mon, January 24, 2011 4:11:07 PM
Subject: Re: Page request roundtrip time increases substantially after a bit of 
use

Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org> wrote:
> chris mckenzie <kristopolous-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> 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


  parent reply	other threads:[~2011-01-25  1:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 21:03 Page request roundtrip time increases substantially after a bit of use chris mckenzie
     [not found] ` <571697.98064.qm-oNR6tK37MtiB9c0Qi4KiSlZ8N9CAUha/QQ4Iyu8u01E@public.gmane.org>
2011-01-24 21:54   ` Eric Wong
     [not found]     ` <20110124215440.GA25489-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2011-01-25  0:11       ` Eric Wong
     [not found]         ` <20110125001107.GA1921-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2011-01-25  1:14           ` chris mckenzie [this message]
     [not found]             ` <443004.19531.qm-9Fhxc66Fx5iB9c0Qi4KiSlZ8N9CAUha/QQ4Iyu8u01E@public.gmane.org>
2011-01-25  2:02               ` Eric Wong
2011-01-25  2:55           ` chris mckenzie
     [not found]             ` <288407.18061.qm-oNR6tK37MtiB9c0Qi4KiSlZ8N9CAUha/QQ4Iyu8u01E@public.gmane.org>
2011-01-25  3:50               ` Eric Wong
     [not found]                 ` <20110125035048.GA8124-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2011-01-25 21:38                   ` Eric Wong
     [not found]                     ` <20110125213835.GA9421-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2011-02-03  2:54                       ` Eric Wong
     [not found]                         ` <20110203025415.GA3812-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2011-02-03  4:44                           ` chris mckenzie

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=443004.19531.qm@web63301.mail.re1.yahoo.com \
    --to=kristopolous-/e1597as9lqavxtiumwx3w@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).