<p>Bitcoind can be quite memory hungry and bandwidth hungry. If you're swapping a lot, definitely add more memory.</p>

<p>You may also consider using an external API like:</p>

<p><a href="http://dev.blockcypher.com/#blockchain-api" rel="noreferrer">http://dev.blockcypher.com/#blockchain-api</a></p>

<p>Bitcoind itself is actually quite hard to scale out.</p>

CC BY-SA 3.0
2014-04-29T18:10:16.190Z
2014-04-29T18:10:16.190Z
Matthieu
<p>I am data mining the blockchain using JSON/RPC on a bitcoind full node with txindex (0.9.1).</p>

<p>I have 64 RPC connections simultaneously going to bitcoind from a remote client. My workload is mostly getrawtransaction and decoderawtransaction. I have bumped rpcthreads to 64.</p>

<p>What I am observing though is that bitcoind is taking a very large amount of time (from 30 seconds to 2-3 minutes) to respond to each call.</p>

<p>I have verified that there are about 66 connections opened on the RPC port, and the bitcoind process has 73 threads, so that seems to confirm that both my load and the rpcthreads setting are correct.</p>

<p>If I query something like "help", I get the same slow response time, so it seems to be related to the RPC server rather than actually accessing the data from disk/memory.</p>

<p>Am I missing a setting to make it scale?</p>

CC BY-SA 3.0
2014-04-29T13:47:43.200Z
What is the cpu load on the server? How about the memory usage; are you swapping? Bitcoind is not particularly optimized for performance so it's conceivable that it is just that slow.
Nate Eldredge
CC BY-SA 3.0
2014-04-29T13:51:16.180Z
CPU is ok, but the memory usage is high, I see quite a bit of swapping. I will allocate more RAM to the machine and see if that makes a difference.
Flavien
CC BY-SA 3.0
2014-04-29T20:55:57.673Z
When you have a use case that is very different from what everyone else uses a piece of software for, it's not unusual to see pathological performance behavior. You may want to profile the running instance and see if there's any obvious optimizations that help with your particular use case.
David Schwartz
<bitcoind><json-rpc>
Bitcoind JSON/RPC extremely slow under load
Flavien
# Bitcoind JSON/RPC extremely slow under load

(Asked by: username_0 on 2014-04-29)

I am data mining the blockchain using JSON/RPC on a bitcoind full node with txindex (0.9.1).

I have 64 RPC connections simultaneously going to bitcoind from a remote client. My workload is mostly getrawtransaction and decoderawtransaction. I have bumped rpcthreads to 64.

What I am observing though is that bitcoind is taking a very large amount of time (from 30 seconds to 2-3 minutes) to respond to each call.

I have verified that there are about 66 connections opened on the RPC port, and the bitcoind process has 73 threads, so that seems to confirm that both my load and the rpcthreads setting are correct.

If I query something like "help", I get the same slow response time, so it seems to be related to the RPC server rather than actually accessing the data from disk/memory.

Am I missing a setting to make it scale?

**Tags:** bitcoind, json-rpc

> **Comments:**
> **username_1**: What is the cpu load on the server? How about the memory usage; are you swapping? Bitcoind is not particularly optimized for performance so it's conceivable that it is just that slow.  
> **username_0**: CPU is ok, but the memory usage is high, I see quite a bit of swapping. I will allocate more RAM to the machine and see if that makes a difference.  
> **username_2**: When you have a use case that is very different from what everyone else uses a piece of software for, it's not unusual to see pathological performance behavior. You may want to profile the running instance and see if there's any obvious optimizations that help with your particular use case.  

---

## 1 answers

### Answer by username_3 on 2014-04-29. Score: 5 | Accepted answer

Bitcoind can be quite memory hungry and bandwidth hungry. If you're swapping a lot, definitely add more memory.

You may also consider using an external API like:

<http://dev.blockcypher.com/#blockchain-api>

Bitcoind itself is actually quite hard to scale out.


---

