Technical doubt - Memory used by CockroachDB


I’m a new Cockroach user and I’d like to ask a technical doubt that I’m dealing with.
I’m running a server and it uses cockroach. Both services are running on Ubuntu 20.4 with 1 GB RAM + 300 GB HDD. The problem that I’m having with cockroach is that it’s killed by the OS -or other process- after some hours of executing. And I’m not sure why it’s happening.

After some research, I think it’s because it’s consuming more memory than expected. My VM has only 1 GB RAM. Is possible to run a CockroachDB with only 1 Node in Ubuntu with 1 GB RAM ?

On the official webpage, I read that I can use these parameters to limit the memory usage: cache and max-sql-memory. So, I tried to run the server using these parameters:

cockroach start --cache=.10 --max-sql-memory=.10 --certs-dir=certs --store=node1 --listen-addr=localhost:26257 --http-addr=localhost:8080 --join=localhost:26257

However, after some hours of executing, the DB stopped the execution again.
I know that 1 GB of memory is very poor - but I’d like to know if there’s any chance to run cockroach using this kind of virtual machine.

Note: I’m supposing that the problem is related to the memory - but to be honest, I’m not sure.

We recommend a minimum of 4GB of ram per node: Production Checklist | CockroachDB Docs

It may be difficult to get Cockroach to work with only 1 GB of ram.

Can I recommend checking out Cockroach Cloud Free Tier? It might be suitable for your needs.


@jordan thanks for your answer.
I’m not interested in Cockroach Cloud Free Tier because it’s only for 1 month and I already paid a VPS for a year. But I can’t have more than 1 GB RAM for the moment.

Is there any recommendation you can give me in order to get cockroach run with 1gb ram?


Cockroach Cloud Free Tier is free forever. It’s different from the original free coupon that we gave out for Cockroach Cloud Dedicated.

I don’t have a recommendation for how to run cockroach on 1 gb of ram, sorry.