Author

Topic: Outbound and inbound connections bitcoind 0.9.2.1 (Read 1098 times)

hero member
Activity: 490
Merit: 500
I recently bought 8gb RAM when I realised bitcoin core was using ~850mb of the 4 gig I had installed.

The upgrade cost me £45 for some decent Corsair gaming RAM (not top of the line, but not bad).

The way I see it: if you are willing to spend $500 on a bitcoin then it's the least you can do to support the network and help decentralisation. Even if you're a small fish in a big pond.

Yes, I agree with you. I do care about bitcoin and want it to succeed, even if my help is small, much small help makes a great thing! Upgraded my VPS and is running with 14 connections right now. Only have 1GB of ram, but I hope it is sufficient for now. So far, so good. Thanks and have a nice day!
sr. member
Activity: 294
Merit: 250
I recently bought 8gb RAM when I realised bitcoin core was using ~850mb of the 4 gig I had installed.

The upgrade cost me £45 for some decent Corsair gaming RAM (not top of the line, but not bad).

The way I see it: if you are willing to spend $500 on a bitcoin then it's the least you can do to support the network and help decentralisation. Even if you're a small fish in a big pond.

hero member
Activity: 490
Merit: 500
There is a relationship between memory and connections but it is not linear and I doubt the memory requirements between a node with 20 connections and 5 connections is significant.  It is more likely that if you are constrained to a preset amount of memory then someday you won't be able to run a node with even a single connection.

Yes, I understand this. But in the future, I could always upgrade. For me it is most important that it works right now, there's also a financial aspect to this, as I run it on a shoe-string budget. Smiley This is a hobby project, and if I at one point chose to establish a commercial enterprise, there will be more hw investments of course.

  I believe there is a thread about running a node on a VPS.  I want to say 1GB is sufficient for linux and bitcoind having dozens of connections.   Maybe someone else can provide some details.  Honestly I don't like the idea of a node on a VPS and RAM is cheap on dedicated servers so I haven't had to look too hard.

I should upgrade from 512 to 1GB then, that's fair enough. It seems like that hosting in the US is where you get the best deals, but I wanted to host outside the US, as I think that would further contribute to the decentralization of the network. The node will not contain a bitcoin wallet that is funded, the balance will always stay at zero on that node, so i am not afraid of attacks where private keys can be recovered through shared memory with other vps'es for instance. The purpose is mainly as stated earlier, to learn.

The larger issue is bandwidth.  Due to luck of the draw (you get 8 peers who are bootstrapping on high bandwidth connections) it is possible for the bandwidth requirements to be insane.  Right now your only option is a third party tool to keep it in line.

That is a very good point Sir, I could see how that could be a problem. I am fine however with tuning bandwidth requirements with a third party tool.
donator
Activity: 1218
Merit: 1079
Gerald Davis
There is a relationship between memory and connections but it is not linear and I doubt the memory requirements between a node with 20 connections and 5 connections is significant.  It is more likely that if you are constrained to a preset amount of memory then someday you won't be able to run a node with even a single connection.  I believe there is a thread about running a node on a VPS.  I want to say 1GB is sufficient for linux and bitcoind having dozens of connections.   Maybe someone else can provide some details.  Honestly I don't like the idea of a node on a VPS and RAM is cheap on dedicated servers so I haven't had to look too hard.

The larger issue is bandwidth.  Due to luck of the draw (you get 8 peers who are bootstrapping on high bandwidth connections) it is possible for the bandwidth requirements to be insane.  Right now your only option is a third party tool to keep it in line.
hero member
Activity: 490
Merit: 500
It can't be changed without modifying the source.  I don't believe any such patch exists.   Honestly it probably isn't worth the effort.   The network collectively has a relatively large number of available inbound ports.  There are so many right now that most nodes don't ever reach their cap (125 by default).   So for someone which sets a number of connections below eight and wants to make some of those outbound you are talking what maybe 1 to 4 potential slots?  It isn't going to much a material difference. 

You really shouldn't be running with less than eight peers. If you need to control bandwidth then (until bitcoin core supports that) you should use a third party tool rather than run less than eight nodes.   Honestly eight is the bare minimum for optimal security you want to be well connected (dozens if not hundreds of connections).   With only a few connections an isolation attack become a more feasible scenario.

I understand. So the recommended way is to just upgrade and have more system resources and accept more connections?

I have read that blockchain.info has very many connections, and I assume the the reason for this is that they want to provide accurate information regarding the blockchain, and the fewer connections you accept, the larger the chance is that you are fed with bad data from malicious nodes?

When running a bitcoin node on a vps, how much ram is needed? Is it possible to run a node with 512MB ram (1GB burstable), or is it necessary/recommended with 1GB or higher amount of ram? I know the answer is 'it depends', but I assume that as the blockchain grows, that bitcoind will require more resources, I remember a couple of years ago I used to run a bitcoin node on a vps with 512mb ram without problems, but i am struggling doing the same now, as it constantly shuts down, and it is because of out of memory issues.

For the time being, there's no big fear of being fed inaccurate data on this node, so as such, having a low connection count is not that much of a big deal, the motivation is to educate myself, but I also was motivated about helping the network, as a while ago, there was talk about there being too few active bitcoin nodes, and that more was needed, so I though I would help in that regard. I am aware a single node run by a single person will not make much of a difference, but I am motivated to keep running the node for as long as I can and to upgrade whenever there are new bitcoind versions coming out.

Likewise I want to contribute to the decentralization of the bitcoin network, and as an independent node operator I feel I do contribute towards that goal. The contribution might be largely insignificant, but still to me it does matter, and I do think that if several persons think the way I do, we're better off.

But I realize I need to have more connections to contribute to the network in a meaningful way.
donator
Activity: 1218
Merit: 1079
Gerald Davis
It can't be changed without modifying the source.  I don't believe any such patch exists.   Honestly it probably isn't worth the effort.   The network collectively has a relatively large number of available inbound ports.  There are so many right now that most nodes don't ever reach their cap (125 by default).   So for someone which sets a number of connections below eight and wants to make some of those outbound you are talking what maybe 1 to 4 potential slots?  It isn't going to much a material difference. 

You really shouldn't be running with less than eight peers. If you need to control bandwidth then (until bitcoin core supports that) you should use a third party tool rather than run less than eight nodes.   Honestly eight is the bare minimum for optimal security you want to be well connected (dozens if not hundreds of connections).   With only a few connections an isolation attack become a more feasible scenario.
hero member
Activity: 490
Merit: 500
To my understanding, the first 8 connections are outbound, and then further connections are inbound by default, is this correct?

If for whatever reason a user selects to use maxconnections in bitcoin.conf, and set it to a smaller number than 8, does that mean that node only makes outbound connections and does not accept any incoming ones?

Would it be possible to set let's say maxconnections=6 in bitcoin.conf and then have 3 reserved for outgoing and 3 reserved for incoming or even only do outbound connections until node has catched up with the blockchain, and then reserve some of the connections for incoming requests to help the network?

If you wonder why anyone would want so few connections, an example would be when a bitcoind instance is run on a machine with little ram, but sufficient disk space.

Could this be achieved without altering the source code and recompiling the source code? And if the source code needs to be reconfigured, has anyone already done this and has a patch ready?



Jump to: