Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Poor performance when behind proxy and low concurrency level
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Radosław Bułat  
View profile  
 More options Jun 14 2008, 4:05 pm
From: Radosław Bułat <radek.bu...@gmail.com>
Date: Sat, 14 Jun 2008 13:05:09 -0700 (PDT)
Local: Sat, Jun 14 2008 4:05 pm
Subject: Poor performance when behind proxy and low concurrency level
Hi!

Today I tested ebb with simple merb application behind nginx and
apache servers in front.
It looks like ebb has poor performance when there is low concurrency
level.

My scenario:

I created merb application and created simple rack handler.
config/rack.rb

class HelloWorldHandler
  def initialize(app)
    @app = app
  end

  def call(env)
    if env['REQUEST_URI'] == '/handler_hello'
      return [
        200,
        {"Content-type", "text/html"},
        "Hello World"
      ]
    else
      return @app.call(env)
    end
  end
end

use HelloWorldHandler
run Merb::Rack::Application.new

(so when I get http://domain/handler_hello it returns "Hello World"
document.

First test:

$ merb -p 3000 -e production -a ebb -c 1
Starting merb server on port: 3000

$ ab -c 1 -n 10000 http://rackapp.local:3000/handler_hello
Requests per second:    4378.92 [#/sec] (mean)

So far it's very good.

I configured nginx to pass request to 3 ebb processes (nginx runs on
81 port).

$ merb -p 3000 -e production -a ebb -c 3
Starting merb server on port: 3000
Starting merb server on port: 3001
Starting merb server on port: 3002

$ ab -c 1 -n 10000 http://rackapp.local:81/handler_hello
Requests per second:    387.53 [#/sec] (mean)

$ ab -c 2 -n 10000 http://rackapp.local:81/handler_hello
Requests per second:    627.93 [#/sec] (mean)

As you see there is only 387req/s. But when I increase concurrency to
3 and later to 20:

$ ab -c 3 -n 10000 http://rackapp.local:81/handler_hello
Requests per second:    2251.51 [#/sec] (mean)

$ ab -c 20 -n 10000 http://rackapp.local:81/handler_hello
Requests per second:    2967.70 [#/sec] (mean)

There is some connection between number of processes and concurrency
level.

I tested ebb also with apache and there is similar relation with low
concurrency level and requests per seconds (but performance is much
worse):

Apache runs on 80 port:
$ ab -c 1 -n 100 http://rackapp.local/handler_hello
Requests per second:    36.45 [#/sec] (mean)

$ ab -c 2 -n 100 http://rackapp.local/handler_hello
Requests per second:    56.95 [#/sec] (mean)

$ ab -c 3 -n 200 http://rackapp.local/handler_hello
Requests per second:    73.14 [#/sec] (mean)

$ ab -c 20 -n 2000 http://rackapp.local/handler_hello
Requests per second:    556.18 [#/sec] (mean)

$ ab -c 100 -n 2000 http://rackapp.local/handler_hello
Requests per second:    791.16 [#/sec] (mean)

$ ab -c 200 -n 10000 http://rackapp.local/handler_hello
Requests per second:    2881.07 [#/sec] (mean)

I tested nginx and apache with the same application but as application
server thin and mongrel. Results for low concurrency level was much
much better than for ebb.

# thin
$ merb -p 3000 -e production -a thin -c 3
Starting merb server on port: 3000
Starting merb server on port: 3001
Starting merb server on port: 3002

# apache
$ ab -c 1 -n 10000 http://rackapp.local/handler_hello
Requests per second:    1459.45 [#/sec] (mean)

# nginx
$ ab -c 1 -n 10000 http://rackapp.local:81/handler_hello
Requests per second:    1978.73 [#/sec] (mean)

# mongrel
$ merb -p 3000 -e production -a mongrel -c 3
Starting merb server on port: 3000
Starting merb server on port: 3001
Starting merb server on port: 3002

# apache
$ ab -c 1 -n 10000 http://rackapp.local/handler_hello
Requests per second:    987.58 [#/sec] (mean)

# nginx
$ ab -c 1 -n 10000 http://rackapp.local:81/handler_hello
Requests per second:    1184.62 [#/sec] (mean)

Any comments?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Radosław Bułat  
View profile  
 More options Jun 14 2008, 6:28 pm
From: "Radosław Bułat" <radek.bu...@gmail.com>
Date: Sun, 15 Jun 2008 00:28:06 +0200
Local: Sat, Jun 14 2008 6:28 pm
Subject: Re: Poor performance when behind proxy and low concurrency level
I think it could be related to how ebb handle connections or something
like that. When I test it with apache benchmark tool (ab) directly to
ebb application (without proxy) I have results like this:

Requests per second:    4253.11 [#/sec] (mean)

But when I use httperf results are much worse:

Request rate: 542.9 req/s (1.8 ms/req)

When I use thin or mongrel results are very similar regardless I use
httperf or ab.

--
Radosław Bułat

http://radarek.jogger.pl - mój blog


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Radosław Bułat  
View profile   Translate to Translated (View Original)
 More options Jun 16 2008, 4:16 am
From: "Radosław Bułat" <radek.bu...@gmail.com>
Date: Mon, 16 Jun 2008 10:16:29 +0200
Local: Mon, Jun 16 2008 4:16 am
Subject: Re: Poor performance when behind proxy and low concurrency level
Maybe someone can reproduce it? Nobody interested why it's so slow?

--
Radosław Bułat

http://radarek.jogger.pl - mój blog


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ry dahl  
View profile  
 More options Jun 16 2008, 4:38 am
From: "ry dahl" <ry.d...@googlemail.com>
Date: Mon, 16 Jun 2008 10:38:59 +0200
Local: Mon, Jun 16 2008 4:38 am
Subject: Re: Poor performance when behind proxy and low concurrency level

> Maybe someone can reproduce it? Nobody interested why it's so slow?

I am :) I think you're correct. I suspect that Ebb is not properly
closing the connections. ab is notorious for not measuring completed
requests.
ry

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »