[Monkey] More performance improvements underway

One thing is clear: you can improve everything!. We have been doing some cool improvements in Monkey internals, our next release will rock more than usual, 0.14.0 is very promising in terms of speed and low resources usage.

I would like to put here just a simple example, after analyzing each HTTP cycle of our server, we found a couple of parts of the architecture where some functions were not so fast as we though (that’s the problem.. we though :) ), so after put our hands on we have some results. The following new improvement case take place in one function which perform string search with string limits, let’s take a close look to the original diagram:

Diagram generated with valgrind + kcachegrind,
5000 request performed with apache benchmark (ab)

If you click in the image, you will realize that function mk_string_search_n() used to be 64.91% of parent function mk_http_init(), so there was something wrong, after analyze the code we decide to rewrite the old function and do some magic with string limits, after a while here is the result:

After rewrite mk_string_search()

So we have improved the function performance, decreasing it’s computing time from 64.91% to 7.11%, obviously this means less CPU usage + more requests per second = better performance. If you are curious, you can find the patch here.

This is not all, also we have also merged new patches to decrease memory allocation per request, better hostname matching and small internal changes… as I said.. Monkey 0.14.0 will rock!

Source
http://blog.monkey-project.com/2011/04/08/more-performance-improvements-underway/

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>