couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [couchdb] branch 1.6.x updated: Hibernate couch_stream after each write
Date Tue, 09 May 2017 20:10:10 GMT
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 1.6.x
in repository

The following commit(s) were added to refs/heads/1.6.x by this push:
       new  f073391   Hibernate couch_stream after each write
f073391 is described below

commit f073391aece76bbd0f90d7f74bb548753897a465
Author: Joan Touzet <>
AuthorDate: Tue May 9 16:09:04 2017 -0400

    Hibernate couch_stream after each write
    In COUCHDB-1946 Adam Kocoloski investigated a memory explosion resulting
    from replication of databases with large attachments (npm fullfat). He
    was able to stabilize memory usage to a much lower level by hibernating
    couch_stream after each write. While this increases CPU utilization when
    writing attachments, it should help reduce memory utilization.
    This patch is the single change that affected a ~70% reduction in
    No alteration to the spawn of couch_stream to change the fullsweep_after
    setting has been made, in part because this can be adjusted at the erl
    command line if desired (-erl ERL_FULLSWEEP_AFTER 0).
    +1 for 2.0.0 and 1.6.x from @davisp, see #510 for details.
 src/couchdb/couch_stream.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/couchdb/couch_stream.erl b/src/couchdb/couch_stream.erl
index 959feef..4067ff7 100644
--- a/src/couchdb/couch_stream.erl
+++ b/src/couchdb/couch_stream.erl
@@ -255,7 +255,7 @@ handle_call({write, Bin}, _From, Stream) ->
-                        identity_len=IdenLen + BinSize}};
+                        identity_len=IdenLen + BinSize}, hibernate};
     true ->
         {reply, ok, Stream#stream{

To stop receiving notification emails like this one, please contact
['"" <>'].

View raw message