Here's an Erlang client that also sees ~7/sec
-module(inserts_test).
-export([run/0]).
%%
%%
run() ->
statistics(wall_clock),
Recs30 = [{<<"name">> , N} || N <- lists:seq(1,300)],
lists:map(fun(E) -> erlang_couchdb:create_document({"localhost",
5984}, "iplaywow", [E]) end, Recs30),
{_, T} = statistics(wall_clock),
io:format("Time to insert 300 records ~w s ~n",[T/1000]).
On Jan 4, 2009, at 6:44 PM, Geir Magnusson Jr. wrote:
yep, this is entirely consistent with what I saw w/ the Ruby, JS,
Java and curl tests...
On Jan 4, 2009, at 6:41 PM, Robert Dionne wrote:
mine are close to Jan's except I'm inserting some data. I'm
running 5.6.5 on a small Macbook:
erlang:~/emacs/couchdb/test bitdiddle$ ab -c 10 -n 1000 -p
foo.json -T 'application/json' http://127.0.0.1:5984/geirtest
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://
www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://
www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
Server Software: CouchDB/0.9.0a-incubating
Server Hostname: 127.0.0.1
Server Port: 5984
Document Path: /geirtest
Document Length: 70 bytes
Concurrency Level: 10
Time taken for tests: 159.357 seconds
Complete requests: 1000
Failed requests: 236
(Connect: 0, Length: 236, Exceptions: 0)
Broken pipe errors: 0
Total transferred: 275731 bytes
Total POSTed: 163458
HTML transferred: 69731 bytes
Requests per second: 6.28 [#/sec] (mean)
Time per request: 1593.57 [ms] (mean)
Time per request: 159.36 [ms] (mean, across all concurrent
requests)
Transfer rate: 1.73 [Kbytes/sec] received
1.03 kb/s sent
2.76 kb/s total
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.5 0 9
Processing: 585 1586 190.0 1555 2553
Waiting: 584 1585 190.0 1554 2553
Total: 585 1586 190.0 1555 2560
Percentage of the requests served within a certain time (ms)
50% 1555
66% 1588
75% 1606
80% 1622
90% 1677
95% 1990
98% 2331
99% 2467
100% 2560 (last request)
On Jan 4, 2009, at 6:37 PM, Geir Magnusson Jr. wrote:
On Jan 4, 2009, at 6:14 PM, Chris Anderson wrote:
On Sun, Jan 4, 2009 at 2:45 PM, Geir Magnusson Jr.
<[email protected]> wrote:
How many inserts a second can you do on your machine?
This the command I'm using to insert into the db:
ab -c 10 -n 1000 -p emptypost -T 'application/json'
http://127.0.0.1:5984/test_suite_db
where emptypost is a file that contains '{}'
Ok, I'll try that. Can you post a document with data though?
On my white Mac Book (OS 10.5.6, erl version 5.6.3) I'm getting
roughly 160 inserts per second. The full ab output is pasted below.
I'm inserting into a very small database (started nearly empty).
I'd
be interested to see the results of inserting into a multi-GB
database. Also, maybe my Erlang is old enough not to be effected by
the fsync thing.
I dunno - apparently the F_FILESYNC is a recent thing, and Boy
Howdy! it's slow...
Server Software: CouchDB/0.9.0a731141-incubating
Server Hostname: 127.0.0.1
Server Port: 5984
Document Path: /test_suite_db
Document Length: 70 bytes
Concurrency Level: 10
Time taken for tests: 6.342 seconds
Complete requests: 1000
Failed requests: 267
(Connect: 0, Receive: 0, Length: 267, Exceptions: 0)
Write errors: 0
Total transferred: 281695 bytes
Total POSTed: 150000
HTML transferred: 69695 bytes
Requests per second: 157.69 [#/sec] (mean)
Time per request: 63.416 [ms] (mean)
Time per request: 6.342 [ms] (mean, across all concurrent
requests)
Transfer rate: 43.38 [Kbytes/sec] received
23.10 kb/s sent
66.48 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 4
Processing: 39 63 6.3 62 102
Waiting: 39 62 6.1 61 102
Total: 39 63 6.3 62 102
Percentage of the requests served within a certain time (ms)
50% 62
66% 64
75% 65
80% 67
90% 70
95% 75
98% 82
99% 86
100% 102 (longest request)
--
Chris Anderson
http://jchris.mfdz.com