News for hackers. Stuff that matters.
Re:RethinkDB 1.6 is out: regex matching, new array operation... by rb2k_ on Thursday June 13, 2013 @06:24PM (#5876968)
Just playing around a bit, even with soft durability, insertion speeds seem to be pretty slow (<100 inserts/s from ruby using bulk inserts on a i7 Macbook Pro with an SSD).

Also: All the ruby driver doc seems wrong. 1.6 changed a lot of the APIs?

Re:RethinkDB 1.6 is out: regex matching, new array operation... by coffeemug on Thursday June 13, 2013 @06:25PM (#5876980)
< 100 inserts/s with soft durability is far too low. Shoot us an email to the google group (http://groups.google.com/group/rethinkdb) and we'll see if we can work this out!
Re:RethinkDB 1.6 is out: regex matching, new array operation... by rb2k_ on Thursday June 13, 2013 @06:33PM (#5877044)
Seems the speed it really declines with the size of the inserted documents. My production data is a hash with 14-15 keys and string/int values of maybe 10 characters each

When I loop and keep generating these documents:

    to_insert = {}
    10.times {|i| to_insert["key#{i}"] = rand(33333).to_s * rand(6)  }
I get around 140/s. Without the insert() call, I reach 50.000+, so it doesn't seem to be the overhead.

With simple documents (3 keys, int values) I reach 350-400.

p.s. script @ https://gist.github.com/rb2k/5777997

Re:RethinkDB 1.6 is out: regex matching, new array operation... by coffeemug on Thursday June 13, 2013 @06:39PM (#5877074)
Ah, I see. This is a known problem with the performance of the protobuf serialization library we're using in the Ruby driver (see https://github.com/rethinkdb/rethinkdb/issues/897). It bottlenecks the CPU and should be fixed in the next release.

In the meantime, you could try running a multithreaded/multiprocess script -- that would significantly increase throughput.

Sorry you ran into this -- it'll be fixed ASAP.

Re:RethinkDB 1.6 is out: regex matching, new array operation... by rb2k_ on Friday June 14, 2013 @04:46AM (#5878929)
the driver doesn't seem to be threadsafe and just locks once I start using it in threads :(
Re:RethinkDB 1.6 is out: regex matching, new array operation... by coffeemug on Friday June 14, 2013 @07:10PM (#5883070)
Sorry -- the drivers are meant to be used in a way where you create a new connection in each thread. If you do it this way, things will work.
Re:RethinkDB 1.6 is out: regex matching, new array operation... by mglukhovsky on Thursday June 13, 2013 @06:40PM (#5877077)
Which parts of the ruby driver docs seem inconsistent / wrong? If there's a documentation issue I'd love to fix this ASAP.
Re:RethinkDB 1.6 is out: regex matching, new array operation... by rb2k_ on Friday June 14, 2013 @04:25AM (#5878876)
It's fixed by now, but everything on http://www.rethinkdb.com/docs/guides/drivers/ was wrong. The old driver e.g. took several arguments, the 1.6 one takes a hash.

The old version basically looked exactly like the python code.

Re:RethinkDB 1.6 is out: regex matching, new array operation... by molf on Thursday June 13, 2013 @06:47PM (#5877120)
Having the exact same problem, even with small documents. Using the NodeJS driver.
Re:RethinkDB 1.6 is out: regex matching, new array operation... by mglukhovsky on Thursday June 13, 2013 @07:46PM (#5877416)
If you're working with small documents, it's possible you're experiencing a performance bottleneck other than protobuf serialization. Could you provide some more info on the queries you're running and an example document on our Google Group so the rest of the team can weigh in? (http://groups.google.com/group/rethinkdb)