huge memory usage #4417

issue m4rkusxxl opened this issue on June 26, 2014
  1. m4rkusxxl commented at 2:37 PM on June 26, 2014: none

    The client (bitcoin-qt 0.9.2.1) is connected, up to date and ~307k transactions are processed.

    Cpu and hdd wise it is idling.

    Although it occupies a huge piece of the ram! Its at ~700 MiB! Its there right after the start. (So it didnt slowly climb.)

    For doing nothing thats way to much.

  2. laanwj commented at 2:50 PM on June 26, 2014: member

    Virtual memory or actual resident memory? What platform/architecture?

  3. m4rkusxxl commented at 3:21 PM on June 26, 2014: none

    Vm is even more: ~1.6 GiB but that is fine, I think. The ~700 MiB are rss. Linux amd64 (gentoo, if that matters).

  4. laanwj added the label Priority Medium on Jun 26, 2014
  5. kazcw commented at 6:59 PM on June 26, 2014: contributor

    How long after startup are you seeing that memory usage? My bitcoind (also gentoo/amd64, no qt) takes many hundred MB during startup while it's verifying the DB, then it drops down to ~180MB. It takes about ~500MB when it's been running for a several days.

    So initial memory usage (during startup) is quite high, and memory usage gradually builds up high, but I'm not seeing persistent memory usage from the start.

  6. m4rkusxxl commented at 8:23 PM on June 26, 2014: none

    I start the application, it takes about 25s until the main window appears and then the memory is already filled. (According to top and iotop bitcoin-qt is doing "nothing".) The memory is not freed after days of doing "nothing", just let it sit in the background. (Just the usual p2p work.)

  7. laanwj commented at 12:21 PM on June 27, 2014: member

    @m4rkusxxl Does this also happen if you start with -disablewallet?

  8. m4rkusxxl commented at 12:43 PM on June 27, 2014: none

    Memory usage is perhaps a little less but not significant.

  9. darkhosis commented at 9:34 AM on July 15, 2014: none

    mine (bitcoind w/ wallet disabled) was using 8GB of resident memory earlier, w/ 900 connections. data buffers? storing txes or blocks for peers that arent there anymore?

  10. m4rkusxxl commented at 9:44 AM on July 19, 2014: none

    For me the rss is used right from the beginning. Its not climbing over time. (At least not that I am aware of.)

  11. tuaris commented at 2:09 AM on August 16, 2014: none

    I am currently running into this issue on FreeBSD 9.2 64-bit. I have the connections limited to just 5, but the bitcoind process is using up all the system's RAM. It's currently at 1.4 GB and growing:

    bitcoinuser   1387   3.0 55.4 1388540 568276 ??  INLs 29Jul14   826:14.22 /usr/local/bin/bitcoind -conf=/usr/local/etc/bitcoin.conf -datadir=/var/db/bitcoin -noupnp -daemon -pid=/var/db/bitcoin/bitcoind.pid
    
    

    The system has only 2GB of RAM.

    CPU:  0.0% user, 15.6% nice,  4.3% system,  0.4% interrupt, 79.7% idle
    Mem: 584M Active, 152M Inact, 199M Wired, 23M Cache, 110M Buf, 13M Free
    Swap: 5120M Total, 933M Used, 4186M Free, 18% Inuse, 3720K In
    

    Here are some logs and process information http://venus.morante.net/downloads/unibia/other/debug.log.gz http://venus.morante.net/downloads/unibia/other/bitcoind_info

    I haven't restated the process yet, so if there is anything else I could collect I would be glad to.

  12. laanwj commented at 7:54 AM on August 16, 2014: member

    Nothing obviously strange going on in that log or process information, that I noticed at least.

  13. darkhosis commented at 7:41 AM on September 3, 2014: none

    I saved this as an image, so it'd be readable (formatting etc)

    1

  14. rifaterdemsahin commented at 11:53 AM on September 3, 2014: none

    We are having the same problem here. we are having bitcoin running at 1.4 GB on windows server 2012

  15. darkhosis commented at 12:34 PM on September 3, 2014: none

    machine 1 is now at 2272 (+139MB), machine 2 is at 1670 (+771MB).. time is 1225pm UTC.

    OK, a new block hit at around 1231pm UTC. Machine 1 went from 2270 to 2320MB, machine 2 went from 1674 to 1861MB. So machine 1 is apparently clearing a bit of RAM between blocks, but 2 is still gaining, possibly from more orphan transactions?

    This was block 31899, 925KB w/ 1313 transactions.

    (ed: fixed machine 1 total before block)

  16. darkhosis commented at 1:17 PM on September 3, 2014: none

    2323 and 1935MB respectively now, after 5 more blocks. 2nd one is still going up a bit. 476 and 423 connections respectively. Probably has something to do with buffering something in memory to each of those connections & not clearing ??

    So then people may see more memory usage than normal if Mothership.Aiur is still going around opening 30 or 40 connections to everyone

  17. laanwj added the label Resource usage on Feb 16, 2016
  18. laanwj closed this on Aug 26, 2016

  19. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-03 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me