Skip to content

Make temporary OOM killer fixes #98

Closed

Description

@coffeemug

Until we get to #97, we should do some temporary fixes to decrease the likelihood that the OOM killer will pick rethink as a target.

  • Lower default cache size
  • Have the bug report tool grep through the logs to see if the cause of the crash is OOM killer

Activity

  1. mlucy commented on Nov 21, 2012

    @mlucy
    Member

    I'm not sure we actually have to lower the cache size. Anyone with a few gigs of RAM should be able to create hundreds of tables right now, which is enough for almost all normal use cases.

  2. jdoliner commented on Nov 21, 2012

    @jdoliner
    Contributor

    I think thatchanging the default cache size is not the answer here.

    Basically what we're worried about is how this is going to work for people out of the box. Anyone who is seriously administering this software is going to make sure not to run afoul of the oom. We've had a few cases of people running afoul of it in really low memory settings and to accommodate those and not crash we'd need to run with a cache that's somewhere around 50MB which is really going to slow things down. There's definitely a cost to being slow out of the box by default if someone is sitting there watching a query that takes less than a second in mongo take 50 in RethinkDB that is going to matter. Bad first impressions easily become last impressions.

    Grepping through the logs is doable but obviously very very unportable but we can probably do that.

    Overall this sucks but when an operating just sends you a sigkill with no warning they put you in a tough spot and I don't think we have a great option here.

  3. coffeemug commented on Nov 21, 2012

    @coffeemug
    ContributorAuthor

    Yeah, I agree that the cost to making this work out of the box on low-memory systems may be too high. I don't think the assertion that "anyone who is seriously administering software will understand this" applies though -- most people are downloading rethink to try it on their dev systems, so they don't necessarily have the operations experience to understand (or even know about) the OOM killer.

    Another alternative is to make the default cache size on table creation be a well defined function on amount of available memory. I'm not sure if I like this, but it's an option.

    And of course the last option is to bite the bullet and wait on #97.

  4. al3xandru commented on Nov 27, 2012

    @al3xandru
    Contributor

    IMO an OOM is worse than being slow on systems with low-memory. Moreover so when we said in our FAQ: "It has a custom caching engine and can run on low-memory nodes with large amounts of on-disk data,"

  5. coffeemug commented on Nov 27, 2012

    @coffeemug
    ContributorAuthor

    The problem here isn't being slow on systems with low-memory conditions. The problem is being slow on systems with plenty of memory because we picked a poor default to avoid getting killed on low-memory systems. We need to do a bit of engineering work to make this happen (by making the caching system be able to steal cache memory from other tables properly).

    So it's really a question of picking a good interim default until we get the dynamic caching system done (the system can always be configured to work properly, it's just a matter of a default option).

  6. al3xandru commented on Nov 27, 2012

    @al3xandru
    Contributor

    Shouldn't the default be some percentage of the system available memory and not a fixed number?

  7. jdoliner commented on Nov 27, 2012

    @jdoliner
    Contributor

    @al3xandru Well which percentage?

  8. al3xandru commented on Nov 27, 2012

    @al3xandru
    Contributor

    @jdoliner unfortunately I don't know the very deep details of our implementation to come up with a number, but I think one exercise that could lead us to a possible good number is:

    1. what are the components of the system that require fixed amounts of memory?
    2. what are the components that boost the speed of the system when having more memory?
    3. which of these components share memory and which ones require their own memory?
    4. which of these components are created as per an user action? (database, table, etc.)

    This will not give us the "perfect" number, but could give us an estimated default. The next possibility is that we could allow an user to configure this differently.

  9. jdoliner commented on Dec 6, 2012

    @jdoliner
    Contributor

    Closing because we can't figure out sane temporary fixes that won't impact default performance. Instead we'll be making non temporary fixes for this problem.

  10. added 4 commits that reference this issue on Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions