mesh-cli icon indicating copy to clipboard operation
mesh-cli copied to clipboard

High RAM consumption

Open samuel-rufi opened this issue 3 years ago • 9 comments

Hi @shrimalmadhur, I would like to give you a status update from my side: The very high RAM consumption due to the "memory_limit_disabled" = true hotfix for https://github.com/coinbase/rosetta-cli/issues/245 now is indeed a problem as rosetta-cli breaks down after some hours already with 16 GB RAM. Unfortunately I also can't run the rosetta-cli without "memory_limit_disabled" = true else it will break in the account bootstrapping phase as it can't handle large bootsrapping.json files https://github.com/coinbase/rosetta-cli/issues/245.

I guess it all comes back to the Badger Tx size / or how the Badger commits are done. Maybe this could be adjusted or are there other options?

Many thanks for your time and efforts.

samuel-rufi avatar Dec 07 '21 09:12 samuel-rufi

Hey @rufsam, thanks for raising this. Yea it does come back to tx size. We might need to optimize how we do badger transactions. I have not gotten a chance to work on it yet but it is in my radar.

Also feel free to contribute if you have some cycles and can work on resolving this. We always welcome contributions.

shrimalmadhur avatar Dec 07 '21 17:12 shrimalmadhur

Hi @rufsam , would you mind providing the bootstrap_balances.json with 35k accounts so we can repro this issue? Feel free to drop the file in your comments or email [email protected], whatever you prefer.

shiatcb avatar Dec 07 '21 20:12 shiatcb

Thanks alot @shrimalmadhur @shiatcb for your fast answers and help. This is the bootstrap_balances.zip I'm using. So after loading around 35k accounts the badger error should appear. If there is anything I can help you with, just tell me! 👍

samuel-rufi avatar Dec 07 '21 23:12 samuel-rufi

@rufsam thanks for the quick reply! Also are you able to provide the config for peering.json (devnet/mainnet) with multiaddress? I am now following the deployment procedure and trying to bring up node svc & rosetta svr.

shiatcb avatar Dec 08 '21 15:12 shiatcb

Hi @shiatcb, many thanks for working through it 👍 Maybe we should switch to e-mail so that I can provide you with better assistance. I will contact you with all the required info!

samuel-rufi avatar Dec 08 '21 16:12 samuel-rufi

My pleasure, you can email [email protected] whenever you have the info.

shiatcb avatar Dec 08 '21 16:12 shiatcb

Sent! 😄

samuel-rufi avatar Dec 08 '21 16:12 samuel-rufi

Hey! Just wanted to mention that we had a lot of problems with BadgerDB in our own project for years. After switching to RocksDB, memory usage dropped significantly, and speed also increased dramatically.

We implemented an Interface for our software called KVStore so we can switch the used database engine easily (gRocksDB, Badger, bbolt, pebbledb).

muXxer avatar Dec 08 '21 20:12 muXxer

@muXxer that's a very interesting point. Are there any data points which I can refer on how much improvement was there? If this makes us more memory efficient, we could definitely consider moving to RocksDB

shrimalmadhur avatar Dec 08 '21 22:12 shrimalmadhur