Skip to content

Make write batching tunable again #207

Closed

Description

@coffeemug

Write batching (i.e. the way the cache flushes blocks) used to be tunable, but in the interest of shipping 1.3 release sooner, we removed ability to tune this and hardcoded the default to be as safe as possible. (I'm also not sure how smart we were in our defaults choices as far as performance goes, considering write performance of the current HEAD).

We should make the writeback tunable again (per-table), and see if we can pick better defaults.

Activity

  1. ghost assigned on Jan 10, 2013
  2. srh commented on Feb 12, 2013

    @srh
    Contributor

    Internally I'm making it possible to set the number of "disk acks" and number of "cache acks", where the number of disk acks cannot be greater than the number of cache acks required.

    Here's the thing: when we want any number of disk acks from a datacenter, we're going to want one replica to be flushing to disk ASAP with no delay, and that'll be the limiting factor for throughput (assuming CPU and other problems are cleaned up). So, configuring how we write to disk (flush immediately or flush after an interval) that will depend on whether the number of disk acks desired is nonzero. There's no reason for one machine in a datacenter to do slow flushing if the other's going full-speed (and that way we avoid having the cluster trying to figure out which machine has which responsibility).

    Anyway this means that the speedup between {2 cache acks, 2 disk acks} and {2 cache acks, 1 disk ack} is going to be relatively small, compared to what you get when you go full {2 cache acks, 0 disk acks}.

  3. coffeemug commented on Feb 25, 2013

    @coffeemug
    ContributorAuthor

    Moving to 1.5. Still requires a little work in the buffer cache and on the UI side.

  4. al3xandru commented on Feb 25, 2013

    @al3xandru
    Contributor

    Could we release this in 1.4 with a command line/config file option and then expose it in the UI?

  5. srh commented on Feb 25, 2013

    @srh
    Contributor

    No, the buffer cache stuff is the hard part.

  6. al3xandru commented on Feb 25, 2013

    @al3xandru
    Contributor

    Gotcha :-(

  7. coffeemug commented on Mar 22, 2013

    @coffeemug
    ContributorAuthor

    This will require collaboration with the web UI people (@neumino and @mglukhovsky) and @Tryneus for the CLI. Please coordinate with @srh on how to do this.

  8. neumino commented on Mar 26, 2013

    @neumino
    Member

    @srh can you ping me when the options are available in /ajax?

  9. srh commented on Mar 27, 2013

    @srh
    Contributor

    @Tryneus When are you changing ack_expectations_t, and in what branch?

  10. Tryneus commented on Mar 28, 2013

    @Tryneus
    Member

    @srh, branch is grey_207, review 312 is up for it. What happened to the sam_207 branch?

  11. coffeemug commented on Mar 29, 2013

    @coffeemug
    ContributorAuthor

    @srh -- what's the state of this issue?
    @neumino, @mglukhovsky -- what's the state of this on the web UI?

    This requires some lead time to connect all the pieces, could you guys all coordinate?

  12. neumino commented on Mar 29, 2013

    @neumino
    Member

    I've been waiting for @srh to finish the work on the server.

    I'm done with all my urgent issues (except maybe with #551) so I'll take care of it tomorrow - at least for the web ui part (without the server).
    Putting all the pieces together with the server should just be an ajax request to do, so it can be done really fast.

  13. srh commented on Mar 29, 2013

    @srh
    Contributor

    Waiting on grey_207 to be merged into the sam_207 branch, then we can have the ack expectations JSON adapter updated for @neumino.

  14. Tryneus commented on Mar 29, 2013

    @Tryneus
    Member

    Alright, grey_207 has been merged into sam_207 and pushed.

  15. coffeemug commented on Apr 1, 2013

    @coffeemug
    ContributorAuthor

    We should measure insert performance with this option turned on.

  16. 9 remaining items

  17. neumino commented on Apr 11, 2013

    @neumino
    Member

    I just realized that I forgot to update the logs with the new ack system. I'll do that tonight.

    I'll run a last set of tests tonight or tomorrow morning and we should be ready for the code review.

  18. neumino commented on Apr 11, 2013

    @neumino
    Member

    I just pushed an update for the web interface on michel_207_write_batching.
    As far as I know, everything that were using ack_expectation (logs, replicas, shards and issues) works now.

    @srh you can open a code review when you want.

  19. srh commented on Apr 11, 2013

    @srh
    Contributor

    @neumino: Presumably you should open the code review, if you want me to be the code reviewer.

  20. srh commented on Apr 11, 2013

    @srh
    Contributor

    The current status of this issue is that everything except for UI changes are in code review 375, in branch sam_207.

    The changes in michel_207_write_batching aren't part of that review, and can presumably be reviewed separately starting Thursday morning.

    It seems unlikely that there be lingering issues that make the review go past Friday.

  21. neumino commented on Apr 11, 2013

    @neumino
    Member

    The review for michel_207_write_batching is opened (review 377).

  22. coffeemug commented on Apr 11, 2013

    @coffeemug
    ContributorAuthor

    @neumino -- could you ping the reviewers via e-mail to make sure we get this in?

  23. neumino commented on Apr 11, 2013

    @neumino
    Member

    Done.

  24. neumino commented on Apr 12, 2013

    @neumino
    Member

    Review for the web ui has been completed.
    Everything is in branch michel_207_write_batching.

    It can be merged in next as soon as the review for the server is done.

  25. srh commented on Apr 12, 2013

    @srh
    Contributor

    Okay. I will merge it when the sam_207 review is done and ready to be merged.

  26. jdoliner commented on Apr 12, 2013

    @jdoliner
    Contributor

    This is in code review and I didn't budget my time well enough to be able to do it this week. I'll be doing it on monday.

  27. srh commented on Apr 16, 2013

    @srh
    Contributor

    This is merged into next as of 179cbc2.

  28. srh commented on Apr 16, 2013

    @srh
    Contributor

    Correction: michel_207_write_batching is merged into next as of ad9991f.

  29. added 2 commits that reference this issue on Aug 27, 2026
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