couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Winshell <ja...@jasonwinshell.com>
Subject Re: Super slow attachment upload speed on localhost
Date Wed, 12 Feb 2014 18:09:40 GMT
Can you please elaborate. I don't know what this means? Thanks.

On Feb 12, 2014, at 10:04 AM, Alexander Shorin <kxepal@gmail.com> wrote:

> I believe this issue has the same reasons as COUCHDB-1986 does.
> --
> ,,,^..^,,,
> 
> 
> On Wed, Feb 12, 2014 at 9:43 PM, Robert Samuel Newson
> <rnewson@apache.org> wrote:
>> Try -T myrandom.dat instead of —data-binary @ to stream it without loading it into
ram.
>> 
>> B.
>> 
>> On 12 Feb 2014, at 17:32, Jason Winshell <jason@jasonwinshell.com> wrote:
>> 
>>> Hello,
>>> 
>>> I am finding that uploading an attachment to CouchDB 1.5 is incredibly slow when
transferring from curl. Both curl and Couch are running on localhost (no network). I switched
to a curl test after seeing the same problem with Futon and the Ektorp framework. I tried
the loopback address, 127.0.0.1 too.
>>> 
>>> For a 3MB file with curl I'm seeing a 22-25 second upload. curl says the average
upload speed is 146K/sec. What's going on? Why is Couch taking so long to process the attachment
stream?
>>> 
>>> HELP!
>>> 
>>> Thanks
>>> 
>>> Jason
>>> 
>>> Platform: Mac OS X 10.9.1 (Mavericks), CouchdB 1.5, 16GB ram, 1TB disk, 2.2ghz
i7
>>> 
>>> curl command:
>>> 
>>> ~ > curl -vX PUT 'http://127.0.0.1:5984/justfiles/doc1/myrandom.dat' --data-binary
@myrandom.dat -H "Content-Type: application/octet-stream" > response
>>> * About to connect() to 127.0.0.1 port 5984 (#0)
>>> *   Trying 127.0.0.1...
>>> * Adding handle: conn: 0x7fedaa004000
>>> * Adding handle: send: 0
>>> * Adding handle: recv: 0
>>> * Curl_addHandleToPipeline: length: 1
>>> * - Conn 0 (0x7fedaa004000) send_pipe: 1, recv_pipe: 0
>>> % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>>                                Dload  Upload   Total   Spent    Left  Speed
>>> 0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*
Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0)
>>>> PUT /justfiles/doc1/myrandom.dat HTTP/1.1
>>>> User-Agent: curl/7.30.0
>>>> Host: 127.0.0.1:5984
>>>> Accept: */*
>>>> Content-Type: application/octet-stream
>>>> Content-Length: 3145728
>>>> Expect: 100-continue
>>>> 
>>> < HTTP/1.1 100 Continue
>>> } [data not shown]
>>> 84 3072k    0     0   84 2608k      0   125k  0:00:24  0:00:20  0:00:04  125k<
HTTP/1.1 201 Created
>>> * Server CouchDB/1.5.0 (Erlang OTP/R16B01) is not blacklisted
>>> < Server: CouchDB/1.5.0 (Erlang OTP/R16B01)
>>> < Location: http://127.0.0.1:5984/justfiles/doc1/myrandom.dat
>>> < ETag: "10-05bebacc7fc5273e6164a1d32e188b05"
>>> < Date: Wed, 12 Feb 2014 17:28:34 GMT
>>> < Content-Type: text/plain; charset=utf-8
>>> < Content-Length: 68
>>> < Cache-Control: must-revalidate
>>> <
>>> { [data not shown]
>>> 100 3072k  100    68  100 3072k      3   146k  0:00:22  0:00:20  0:00:02  112k
>>> * Connection #0 to host 127.0.0.1 left intact
>>> ~ > cat response
>>> {"ok":true,"id":"doc1","rev":"10-05bebacc7fc5273e6164a1d32e188b05"}
>>> ~ >
>> 
> 


Mime
View raw message