Skip to content

Automated performance regression tests #1806

Closed

Description

@danielmewes

We have had a couple of performance regressions. Most recently #1733

The new cache #1642 is likely to also have some impact on performance.

I think it is fair to assume that we are currently missing a lot of performance problems and regressions, and that we will continue to do so unless we do something about it.
Therefore I believe that we should get some automated performance regression tests together asap.

I propose that we do something quick&dirty at first. Then, post LTS (or once we hire a second reliability engineer), we can design a better system.

I imagine something of the following kind:

  • Run workload X for ~15-30 min as a quick but incomplete test of overall system performance
  • Have the following four basic scenarios:
    • in-memory data set [1] with small (inlined) documents
    • in-memory data set [1] with large documents
    • out-of-memory[2] data set [1] with small documents
    • out-of-memory[2] data set [1] with large documents
  • For each scenario, have approximately one test per ReQL term. E.g. check the performance of count, of map, of pluck, of getAll etc.
  • Maybe also some very basic tests with for each client, e.g. a table scan, inserts, and point reads or something like that in each of Ruby, Python and JavaScript

These tests should be enough to tell us when we break (performance-wise) the implementation of some term. It also implicitly tests the cache and serializer.
Furthermore it is simple enough that we can put it together and have it running in 2-3 days. I'm thinking of a set of very simple scripts, no fancy framework, no boiler plate.

What I think we should NOT do now

  • clustering performance
  • compositions of queries (other than what's in workload X)
  • meta data things
  • web interface performance
  • lots of different data sets
  • a comprehensive and extensible testing framework
  • fancy reporting. Just a file with QPS and/or average latency as its output.

I'm literally thinking of an implementation which works for this specific set of tasks, and which we can throw away once we do it properly.
Doing so has the following advantages:

  • We have something that avoids 70% of performance regressions.
  • We have that something very quickly.
  • It allows us to tag LTS with a clean consciousness when it comes to performance
  • It allows us to learn more about what we really need from an automated performance testing framework, so we can hopefully get it right when we design a proper one later.

Thoughts, suggestions?

[1] The data set should be large enough to span multiple internal batches when we run range queries on them.
[2] The out-of-memory data sets would be the same as the in-memory ones, just with a smaller cache size limit.

Activity

  1. coffeemug commented on Dec 31, 2013

    @coffeemug
    Contributor

    I think a minimum viable product for a performance regression harness is a wonderful idea and I completely agree with the approach you outlined here. I do recall @Tryneus working on a set of really simple workload X scripts, so it might be worth salvaging those for the performance harness.

  2. ghost assigned on Jan 13, 2014
  3. neumino commented on Jan 14, 2014

    @neumino
    Member

    Do we want to run one query at a time here? Or can we fire multiple queries at the same time?

    @coffeemug, @danielmewes -- any thoughts on this?

  4. danielmewes commented on Jan 14, 2014

    @danielmewes
    MemberAuthor

    I think one at a time is what we want here.

    While firing multiple ones at a time is good for measuring the maximal throughput of the DB in a benchmark, it is not so great for detecting regressions. The numbers are more difficult to interpret and are influenced by a lot of things that have nothing to do with the specific query.

  5. coffeemug commented on Jan 14, 2014

    @coffeemug
    Contributor

    Agree with @danielmewes. The purpose of this suite is to notice regressions for individual command performance, which is much easier when queries run one at a time.

  6. neumino commented on Jan 29, 2014

    @neumino
    Member

    Up in review 1161 assigned to @danielmewes
    It tests all terms except the meta queries (dbCreate/tableCreate etc.)

    @danielmewes, I don't really know which machines are available for running this test, but if you want to set up a cron job, let me know.

  7. AtnNn commented on Jan 29, 2014

    @AtnNn
    Member

    @neumino Adding it to jenkins would be better than a cron job. I can help you do that.

  8. danielmewes commented on Jan 29, 2014

    @danielmewes
    MemberAuthor

    @neumino Great work! I'm glad we finally have this.
    @neumino @AtnNn: A Jenkins job would be cool. However we would have to make sure that it is run on the same machine each time. Can jobs be pinned to specific machines? Also we should pick a machine which is usually idle at the time of testing (deadshot maybe).

  9. AtnNn commented on Jan 29, 2014

    @AtnNn
    Member

    Yes, jobs can be pinned.

  10. neumino commented on Feb 19, 2014

    @neumino
    Member

    I merged in next as dd87bcf because it's already useful to @danielmewes

    I'll open another issue for the things I want to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions