Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 41906 invoked from network); 22 Feb 2010 18:46:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Feb 2010 18:46:51 -0000 Received: (qmail 20941 invoked by uid 500); 22 Feb 2010 18:46:51 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 20857 invoked by uid 500); 22 Feb 2010 18:46:50 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 20725 invoked by uid 99); 22 Feb 2010 18:46:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2010 18:46:50 +0000 X-ASF-Spam-Status: No, hits=-1998.8 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2010 18:46:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F3CA4234C48C for ; Mon, 22 Feb 2010 10:46:27 -0800 (PST) Message-ID: <1949199143.436961266864387997.JavaMail.jira@brutus.apache.org> Date: Mon, 22 Feb 2010 18:46:27 +0000 (UTC) From: "Filipe Manana (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Updated: (COUCHDB-639) Make replication profit of attachment compression and improve push replication for large attachments In-Reply-To: <1466597854.53421265325568188.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Filipe Manana updated COUCHDB-639: ---------------------------------- Attachment: (was: rep-att-comp-and-multipart-trunk-3.patch) > Make replication profit of attachment compression and improve push replication for large attachments > ---------------------------------------------------------------------------------------------------- > > Key: COUCHDB-639 > URL: https://issues.apache.org/jira/browse/COUCHDB-639 > Project: CouchDB > Issue Type: Improvement > Components: Replication > Affects Versions: 0.11 > Environment: trunk > Reporter: Filipe Manana > Attachments: rep-att-comp-and-multipart-trunk-4.patch > > > At the moment, for compressed attachments, the replication uncompresses and then compresses again the attachments. Therefore, a waste of CPU time. > The push replication is also not reliable for very large attachments (500mb + for example). Currently it sends the attachments in-lined in the respective JSON doc. Not only this requires too much ram memory, it also wastes too much CPU time doing the base64 encoding of the attachment (and also a decompression if the attachment is compressed). > The following patch (rep-att-comp-and-multipart-trunk*.patch) addresses both issues. Docs containing attachments are now streamed to the target remote DB using the multipart doc streaming feature provided by couch_doc.erl, and compressed attachments are not uncompressed and re-compressed during the replication > JavaScript tests included. > Previously doing a replication of a DB containing 2 docs with attachments of 100mb and 500mb caused the Erlang VM to consume near 1.2GB of ram memory in my system. With that patch applied, it uses about 130Mb of ram memory. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.