tigerbeetle icon indicating copy to clipboard operation
tigerbeetle copied to clipboard

TigerBeetle crashes on startup for lower RAM systems

Open shrsv opened this issue 1 year ago • 4 comments

Hello,

I was trying out TigerBeetle quick start guide on a server with 2 GB of RAM.

Instead of complaining that the available RAM is insufficient, the program tries to carry on and ultimately gets killed by OOM.

Took me a while to debug that it is indeed the OOM which is causing this.

The issue went away once I added 4 GBs of swap.

I believe the following will improve the first-time trial experience to your potential users:

  1. For quickly trying out the DB, loosen the RAM requirements
  2. If (1) is not possible, then handle the situation gracefully on startup, provide a helpful message to the user on what they can do (swap or increase ram)
  3. Highlight the minimum RAM requirement in the quick start guide

shrsv avatar Jun 28 '24 05:06 shrsv

(1) is already complete and will be part of the next release: https://github.com/tigerbeetle/tigerbeetle/issues/1884

sentientwaffle avatar Jun 28 '24 13:06 sentientwaffle

Sounds great - looking forward to the release @sentientwaffle

shrsv avatar Jun 28 '24 14:06 shrsv

@dineshtrivedi I thought you might be interested in this financial database 👍🏾

shailen-naidoo avatar Jun 30 '24 16:06 shailen-naidoo

From the description of the op, I take it that tigerbeetle didn't fail immediately on startup, presumably because of overcommit on linux. Since tigerbeetle knows exactly how much memory it will ever need, I wonder if it can defeat overcommit (maybe with the MAP_POPULATE mmap flag) and fail in a nicer way. It might also make sense to mlock all the memory into RAM.

brson avatar Jul 10 '24 16:07 brson