You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Sebastian Negomireanu <se...@justdesign.ro> on 2009/11/03 10:45:05 UTC

Performance issue

Hello, 

 

I am encountering a big performance problem with CouchDB. I've tried it both
on Windows and on an Ubuntu server 9.10 virtual machine. In both scenarios,
I get response times around 500ms (and sometimes more). I've tried simple
operations like adding a very minimal document (about 5 fields, a total
payload of max 0.5 KB / doc). I've also tried the operation while running it
in a loop. After 220 seconds i've only PUT 448 documents. 

 

After running the whole thing through a profiler (to be sure that it's not
my code causing the issues), it seems the bottleneck is in the response time
from the couchdb server.

 

Is there any magic optimization that I must do or something I'm missing? My
machine is fast enough that this shouldn't be a real issue (Core 2 Duo,
2GHz, 4GB ram, running on Windows 7, and VM running on VirtualBox, with 512
MB RAM).

 

  _____  

Best regards,
Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
+40-726-181186 | +40-788-757462
 <ma...@justdesign.ro>
sebastian.negomireanu@justdesign.ro

SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
+40-269-210008 |  <ma...@justdesign.ro> office@justdesign.ro |
<http://www.justdesign.ro> www.justdesign.ro 

The information contained in this e-mail is intended only for the ones to
which it is addressed, and contains information which is confidential and
may be privileged. Unauthorized disclosure, copying or use (of any part) of
this information is prohibited. If you are not the intended recipient,
please notify the sender or Just Design SRL by return e-mail or telephone
(+40-269-210008) and delete this e-mail from your system, including any
attachments thereto. Any information in this message that does not relate to
the official business of Just Design SRL shall be understood as neither
given nor endorsed by it. Internet communications are not secure, therefore
Just Design SRL does not accept any liability for either the contents of
this message, or any damage related to documents and/or data which are
communicated by e-mail. Violation of this notice may be unlawful. 

 


RE: Performance issue

Posted by Sebastian Negomireanu <se...@justdesign.ro>.
I am connecting to the database from my .NET application (which uses Divan
as a library). But I've put it through a profiler and I get the large delay
when waiting for the response from the database. The time needed to run the
application itself (prepare the JSON message, parse the response etc.) is
minimal compared to the time it waits for the request. Actually sending the
request takes less than 5ms.

Anyway, I'll monitor everything with wireshark a bit later today and come
back with the results. Maybe, as Roger pointed out, my infrastructure is the
cause for this.


Best regards,
Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
+40-726-181186 | +40-788-757462
sebastian.negomireanu@justdesign.ro

SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
+40-269-210008 | office@justdesign.ro | www.justdesign.ro 


-----Original Message-----
From: Robert Newson [mailto:robert.newson@gmail.com] 
Sent: Tuesday, November 03, 2009 2:22 PM
To: user@couchdb.apache.org
Subject: Re: Performance issue

What HTTP client are you using?

On Tue, Nov 3, 2009 at 11:06 AM, Sebastian Negomireanu
<se...@justdesign.ro> wrote:
> Ok I will try that and come back with results.
>
>
> Best regards,
> Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
> +40-726-181186 | +40-788-757462
> sebastian.negomireanu@justdesign.ro
>
> SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
> +40-269-210008 | office@justdesign.ro | www.justdesign.ro
>
> -----Original Message-----
> From: Roger Binns [mailto:rogerb@rogerbinns.com]
> Sent: Tuesday, November 03, 2009 11:59 AM
> To: user@couchdb.apache.org
> Subject: Re: Performance issue
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sebastian Negomireanu wrote:
>> In both scenarios, I get response times around 500ms
>
> In these kind of situations I am a big fan of using Wireshark to see
exactly
> what the response time is.  There could be all sorts of funky stuff going
on
> such as proxy servers, DNS lookups, IPv6 failing and then going to IPv4
and
> who knows what else that may be major contributions to the time as
observed
> by the client side code.
>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkrv/sgACgkQmOOfHg372QTcGQCdF0U0esBf+ODH54UESA1onxr2
> i8AAn3beEdWJr0GbJXP1Z0hFirMWqyPO
> =mUU0
> -----END PGP SIGNATURE-----
>
>
>



RE: Performance issue

Posted by Sebastian Negomireanu <se...@justdesign.ro>.
After monitoring with Wireshark, it seems that there aren't any other
operations happening at the same time.

I've attached the whole HTTP conversation.

As you can see from the http dump, I check if the test database exists, drop
it, recreate it, add two views to it and then add a document. This whole
process takes 7 seconds to complete.


Best regards,
Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
+40-726-181186 | +40-788-757462
sebastian.negomireanu@justdesign.ro

SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
+40-269-210008 | office@justdesign.ro | www.justdesign.ro 

-----Original Message-----
From: Robert Newson [mailto:robert.newson@gmail.com] 
Sent: Tuesday, November 03, 2009 4:15 PM
To: user@couchdb.apache.org
Subject: Re: Performance issue

One thing that snagged me one time was a client that sent "Expect:
Continue" header. There was a time when couchdb didn't recognize this
case-insensitively. For me, this caused a two second delay to all
requests.

B.

On Tue, Nov 3, 2009 at 1:34 PM, Sebastian Negomireanu
<se...@justdesign.ro> wrote:
> I am connecting to the database from my .NET application (which uses Divan
> as a library). But I've put it through a profiler and I get the large
delay
> when waiting for the response from the database. The time needed to run
the
> application itself (prepare the JSON message, parse the response etc.) is
> minimal compared to the time it waits for the request. Actually sending
the
> request takes less than 5ms.
>
> Anyway, I'll monitor everything with wireshark a bit later today and come
> back with the results. Maybe, as Roger pointed out, my infrastructure is
the
> cause for this.
>
>
> Best regards,
> Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
> +40-726-181186 | +40-788-757462
> sebastian.negomireanu@justdesign.ro
>
> SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
> +40-269-210008 | office@justdesign.ro | www.justdesign.ro
>
>
> -----Original Message-----
> From: Robert Newson [mailto:robert.newson@gmail.com]
> Sent: Tuesday, November 03, 2009 2:22 PM
> To: user@couchdb.apache.org
> Subject: Re: Performance issue
>
> What HTTP client are you using?
>
> On Tue, Nov 3, 2009 at 11:06 AM, Sebastian Negomireanu
> <se...@justdesign.ro> wrote:
>> Ok I will try that and come back with results.
>>
>>
>> Best regards,
>> Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
>> +40-726-181186 | +40-788-757462
>> sebastian.negomireanu@justdesign.ro
>>
>> SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
>> +40-269-210008 | office@justdesign.ro | www.justdesign.ro
>>
>> -----Original Message-----
>> From: Roger Binns [mailto:rogerb@rogerbinns.com]
>> Sent: Tuesday, November 03, 2009 11:59 AM
>> To: user@couchdb.apache.org
>> Subject: Re: Performance issue
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Sebastian Negomireanu wrote:
>>> In both scenarios, I get response times around 500ms
>>
>> In these kind of situations I am a big fan of using Wireshark to see
> exactly
>> what the response time is.  There could be all sorts of funky stuff going
> on
>> such as proxy servers, DNS lookups, IPv6 failing and then going to IPv4
> and
>> who knows what else that may be major contributions to the time as
> observed
>> by the client side code.
>>
>> Roger
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAkrv/sgACgkQmOOfHg372QTcGQCdF0U0esBf+ODH54UESA1onxr2
>> i8AAn3beEdWJr0GbJXP1Z0hFirMWqyPO
>> =mUU0
>> -----END PGP SIGNATURE-----
>>
>>
>>
>
>
>

Re: Performance issue

Posted by Robert Newson <ro...@gmail.com>.
One thing that snagged me one time was a client that sent "Expect:
Continue" header. There was a time when couchdb didn't recognize this
case-insensitively. For me, this caused a two second delay to all
requests.

B.

On Tue, Nov 3, 2009 at 1:34 PM, Sebastian Negomireanu
<se...@justdesign.ro> wrote:
> I am connecting to the database from my .NET application (which uses Divan
> as a library). But I've put it through a profiler and I get the large delay
> when waiting for the response from the database. The time needed to run the
> application itself (prepare the JSON message, parse the response etc.) is
> minimal compared to the time it waits for the request. Actually sending the
> request takes less than 5ms.
>
> Anyway, I'll monitor everything with wireshark a bit later today and come
> back with the results. Maybe, as Roger pointed out, my infrastructure is the
> cause for this.
>
>
> Best regards,
> Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
> +40-726-181186 | +40-788-757462
> sebastian.negomireanu@justdesign.ro
>
> SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
> +40-269-210008 | office@justdesign.ro | www.justdesign.ro
>
>
> -----Original Message-----
> From: Robert Newson [mailto:robert.newson@gmail.com]
> Sent: Tuesday, November 03, 2009 2:22 PM
> To: user@couchdb.apache.org
> Subject: Re: Performance issue
>
> What HTTP client are you using?
>
> On Tue, Nov 3, 2009 at 11:06 AM, Sebastian Negomireanu
> <se...@justdesign.ro> wrote:
>> Ok I will try that and come back with results.
>>
>>
>> Best regards,
>> Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
>> +40-726-181186 | +40-788-757462
>> sebastian.negomireanu@justdesign.ro
>>
>> SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
>> +40-269-210008 | office@justdesign.ro | www.justdesign.ro
>>
>> -----Original Message-----
>> From: Roger Binns [mailto:rogerb@rogerbinns.com]
>> Sent: Tuesday, November 03, 2009 11:59 AM
>> To: user@couchdb.apache.org
>> Subject: Re: Performance issue
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Sebastian Negomireanu wrote:
>>> In both scenarios, I get response times around 500ms
>>
>> In these kind of situations I am a big fan of using Wireshark to see
> exactly
>> what the response time is.  There could be all sorts of funky stuff going
> on
>> such as proxy servers, DNS lookups, IPv6 failing and then going to IPv4
> and
>> who knows what else that may be major contributions to the time as
> observed
>> by the client side code.
>>
>> Roger
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAkrv/sgACgkQmOOfHg372QTcGQCdF0U0esBf+ODH54UESA1onxr2
>> i8AAn3beEdWJr0GbJXP1Z0hFirMWqyPO
>> =mUU0
>> -----END PGP SIGNATURE-----
>>
>>
>>
>
>
>

Re: Performance issue

Posted by Robert Newson <ro...@gmail.com>.
What HTTP client are you using?

On Tue, Nov 3, 2009 at 11:06 AM, Sebastian Negomireanu
<se...@justdesign.ro> wrote:
> Ok I will try that and come back with results.
>
>
> Best regards,
> Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
> +40-726-181186 | +40-788-757462
> sebastian.negomireanu@justdesign.ro
>
> SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
> +40-269-210008 | office@justdesign.ro | www.justdesign.ro
>
> -----Original Message-----
> From: Roger Binns [mailto:rogerb@rogerbinns.com]
> Sent: Tuesday, November 03, 2009 11:59 AM
> To: user@couchdb.apache.org
> Subject: Re: Performance issue
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sebastian Negomireanu wrote:
>> In both scenarios, I get response times around 500ms
>
> In these kind of situations I am a big fan of using Wireshark to see exactly
> what the response time is.  There could be all sorts of funky stuff going on
> such as proxy servers, DNS lookups, IPv6 failing and then going to IPv4 and
> who knows what else that may be major contributions to the time as observed
> by the client side code.
>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkrv/sgACgkQmOOfHg372QTcGQCdF0U0esBf+ODH54UESA1onxr2
> i8AAn3beEdWJr0GbJXP1Z0hFirMWqyPO
> =mUU0
> -----END PGP SIGNATURE-----
>
>
>

RE: Performance issue

Posted by Sebastian Negomireanu <se...@justdesign.ro>.
Ok I will try that and come back with results.


Best regards,
Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
+40-726-181186 | +40-788-757462
sebastian.negomireanu@justdesign.ro

SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
+40-269-210008 | office@justdesign.ro | www.justdesign.ro 

-----Original Message-----
From: Roger Binns [mailto:rogerb@rogerbinns.com] 
Sent: Tuesday, November 03, 2009 11:59 AM
To: user@couchdb.apache.org
Subject: Re: Performance issue

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastian Negomireanu wrote:
> In both scenarios, I get response times around 500ms

In these kind of situations I am a big fan of using Wireshark to see exactly
what the response time is.  There could be all sorts of funky stuff going on
such as proxy servers, DNS lookups, IPv6 failing and then going to IPv4 and
who knows what else that may be major contributions to the time as observed
by the client side code.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrv/sgACgkQmOOfHg372QTcGQCdF0U0esBf+ODH54UESA1onxr2
i8AAn3beEdWJr0GbJXP1Z0hFirMWqyPO
=mUU0
-----END PGP SIGNATURE-----



Re: Performance issue

Posted by Roger Binns <ro...@rogerbinns.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastian Negomireanu wrote:
> In both scenarios, I get response times around 500ms

In these kind of situations I am a big fan of using Wireshark to see exactly
what the response time is.  There could be all sorts of funky stuff going on
such as proxy servers, DNS lookups, IPv6 failing and then going to IPv4 and
who knows what else that may be major contributions to the time as observed
by the client side code.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrv/sgACgkQmOOfHg372QTcGQCdF0U0esBf+ODH54UESA1onxr2
i8AAn3beEdWJr0GbJXP1Z0hFirMWqyPO
=mUU0
-----END PGP SIGNATURE-----

RE: Performance issue

Posted by Sebastian Negomireanu <se...@justdesign.ro>.
This was initially my setup. I thought that maybe there's an issue with the
windows release (because I know it didn't use to be fully supported). That
was the reason I've tried to setup the Ubuntu VirtualBox machine to test the
performance. In both scenarios I get the same results. I can only imagine
there is a problem somewhere - either in the configuration or something more
subtle and I cannot identify it.


Best regards,
Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
+40-726-181186 | +40-788-757462
sebastian.negomireanu@justdesign.ro

SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
+40-269-210008 | office@justdesign.ro | www.justdesign.ro 

-----Original Message-----
From: kolosy@gmail.com [mailto:kolosy@gmail.com] On Behalf Of Alex P
Sent: Tuesday, November 03, 2009 11:50 PM
To: user@couchdb.apache.org
Subject: Re: Performance issue

sebastian - try a windows-native build of couch, to eliminate the
virtualization as a potential culprit.

i've used [1] with good results

thanks,
alex.

[1] http://markmail.org/message/jilbqz4jwt4xxsmw


On Tue, Nov 3, 2009 at 3:35 PM, Sebastian Negomireanu <
sebastian.negomireanu@justdesign.ro> wrote:

> The issue is not sending documents in batches, but the extremely slow
> insertion of individual documents. I think that a large amount of use
cases
> involve working with a single document instead of batches. There is no way
> in the world an end user would cope with a 5 second response time for a
> simple CRUD operation.
>
>
> Best regards,
> Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
> +40-726-181186 | +40-788-757462
> sebastian.negomireanu@justdesign.ro
>
> SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
> +40-269-210008 | office@justdesign.ro | www.justdesign.ro
>
>
> -----Original Message-----
> From: kosta@fillibach.de [mailto:kosta@fillibach.de]
> Sent: Tuesday, November 03, 2009 12:28 PM
> To: user@couchdb.apache.org; Sebastian Negomireanu
> Subject: Re: Performance issue
>
> Hello,
>
> > I am encountering a big performance problem with CouchDB. I get
> > response times around 500ms (and sometimes more). I've tried simple
> > operations like adding a very minimal document (about 5 fields, a total
> > payload of max 0.5 KB / doc). I've also tried the operation while
running
> it
> > in a loop. After 220 seconds i've only PUT 448 documents.
> > After running the whole thing through a profiler (to be sure that it's
> not
> > my code causing the issues), it seems the bottleneck is in the response
> time
> > from the couchdb server.
>
> Did you try batch=ok and bulk sending the documents?
>
> see http://wiki.apache.org/couchdb/HTTP_Document_API
> and http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API
>
> Kind regards,
> Kosta
>
>
>
>
>



Re: Performance issue

Posted by Alex P <ap...@kolosy.com>.
sebastian - try a windows-native build of couch, to eliminate the
virtualization as a potential culprit.

i've used [1] with good results

thanks,
alex.

[1] http://markmail.org/message/jilbqz4jwt4xxsmw


On Tue, Nov 3, 2009 at 3:35 PM, Sebastian Negomireanu <
sebastian.negomireanu@justdesign.ro> wrote:

> The issue is not sending documents in batches, but the extremely slow
> insertion of individual documents. I think that a large amount of use cases
> involve working with a single document instead of batches. There is no way
> in the world an end user would cope with a 5 second response time for a
> simple CRUD operation.
>
>
> Best regards,
> Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
> +40-726-181186 | +40-788-757462
> sebastian.negomireanu@justdesign.ro
>
> SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
> +40-269-210008 | office@justdesign.ro | www.justdesign.ro
>
>
> -----Original Message-----
> From: kosta@fillibach.de [mailto:kosta@fillibach.de]
> Sent: Tuesday, November 03, 2009 12:28 PM
> To: user@couchdb.apache.org; Sebastian Negomireanu
> Subject: Re: Performance issue
>
> Hello,
>
> > I am encountering a big performance problem with CouchDB. I get
> > response times around 500ms (and sometimes more). I've tried simple
> > operations like adding a very minimal document (about 5 fields, a total
> > payload of max 0.5 KB / doc). I've also tried the operation while running
> it
> > in a loop. After 220 seconds i've only PUT 448 documents.
> > After running the whole thing through a profiler (to be sure that it's
> not
> > my code causing the issues), it seems the bottleneck is in the response
> time
> > from the couchdb server.
>
> Did you try batch=ok and bulk sending the documents?
>
> see http://wiki.apache.org/couchdb/HTTP_Document_API
> and http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API
>
> Kind regards,
> Kosta
>
>
>
>
>

Re: Performance issue

Posted by Roger Binns <ro...@rogerbinns.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastian Negomireanu wrote:
> The issue is not sending documents in batches, but the extremely slow
> insertion of individual documents.

You still haven't included a packet capture that has timings.  Without that
we can't tell how long the actual CouchDB request/response processing took
versus all the other factors to add up to the times you are seeing.  In any
event what you are seeing is not normal.

There are several components involved other than CouchDB such as your client
side software, HTTP/JSON libraries, network stack, network configuration.
Once we see packet captures with timings then "blame" can be apportioned.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrwqIQACgkQmOOfHg372QSFygCcCjwm/iRIqdv1nFF6/Ir8KC/m
uYQAn3QBUD3Uq2H45yN551yPUinSBna8
=BWcF
-----END PGP SIGNATURE-----

RE: Performance issue

Posted by Sebastian Negomireanu <se...@justdesign.ro>.
The issue is not sending documents in batches, but the extremely slow
insertion of individual documents. I think that a large amount of use cases
involve working with a single document instead of batches. There is no way
in the world an end user would cope with a 5 second response time for a
simple CRUD operation.


Best regards,
Sebastian Negomireanu | CTO / Managing Partner JustDesign Sibiu, Romania
+40-726-181186 | +40-788-757462
sebastian.negomireanu@justdesign.ro

SC JustDesign SRL | Str. Dorului 20, 550352, Sibiu, Romania
+40-269-210008 | office@justdesign.ro | www.justdesign.ro 


-----Original Message-----
From: kosta@fillibach.de [mailto:kosta@fillibach.de] 
Sent: Tuesday, November 03, 2009 12:28 PM
To: user@couchdb.apache.org; Sebastian Negomireanu
Subject: Re: Performance issue

Hello,

> I am encountering a big performance problem with CouchDB. I get  
> response times around 500ms (and sometimes more). I've tried simple
> operations like adding a very minimal document (about 5 fields, a total
> payload of max 0.5 KB / doc). I've also tried the operation while running
it
> in a loop. After 220 seconds i've only PUT 448 documents.
> After running the whole thing through a profiler (to be sure that it's not
> my code causing the issues), it seems the bottleneck is in the response
time
> from the couchdb server.

Did you try batch=ok and bulk sending the documents?

see http://wiki.apache.org/couchdb/HTTP_Document_API
and http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API

Kind regards,
Kosta





Re: Performance issue

Posted by ko...@fillibach.de.
Hello,

> I am encountering a big performance problem with CouchDB. I get  
> response times around 500ms (and sometimes more). I've tried simple
> operations like adding a very minimal document (about 5 fields, a total
> payload of max 0.5 KB / doc). I've also tried the operation while running it
> in a loop. After 220 seconds i've only PUT 448 documents.
> After running the whole thing through a profiler (to be sure that it's not
> my code causing the issues), it seems the bottleneck is in the response time
> from the couchdb server.

Did you try batch=ok and bulk sending the documents?

see http://wiki.apache.org/couchdb/HTTP_Document_API
and http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API

Kind regards,
Kosta