Bitcoin Forum
May 21, 2024, 12:58:45 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Gentoo Hardened eats 3 GB of memory after closing Bitcoin Core  (Read 1151 times)
RAKK (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
February 26, 2016, 06:26:28 PM
Last edit: March 09, 2016, 07:35:04 AM by RAKK
 #1

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.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
February 26, 2016, 06:29:47 PM
 #2

sounds like this can help -> http://www.linuxatemyram.com/

Im not really here, its just your imagination.
RAKK (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
February 26, 2016, 07:54:38 PM
 #3

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.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
February 26, 2016, 07:56:15 PM
 #4

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).

Im not really here, its just your imagination.
RAKK (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
February 26, 2016, 10:17:09 PM
 #5

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.
RAKK (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
February 27, 2016, 06:57:44 PM
 #6

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.
RAKK (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
March 08, 2016, 10:05:32 PM
 #7

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.
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4186
Merit: 8421



View Profile WWW
March 08, 2016, 10:15:31 PM
 #8

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?
RAKK (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
March 09, 2016, 07:32:03 AM
 #9

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.
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4186
Merit: 8421



View Profile WWW
March 10, 2016, 09:20:43 AM
 #10

htop can sort by memory usage. Press M and see what process is using it...
RAKK (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
March 16, 2016, 06:27:12 AM
 #11

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!