couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filipe David Manana <fdman...@apache.org>
Subject worst performance in 1.1.x (compared to 1.0.x)
Date Sun, 12 Dec 2010 12:17:24 GMT
Hi,

While running a relaximation test to compare read/write performance
between 1.1.x and 1.0.x, I found out that 1.1.x has worst performance

It seems the cause is related to the new Mochiweb version introduced
in commit 4b0948ddb3a428f8a5330e05745b2fbd4ccf9375 -
https://github.com/apache/couchdb/commit/4b0948ddb3a428f8a5330e05745b2fbd4ccf9375

Comparing the performance of this revision with the previous one
(cd214b23e8129868d4a7020ddafd55a16e496652), I get the following
results:

http://graphs.mikeal.couchone.com/#/graph/df0f79455c9c600f66d1ce42ea0125e5

Both read and write performance are worse for
4b0948ddb3a428f8a5330e05745b2fbd4ccf9375.

The cause could be the configuration we pass to Mochiweb in
couch_httpd. The new Mochiweb sets the nodelay option to false by
default and it uses now several acceptor processes (16 by default).
However even with the following small patch I still get about the same
disappointing results:

diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 23ff7f9..e93c7e7 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -97,7 +97,9 @@ start_link(Name, Options) ->
     {ok, Pid} = case mochiweb_http:start(Options ++ [
         {loop, Loop},
         {name, Name},
-        {ip, BindAddress}
+        {ip, BindAddress},
+        {nodelay, true},
+        {acceptor_pool_size, 32}
     ]) of
     {ok, MochiPid} -> {ok, MochiPid};
     {error, Reason} ->


(Also tried higher values for acceptor_pool_size, which doesn't help)

The test was run like this:

$ node tests/compare_write_and_read.js --wclients 100 --rclients 200 \
  -name1 new_4b0948ddb3a428f8a5330e05745b2fbd4ccf9375 -name2
old_cd214b23e8129868d4a7020ddafd55a16e496652 \
  -url1 http://localhost:5984/ -url2 http://localhost:5985/ \
  --duration 120

With the following document template (file
relaximation/common/small_doc.json):
http://friendpaste.com/7GKUEg0SZHmOf0g7Dh5IWC

Can anyone confirm these results?
If confirmed, I would say this is a blocker for 1.1.0.

thanks


-- 
Filipe David Manana,
fdmanana@gmail.com, fdmanana@apache.org

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

Mime
View raw message