[ANN] Mongrel Web Server 0.3.12 -- Pre-Release

Right on Zed. I tried again, then ran ab:

$ ab -n 1000 -c 25 .xyz Domain Names | Join Generation XYZ

Server Software: Mongrel
Server Hostname: www.xyz.com
Server Port: 80

Document Path: /categories/index
Document Length: 9945 bytes

Concurrency Level: 25
Time taken for tests: 21.707388 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 10198000 bytes
HTML transferred: 9945000 bytes
Requests per second: 46.07 [#/sec] (mean)
Time per request: 542.685 [ms] (mean)
Time per request: 21.707 [ms] (mean, across all concurrent
requests)
Transfer rate: 458.74 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 1
Processing: 94 531 697.5 439 7133
Waiting: 94 531 697.4 439 7132
Total: 95 531 697.5 439 7133

Percentage of the requests served within a certain time (ms)
50% 439
66% 486
75% 520
80% 553
90% 663
95% 1006
98% 2036
99% 6583
100% 7133 (longest request)

#######################################

And a database query heavy page:

$ ab -n 1000 -c 25 .xyz Domain Names | Join Generation XYZ

Server Software: Mongrel
Server Hostname: www.xyz.com
Server Port: 80

Document Path: /items/list
Document Length: 27719 bytes

Concurrency Level: 1
Time taken for tests: 237.114409 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 27973000 bytes
HTML transferred: 27719000 bytes
Requests per second: 4.22 [#/sec] (mean)
Time per request: 237.114 [ms] (mean)
Time per request: 237.114 [ms] (mean, across all concurrent
requests)
Transfer rate: 115.21 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 173 236 76.0 234 1386
Waiting: 172 236 76.0 234 1386
Total: 173 236 76.0 234 1386

Percentage of the requests served within a certain time (ms)
50% 234
66% 235
75% 236
80% 237
90% 254
95% 359
98% 507
99% 526
100% 1386 (longest request)

#######################################

After multiple tests, Mongrel still seems as fast as when first started
(unlike before), and I haven’t experienced any unresponsive pages. I’ll
try Mongrel on my heavier traffic site again and see how it holds up.

Thanks!

Joe

PS - Yeah, HTTP_HOST is probably the better var to use ;).

Thanks Jonathan, I’ll fix that up tonight and ship out a new snapshot.
I
actually want to unify the two platforms into one script to avoid these
disconnects.

Zed

Must be this setting:

# Determines whether or not to use a connection for each thread, or 

a single shared connection for all threads.
# Defaults to true; Railties’ WEBrick server sets this to false.
cattr_accessor :allow_concurrency
@@allow_concurrency = true

I’m not exactly sure to what true or false corresponds. I guess
concurrent = one connection/thread, since I’m seeing more than one
connection per app (and I haven’t changed this setting).

Joe

Joe wrote:

Must be this setting:

# Determines whether or not to use a connection for each thread, or 

a single shared connection for all threads.
# Defaults to true; Railties’ WEBrick server sets this to false.
cattr_accessor :allow_concurrency
@@allow_concurrency = true

I’m not exactly sure to what true or false corresponds. I guess
concurrent = one connection/thread, since I’m seeing more than one
connection per app (and I haven’t changed this setting).

Joe

I tried that setting in my envonment.rb file and got an error starting
mongrel-0.3.12.3-mswin32 like:

mongrel_rails start -n 4 -B

undefined method ‘cattr_accessor’ in environment.rb.

We are using Mongrel/Rails to run a web service that does a screen
scrape of another site (using Watir). Each request can take up to a
minute or more to complete so we will need to to be running more than
one scrape simultaneously. Is there a way for Mongrel to be working on
more than one rails request at a given time other than by spawning off
multiple Mongrel processes and using an Apache or Lighttpd proxy?

David

Cool Joe. One thing with Mongrel, it used to run with a fixed set of
worker
threads which was why you got the 20 connections. Now it fires one
thread
per request, which is why you’re getting only 1-4. There’s a problem
that
if your Mongrel servers get slammed then these will jack up. You’re
best
off setting ActiveRecord to not be threaded (whatever that setting
name is
these days).

Rather than have Mongrel decide what is best, I left it to people
running
rails. If you just change it in your environment.rb you’ll be set.

Zed