My problem is this. The recommended advice in order for geth to run a faster initial sync is to use the option --fast plus a non-default value for the option --cache. The option --cache appears to be necessary if you want the fast sync to progress beyond a few percent of the total block sync. For example, a "mere" value of --cache=512 allows geth to fast sync about half of the now over a million ethereum blocks before going down to regular sync, while --cache=768 leads to a fast sync of 700,000 blocks, suggesting a rough ratio of 1 MB RAM per fast sync'd block.

As regular sync is superslow, I'd like the fast sync to progress past the million-block mark. Unfortunately, a value of --cache=1024 leads to an out-of-memory crash. Is there a way to do a fast initial sync without geth consuming gobs of memory?

  • @NikhilM: Where is this option documented? I can't find it in the online reference or the built-in help. The closest I can see is --minerthreads, which is obviously related to mining rather than syncing?
    – oom
    Mar 15, 2016 at 14:26
  • Yeah, you're correct, i might misread the question. cache is the way to go i guess but i see some improvement when i adjust the peers please try that too.
    – niksmac
    Mar 16, 2016 at 1:23
  • I don't think you need to sync before you trade.
    – niksmac
    Apr 29, 2016 at 2:34

1 Answer 1


--cache N is exactly as it sounds. It throws N megabytes right into RAM instead of directly to the disk. The only way to avoid an out of memory error is to free up memory on your machine.

So basically, kill all other programs you have no use for or install more system memory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.