[
https://issues.apache.org/jira/browse/COUCHDB-2724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14634029#comment-14634029
]
ASF GitHub Bot commented on COUCHDB-2724:
-----------------------------------------
GitHub user kocolosk opened a pull request:
https://github.com/apache/couchdb-couch-mrview/pull/22
Buffer rows in chunked responses
This patch reduces the number of chunks in an HTTP chunked response body by
coalescing multiple rows into a single transmission. The default value is
chosen to fill a standard Ethernet frame but is
configurable in the .ini by setting
[httpd]
chunked_response_buffer = 1490 ; size of buffer in bytes
See [COUCHDB-2724](https://issues.apache.org/jira/browse/COUCHDB-2724).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/couchdb-couch-mrview
2724-chunked-buffering
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-couch-mrview/pull/22.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #22
----
commit 4038d9eb0cb9b1c291fdcfafa5fcd12ad1b85e3c
Author: Adam Kocoloski <[email protected]>
Date: 2015-07-20T19:53:18Z
Avoid gratuitous list flattening
Mochiweb and gen_tcp are perfectly happy with iolists.
commit bb94b2a528ae9410517d57de1d3fb553556a4ce1
Author: Adam Kocoloski <[email protected]>
Date: 2015-07-20T20:10:24Z
Buffer rows to reduce number of chunks
This patch reduces the number of chunks in an HTTP chunked response body
by coalescing multiple rows into a single transmission. The default
value is chosen to fill a standard Ethernet frame but will be made
configurable.
COUCHDB-2724
commit 2f489b9cd0086b3b8daf7e2670bb6ec477983c64
Author: Adam Kocoloski <[email protected]>
Date: 2015-07-20T20:20:25Z
Read the chunk buffer size from config
----
> Batch rows in streaming responses to improve throughput
> -------------------------------------------------------
>
> Key: COUCHDB-2724
> URL: https://issues.apache.org/jira/browse/COUCHDB-2724
> Project: CouchDB
> Issue Type: Improvement
> Security Level: public(Regular issues)
> Components: Database Core, HTTP Interface
> Reporter: Adam Kocoloski
> Assignee: Adam Kocoloski
>
> [~tonysun83] showed me some profiling of the {{_changes}} feed which
> indicated that the coordinator process was spending about 1/3 of its time
> executing inside {{send_delayed_chunk}}. We can reduce the number of
> invocations of this function by buffering individual rows until we reach a
> (configurable) threshold for sending the data out the wire.
> We'll of course want to be careful about continuous feeds; if we're in the
> "slow drip" portion of the feed we'll obviously want to emit right away
> instead of adding latency unnecessarily.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)