couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Zezeski <rzeze...@gmail.com>
Subject text/csv vs. application/octet-stream
Date Sun, 11 Jul 2010 21:20:44 GMT
Help me understand why a 436M CSV file uploaded as a standalone attachment
would have varying performance depending on the Content-Type header?  For
example, if I upload the CSV as text/csv it takes ~36s, but as
application/octet-stream it takes ~13s.  Furthermore, when uploaded as
text/csv the process uses 100% CPU time on one of my cores, but as
application/octet-stream it maxes out around 70%.

Erlang: R13B04
CouchDB Version: 0.12.0a958159

curl commands:

time curl -XPUT -v -H 'Content-Type: text/csv' '
http://localhost:5984/dailycell/5bab7ae56a86a9bea84f91d15d18b25e/attachment?rev=5-8305decac4a1dbd59f6014be4f4ceff7'
--data-binary @file

time curl -XPUT -v -H 'Content-Type: application/octet-stream' '
http://localhost:5984/dailycell/5bab7ae56a86a9bea84f91d15d18b25e/attachment?rev=6-0a5ae34c4b697fe678e4fb5766b7810b'
--data-binary @file

-Ryan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message