Title: maxconnections and memory usage Post by: tuaris on November 12, 2014, 01:25:49 PM I found this page https://gist.github.com/laanwj/efe29c7661ce9b6620a7 and it says
Quote -maxconnections=<n> - the maximum number of connections, this defaults to 125. Each active connection takes up some memory. Only significant if incoming connections are enabled, otherwise the number of connections will never be more than 8. The part that I am most interest in is, Each active connection takes up some memory. Only significant if incoming connections are enabled. How much memory would each connection need/use? It doesn't seem that limiting it to values lower than 10 reduce the memory usage much further according to my results. Take for example, a Bitcoin and an altcoin (TekCoin) daemon: The configuration is limited to 3: Code:
Bitcoin is currently connected to 3 peers: Code:
The memory usage Code: 1702 nobody 13 22 2 720M 304M uwait 653:12 0.00% /usr/local/bin/bitcoind -conf=/usr/local/etc/bitcoin.conf -d For my altcoin, I have limited it to 10 Code:
It currently has 8 peers connected Code:
The memory usage Code: 29953 nobody 11 52 20 414M 345M wait 1 4:10 4.93% /usr/local/bin/tekcoind -conf=/usr/local/etc/tekcoin.conf I currently have all my coin daemons limited to 3 connections thinking it will save RAM, but it looks like I may not be. Also, is it true that if I have it limited to a value less than 8, then the daemon will not accept incoming connections? Title: Re: maxconnections and memory usage Post by: tuaris on November 13, 2014, 12:38:01 AM Some more experimenting with memory usage. I've increased the maxconnections to 15 and there are currently 12 peers
Code: 62753 nobody 10 45 20 418M 346M uwait 1 18:31 5.96% /usr/local/bin/tekcoind -conf=/usr/local/etc/tekcoin.conf The memory usage appears to have gone up only by a few kilobytes. So it looks like each connection uses a very small amount of resources. |