Bitcoin Forum
November 07, 2024, 01:22:48 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Memory  (Read 880 times)
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 503



View Profile
June 25, 2015, 06:12:52 PM
 #1



My fullnode was killing processes left and right for the past week until I noticed bitcoind was gobbing all 4GB... uptime was maybe 6 months.

For SSD setup's with no swap; what can be done to sustain bitcoind longer in terms of memory usage?

BANKBOOK GWT Wallet & no-FIAT Billing API
altcoinex
Sr. Member
****
Offline Offline

Activity: 293
Merit: 251


Director - www.cubeform.io


View Profile WWW
June 25, 2015, 08:56:01 PM
 #2

Quoted From: https://bitcointalk.org/index.php?topic=765934.0

I would like somebody more familiar with the bitcoin core client to tell me if it's possible to basically recompile bitcoin-qt(or just the daemon) with various changes to reduce the memory footprint to the bare minimum, say below 400mb at all times, while still retaining mining capabilities, e.g I want to mine solo, but not having to worry about the excessive use of ram by the client. Usually it's over 800mb, and I daresay I want it below 200.
Git master, -dbcache=4, -rpcthreads=1 -dnsseed=0 -discover=0  -par=1  Uses about 200MBytes on x86_64, maybe getting up to 250 with long uptime and a lot of connections. If you are wallet disabled it'll be another 30mb below that.  Reducing the connection count may make it a bit smaller.  In general, I advise against having inbound connections from the general internet on a node thats mining (e.g. set -listen=0 which will also helpfully limit your connection count as a side effect). Running the relay network daemon is advisable.

In general the defaults are not well tuned for low memory— considering that 1GB ram costs about $10 marginally... and a bit of extra caching is worth it when the memory is available.

The fact that you're saying "usually over 800mb" suggests that you might be confusing virtual address space with memory usage. Virtual address space does not consume any actual memory (not in swap either). The processes memory map is not contiguous, e.g. there are regions of allocated memory in seas of non-allocated address space. Be sure you're measuring the right thing.

Though several hundred megabytes per tab? Might want to reconsider what browser you're running. I apologize that it's a little difficult to run a whole world wide digital currency with memory usage comparable to one or two tabs in a web-browser. Smiley

Mine on git master at your own risk, though— no warranties are provided generally, but even less so on git master.


                                     ╓╢╬╣╣╖
                                   ┌║██████║∩
                                   ]█████████
                                    ╜██████╝`
                                      ╙╜╜╜`
                                   ╓╥@@@@@@╥╓
         ╓╖@@╖,                 ,@║██████████╢@,                 ,╓@@╖╓
       ╓╢██████╢.              ╓╢███████████████╖               ║╢█████║╓
       ║█████████    ,,╓╓,,   ┌║█████████████████┐   ,,╓╓,,    ]█████████
       └╢██████║` ╓╢║██████╢║∩``╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙`»╢╢██████╢║╖  ║███████╜
         "╜╜╜╜` ╖╢█████████╣╜                      └╢██████████@ `╜╜╜╜╜
               ║██████████╜                          ╙╢██████████
              ┌█████████╜                              ╙╢█████████
              └███████╨`                                 ╜████████
               ║████╨╜                                    `╢█████
                ╙╢╣╜                                        └╢█╜
                ,,                                            ,,
             ╓@║██┐                                          ┌██║@╓
            ╢██████                                          ]█████H
           ╢███████∩                                        ┌████████
  ╓@@@@╓   █████████                                        ║████████`  ╓@@@@╖
╓╢██████║. █████████∩                                      ┌█████████ ,║███████╖
██████████ └█████████                                      ██████████ ]█████████
`║██████╜`  └╢████████                                    ┌███████╣╜   ╙██████╨`
  `╙╜╜╙`      `╙╨╢████                                    █████╝╜`       `╙╜╜`
                      ]@╓                              ╓╖H
                      ███╢║@╓,                    ,╓@╢╢███`
                      ████████╢@╖╓.           ╓╖@║████████`
                      ]███████████╢║@╓,  ,╓@╢╢████████████
                       ╙╢█████████████╨` ╜██████████████╜
                         ╙╝╢███████║╜`    `╜║████████╝╜`
                     ,╓@@@╓  `²╙``             `╙²`  ╓@@@╖,
                    ║╢█████╢H                      ╓╢██████H
                    █████████                      █████████`
                    ╙╢██████╜                      ╙╢██████╜
                      └╨╩╝┘                          └╨╩╝╜
WINFLOW.
██
██
██
██
██
██
██
██
██
██
██
██
██
..
██
██
██
██
██
██
██
██
██
██
██
██
██
.
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4270
Merit: 8805



View Profile WWW
June 25, 2015, 11:56:15 PM
 #3

No offense intended, but you really need to read http://catb.org/~esr/faqs/smart-questions.html   as, for all the time you spend photoshopping the cute image you question doesn't offer a single one of the essential details needed to begin a useful answer.  Asking technical support questions is skill which you can improve and which is critically useful.

In particular--

1. What version are you running? Where did you get it from? Old versions have known memory usage issues which have been fixed, spending further time on this is pointless if you're running an old version. Likewise some parties distribute patched versions with different behavior.
2. What operating system are you on and what version?
3. How are you measuring memory usage?  People often confuse virt and actual used memory. Virt includes memmaped files.
4. Is your system exposed to the internet (e.g. could someone be DOS attacking it.)
5. What patches or settings are you running the software with and are you using the node for anything or just leaving it running?

FWIW, as an example my mining node which has been running a self-compiled copy of 0.10.2 continually since a day before 0.10.2's release on 64bit lLnux and standard dbcache seeings has a current resident size of 701MB.
Reynaldo
Legendary
*
Offline Offline

Activity: 1143
Merit: 1000


View Profile
June 26, 2015, 12:21:12 AM
 #4

Add to your setup a 16 GB HDD with SWAP;
http://mywayonlinux.blogspot.com/2014_05_01_archive.html

You can add 2 x 8 GB usbs
one for /tmp and one for /var, if they wear out after 1-2 years you just need to buy more usbs and this will save your hd life.
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 503



View Profile
June 26, 2015, 10:21:10 PM
 #5

I still run the heart bleed version.

When linux starts shooting processes in the head that usually means actual usable memory is missing.

All other questions can be answered conservatively.

I don't think I have ever seen a bitcoind without memory leaks, which is really concerning since it powers a 3 billion economy; but let's focus on the cute image so we can feel a little bit better.

BANKBOOK GWT Wallet & no-FIAT Billing API
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!