Repository navigation
Closed
Labels
Milestone
Description
I sent this benchmark over e-mail to @mlucy and @jdoliner, but I'm going to post it here instead for collaboration.
Here's the initial setup I think we should focus on (based on all the data I've collated):
- A cluster of five RethinkDB nodes
- One large table with ~1 billion documents (event data -- clickstream, network logs, etc.)
- Each document 1-2KB in size
- Has the following fields: autogen ID, datetime of the event, customer_id (which customer generate the event), type of event (i.e. user click, network packet, etc.), a bunch of other data (irrelevant what it is, just has to fill up the docs to 1-2KB)
- Secondary indexes on datetime, customer_id, type of event
- Five shards
- Two replicas, two write acks
- Hard durability
And here's the workload:
- Constant insert rate of ~5m docs per day (~60 docs/second) -- a total of 16 clients
- Run queries of the following form
- Read a random event event with an id X -- run this query ~1000 times/second, a total of 32 clients
- Give me all events of type X for customer Y at time period Z (where time period is about a month) -- run this query once per second, a total of two clients
- Give me all events for customer Y -- run this query ten times per second, a total of 8 clients
- How many events happened for time period Z (where time period is about a month) -- run this query once per second, a total of 1 client
- We should periodically drop clients and connect new ones (i.e. pick a random client and reconnect every second).
Stuff to look out for (i.e. requirements that will allow us to call this project done, and RethinkDB good):
- Latency for write queries and point read queries should never exceed a well-bounded value (say, 5ms)
- Latency for queries 2-4 shouldn't exceed a reasonable value (say, 20ms - 2s)
- Time to connect shouldn't exceed a well bounded value (say, 10ms).
We'll also have to test adding a replica. When we bump the replica number by one, we have to test the following:
- Make sure throughput doesn't drop/latency doesn't increase by a well defined number (e.g. 15%). If the number is higher than 15% it's a show-stopper since it will disrupt a real-time system.
- How long does it take to add a replica? (should be a well-bounded number on our dataset, e.g. no more than 3-5 hours, with a reasonably correct progress bar). We don't do resharding without interrupting now, so we should only worry about adding replicas.
Activity
neumino commentedon Aug 27, 2013
Last time I tried using big documents (yesterday), I noticed that adding one field to reach 256KB was quite different than adding 256 fields of 1KB (on an Atom, 2GB of RAM and a rotational drive). I can try again if needed.
We should keep a few clients always connected I think. It would be a nice way to know that we don't have leaks when clients stay connected for a long time.
mlucy commentedon Aug 27, 2013
I'm going to work on setting this up. I'm gonna go with 2K documents for
now. I might deviate slightly from the specifications (in particular, I
think that 4 nodes would be better than 2 with out current resources).
On Tue, Aug 27, 2013 at 3:19 PM, Michel [email protected] wrote:
coffeemug commentedon Aug 27, 2013
@mlucy what do you mean 4 nodes would be better than 2? (the spec says 5, I want to make sure I understand what the benchmark will measure)
bitfrost commentedon Aug 27, 2013
Awesome, I had a a very similar use case prototyped out for event data with rethinkdb and decided it wasn't going to meet my needs at the time ran my tests. I will be watching this thread to see where this goes!
mlucy commentedon Aug 27, 2013
Typo; I meant 5.
mlucy commentedon Aug 28, 2013
I wrote up a more specific summary of our initial workload after talking to Slava:
Here's the initial setup:
Our scenario is going to be a set of workloads, each doing X ops/sec
with Y clients. We're first going to improve throughput until we can
actually get X ops/sec for each workload (we may get that out of the
box), then we're going to improve latency until we hit our latency
targets for each workload. (I'm not yet sure what latency targets are
reasonable; we might end up adjusting them.)
.insert(...)# insert rows.get(...)# retrieve rows.between([cid, t1], [cid, t2], :index => 'compound').filter{|row| row['type'].eq(typ)}.reduce{...}# Get all rows of typetypforcustomer
cidin a time periodt1...t2t1...t2is one month (like start to end of January), so about 150m rowscidandtypare chosen randomly, uniform distribution.get_all(cid, :index => 'customer_id').groupby('type', r.count)#get a summary of user activity over all time
cidchosen randomly, uniform distributionWe also have the replica stuff that Slava mentioned, but we should get
everything else working first.
Tryneus commentedon Oct 9, 2013
Ok, the new stress client has been approved and merged into next. It provides workloads for each of the above traffic types. You run one invocation of the stress client for each traffic type, telling it how many clients, how many total ops/sec, and how many ops to do before creating a new connection. See test/rdb_workloads/README for a more in-depth description and some examples.
The stress client will then output on stdout the timestamp and latency of each operation when it completes, as well as any errors that occurred. When interrupted, the stress client will shut down and print a summary of the number of operations run and their average latency (on stderr, to not confuse anyone parsing the latency numbers on stdout).
thelinuxlich commentedon Oct 9, 2014
+1
danielmewes commentedon Oct 9, 2014
@thelinuxlich are there specific workloads you would like to see performance improve for?
I'm actually inclined to close this issue, because it's rather unspecific and pretty old.
In the longer term we should try to get workload X benchmarks run automatically and regularly, and then pick out specific areas that we believe need improvements.
thelinuxlich commentedon Oct 9, 2014
I'm just marking this issue to get updates because as I'm developing a analytics application which once in production will grow to billions of rows, I don't see many use cases like that for RethinkDB so I get a little afraid
danielmewes commentedon Oct 9, 2014
@thelinuxlich You should be able to subscribe to issues through the "Subscribe" button, that should show up below the Labels, Milestone and Assignee on the right in GitHub.
I'm going to open another issue about running workload X regularly. I will post the issue number here once that's done and then close this one.
thelinuxlich commentedon Oct 9, 2014
Ok, thanks for the tip!
danielmewes commentedon Oct 9, 2014
Tracking running workload X on a regular basis in issue #3168.
Closing this issue because it lacks specific actionable items.