skwpspace yan pritzker’s home on the web

skwpspace is Yan Pritzker's home on the web

Blog :: Photography :: About Me

TwitterCounter for @skwp

Get the news feed
Get updates by email
Follow me on twitter

hello, i'm yan

This blog is about startups, blogging, Ruby On Rails, virtualization and cloud computing, photography, customer service, marketing, ux and design, git, and lots more.

Top Posts

planypus

I'm the founder of Planypus, the place to share your plans!

cohesiveft

Accessible, manageable, virtualized application stacks ready to download or deploy to the cloud!

flickr

what man?art cardust storm fashiondust storm fashionland cruiserhanging at center campdust storm fashioncenter camp baby

Archives

Contact

Reach me at yan at pritzker.ws

Posted
11 October 2006 @ 3pm

Tagged
RubyOnRails

Quick mongrel load testing trick

Zed’s How many mongrels tutorial gives a good idea on how to load test mongrels to determine how many mongrels you should run on your box. Here’s a little trick that makes it easier and quicker to test…

First, set up your mongrel cluster for as many mongrels as you would like to maximally load test. For example, let’s say you launch N mongrels. The trick is to start N pen load balancer processes for which each successive port refers to more and more mongrels. Example:

You have 8 mongrels on ports 3001-3008. Now launch 8 pens:

pen -r -H 4001 http://localhost:3001
pen -r -H 4002 http://localhost:3001 http://localhost:3002
...
pen -r -H 4008 http://localhost:3001 ...(6 more)... http://localhost:3008

Thus each pen on port 400N refers to N mongrels. So to load test 1 mongrel hit 4001, to test five mongrels, hit 4005. Now granted this isn’t perfect since the other mongrels are taking up some system resources by just idling there, but if you have ample memory on the system, this could be a quick and dirty way to find out how many mongrels you really need. Enjoy!


1 Comment

Posted by
1autoinsurances.info
11 August 2007 @ 11pm

[...] [...] read recognize this sublime post at http://skwpspace.com/2006/10/11/quick-mongrel-load-testing-trick/ about [...] [...]


Leave a Comment

Pretty tree display for all your Rails view partials Books for entrepreneurs