Cockroach memory usage hitting 80% of physical RAM on 32GB node

Hello
We are using cockroach-beta-20161103.linux-amd64 in a 3 node cluster.

We are observing that cockroach db is using 25GB memory and not respecting the 25% limit

Any recommendations on what settings we can tweak to have a hard limit on its memory usage as well as what version we should move to?

Thanks

Could you give a bit more detail on how you’re measuring memory usage, what command line flags and environment variables you’re running the cockroach node with?

Do you observe this behaviour on all three nodes, or just one?

Finally, there was a huge number of issues fixed in beta-20161201, so you may wish to use that release instead. See Release Notes for Beta-20161201.

thanks for the quick response… we will move to beta-20161201 and share details…

The 25% limit is for the rocksdb cache, which is not the only user of memory, so it’s expected that the total memory footprint of CockroachDB will be greater than 25% (Some of the other uses of memory are documented in this blog post: https://www.cockroachlabs.com/blog/memory-usage-cockroachdb/). I’d be surprised to see it reach 80% memory usage while idle, although if it’s under load that could be reasonable.

We’ve recently introduced the flag --max-sql-memory (which also defaults to 25% of physical memory), which you can use to limit the working memory used for query processing.