4

I'm trying to get monerod up and running on a VPS with 1gb of RAM. My understanding is that once the chain is synced, monerod's memory usage should be quite reasonable. However, during the initial blockchain sync process, it is outgrowing the 1gb limit.

A search on here and on reddit turned up a recommendation to use ulimit. However, when I type: ulimit -v 1000000 to constrain the virtual memory to 1gb of RAM, monerod won't even start, complaining that there isn't enough memory to do its initial allocation.

1gb of RAM is supposed to be within the minimal requirements for Monero, so what is the correct way to constrain memory usage?

puzzler
  • 263
  • 1
  • 9

1 Answers1

1

During sync, Monero will add chunks of 200 blocks at a time. The speedup gained from this quickly goes into diminishing returns as the chunk size grows, but the memory usage grows linearly, so it's possible to decrease that chunk size with the --block-sync-size N parameter. A plausible value for N is 20 instead of 200, and the speed will be similar (if you're memory starved, it could even be faster since your machine might stop swapping if it was doing so with the defaults).

user36303
  • 34,928
  • 2
  • 58
  • 123