From dev-return-13432-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Thu Nov 25 10:59:39 2010 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 85250 invoked from network); 25 Nov 2010 10:59:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Nov 2010 10:59:39 -0000 Received: (qmail 71810 invoked by uid 500); 25 Nov 2010 10:59:38 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 71777 invoked by uid 500); 25 Nov 2010 10:59:38 -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 71769 invoked by uid 99); 25 Nov 2010 10:59:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Nov 2010 10:59:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Nov 2010 10:59:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAPAxFUu024920 for ; Thu, 25 Nov 2010 10:59:15 GMT Message-ID: <12323634.306671290682755108.JavaMail.jira@thor> Date: Thu, 25 Nov 2010 05:59:15 -0500 (EST) From: "David Orrell (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Updated: (COUCHDB-964) Large memory usage downloading attachments In-Reply-To: <33221885.306651290682754638.JavaMail.jira@thor> 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-964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Orrell updated COUCHDB-964: --------------------------------- Summary: Large memory usage downloading attachments (was: Large memory usage downloading attachements) > Large memory usage downloading attachments > ------------------------------------------ > > Key: COUCHDB-964 > URL: https://issues.apache.org/jira/browse/COUCHDB-964 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 1.0.1 > Environment: Linux, Erlang R14B > Reporter: David Orrell > > When downloading a large attachment the CouchDB process appears to load the entire attachment in memory before data is sent to the client. I have a 1.5 GB attachment and the CouchDB process grows by approximately this amount per client connection. > For example (as reported by Bram Nejit): > dd if=/dev/urandom of=/tmp/test.bin count=50000 bs=10240 > Put test.bin as an attachment in a coucdb database > Run > for i in {0..50};do curl http://localhost:5984/[test > database]/[doc_id]/test.bin > /dev/null 2>&1 & done > This will create 50 curl processes which download from your couchdb. Looking at the memory consumption of couchdb, it seems like it is loading large parts of the file into memory. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.