Author

Topic: Gentoo Hardened eats 3 GB of memory after closing Bitcoin Core (Read 1166 times)

newbie
Activity: 8
Merit: 0
htop can sort by memory usage. Press M and see what process is using it...
No visible processes as shown here.
https://i.imgur.com/pDVpbTo.png

Also, there is what appears to be that common Linux problem where kswapd eats an entire CPU core, though in my case this can be explained by that ghost process eating all of my RAM.

I also tried "echo 1 > /proc/sys/vm/drop_caches" as suggested in some threads about this issue. Nothing happened, neither with 1 nor with 3.
staff
Activity: 4284
Merit: 8808
htop can sort by memory usage. Press M and see what process is using it...
newbie
Activity: 8
Merit: 0
Same kernel on my laptop, never seen anything like what is being described here.

How are you measuring "eats 3GB memory"-- are you just getting confused by the page cache?
Again, it is not the page cache, it shows up on htop, GKrellM and top as memory claimed by a process. These tools account for buffers and caches and they show my RAM as claimed by a process.
staff
Activity: 4284
Merit: 8808
Same kernel on my laptop, never seen anything like what is being described here.

How are you measuring "eats 3GB memory"-- are you just getting confused by the page cache?
newbie
Activity: 8
Merit: 0
More updates on this issue:

Seeing as Bitcoin Core 0.12 is not going to hit Portage anytime soon, I decided to manually compile it and install it separately. It didn't work. Bitcoin Core 0.12 is still causing my kernel to keep eating RAM after closing Bitcoin and still causes a kernel panic after running it for over 8-ish hours.
newbie
Activity: 8
Merit: 0
Update: Right now, after closing the Bitcoin Core client and still staying with 2 GB of taken RAM, a few minutes later my RAM usage suddenly went back to normal. What I did in the meantime was issuing emerge -aNDu --with-bdeps=y @world after globally enabling USE="X" on make.conf, opening a screen session as ROOT and starting nmon, htop and iotop, and cleaning up remnants of a failed Chromium build on /var/tmp/portage. Based on these actions I'll attempt to reproduce what made my system suddenly release all that taken RAM.
newbie
Activity: 8
Merit: 0
Could it be the number of unconfirmed TX that pile up in your mempool? If so, upgrade to 0.12 as it stops that (by default the cap is at 300 MB).
Could be. Only recently did I notice that Gentoo doesn't have a more recent version marked as stable. Sadly, since this version is very recent that means I might have to wait a bit while Gentoo accepts version 0.12 on its package manager.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
That's not my case though. My memory is not eaten by any such thing as disk cache (GKrellm and htop account for it), it appears and is handled as taken by a program, as if Bitcoin Core was still running. To give you an idea, keeping Bitcoin Core open for about 8-12 hours results in a kernel panic because Linux just keeps allocating more and more memory to program usage without freeing it.

Could it be the number of unconfirmed TX that pile up in your mempool? If so, upgrade to 0.12 as it stops that (by default the cap is at 300 MB).
newbie
Activity: 8
Merit: 0
That's not my case though. My memory is not eaten by any such thing as disk cache (GKrellm and htop account for it), it appears and is handled as taken by a program, as if Bitcoin Core was still running. To give you an idea, keeping Bitcoin Core open for about 8-12 hours results in a kernel panic because Linux just keeps allocating more and more memory to program usage without freeing it.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
newbie
Activity: 8
Merit: 0
I'm running Gentoo Hardened AMD64 using kernel 4.3.3-hardened-r4. After keeping the Bitcoin Core 0.10.1.0 client opened for about 5 hours, Linux eats a lot of RAM. I know for one that Bitcoin Core is pretty memory-intensive so I thought closing it would free my memory, but it didn't. This is not due to filesystem cache, kernel-managed buffers and stuff; every single tool I've used that does account for that kind of "taken but free" memory shows my entire RAM as claimed by a process.

After closing it, Linux keeps eating almost 3 GB of RAM with hardly any process opened except for X, uxterm, my window manager, GKrellM, basic system services like cron, DHCP or wpa_supplicant, a bunch of BASH shells, and hardly more than 600 KB saved to tmpfs filesystems.

If I keep Bitcoin Core running for about 8-12 hours, my system just runs out of memory and throws a kernel panic.

A manually compiled and installed instance of Bitcoin Core 0.12 still presents the same issue.

As you can see here, I have hardly any processes opened save for Firefox, X, GKrellm, my window manager (wmaker) and some BASH sessions:
http://i.stack.imgur.com/uGUOk.png

Any idea of where is my free memory going?

Update: Right now, after closing the Bitcoin Core client and still staying with 2 GB of taken RAM, a few minutes later my RAM usage suddenly went back to normal. What I did in the meantime was issuing emerge -aNDu --with-bdeps=y @world after globally enabling USE="X" on make.conf, opening a screen session as ROOT and starting nmon, htop and iotop, and cleaning up remnants of a failed Chromium build on /var/tmp/portage. Based on these actions I'll attempt to reproduce what made my system suddenly release all that taken RAM.
Jump to: