<p>When you use the Bitcoin client for the first time, the client has to download the whole Bitcoin blockchain from the network. This can really (really!) take a while and because it is stored in your homefolder and therefore has to be encrypted, this take some CPU power as well. </p>

<p>Apart from this, while your client runs, it helps verifying new transactions offered to the network, just like every connected Bitcoin client does, these calculations can take CPU power as well.</p>

<p>What CPU does your machine have?
You can try to use clients like <a href="http://multibit.org/" rel="nofollow">MultiBit</a> that do not download the whole blockchain, but only the part that is relevant to your coins.</p>

CC BY-SA 3.0
2012-06-21T14:56:17.127Z
I don't think there's compression going on.  What takes the CPU time is verifying the signatures on all transactions newer than the newest snapshot.
Chris Moore
CC BY-SA 3.0
2012-06-21T15:08:28.310Z
I was quite sure I read somewhere that the older parts of the blockchain were stored is a compressed way. Although doing some search I cannot find the source I got this from.
If it would not be true, I'm sorry, but I really thought it was true :)
Steven Roose
CC BY-SA 3.0
2012-06-21T23:06:36.333Z
I believe it's stored as a merkle tree. Thanks for your answer. Perhaps the problem will cease when the whole chain has finished downloading.
doctororange
CC BY-SA 3.0
2012-06-23T06:28:32.953Z
@StevenRoose You may have read about 'pruning' of the blockchain to remove transactions whos outputs have already been spent.  This has been proposed as a way of saving disk space, but as far as I know it hasn't been implemented yet.
Chris Moore
CC BY-SA 3.0
2012-06-23T08:37:38.057Z
@ChrisMoose No actually I definitely read about compression. Weird, because indeed everywhere I look, it's never mentioned. Will delete it from the answer.
Steven Roose
CC BY-SA 3.0
2012-06-21T13:50:49.813Z
2012-06-23T08:38:55.573Z
2012-06-23T08:38:55.573Z
Steven Roose
<p>You indicated you are on an ecrypted filesystem.</p>

<p>This makes sense due to the BDB log files including sensitive data:</p>

<ul>
<li><a href="https://bitcoin.stackexchange.com/questions/2140">Does the BerkeleyDB-based wallet.dat implementation leak private key data?</a></li>
</ul>

<p>There is no method currently that allows the public data to be in one location and the private date to be kept in another (presumably, on an ecrypted filesystem).  See Issue #791 for this:</p>

<ul>
<li><a href="http://github.com/bitcoin/bitcoin/issues/791" rel="nofollow noreferrer">http://github.com/bitcoin/bitcoin/issues/791</a></li>
</ul>

<p>So perhaps a solution is to use a non-encrypted filesystem until you have the blockchain brought up to date.  Or throw hardware at the problem so it is less noticeable.</p>

CC BY-SA 3.0
2012-06-22T03:24:20.547Z
2012-06-22T03:24:20.547Z
2017-04-13T12:47:33.583Z
Stephen Gornick
<p>Although bitcoin is a heavy CPU user, that shouldn't cause freeze-ups of the sort you describe. They are usually caused by driver code. Since the only devices bitcoin uses are the network and the disk, and it isn't a heavier user of the network than many other applications, I would look for disk problems.  Bad disk blocks cause freezes. Check for errors in the system log, or run <a href="https://help.ubuntu.com/11.04/ubuntu-help/disk-check.html" rel="nofollow">Disk Utility</a> and look at the "SMART Status".</p>

CC BY-SA 3.0
2012-06-22T05:36:02.183Z
2012-06-22T05:36:02.183Z
tevirk .
<p>In my case, the first time running bitcoin-qt on Kubuntu Linux 12.04, on an X86_64 machine, synchronising the block chain is consuming 3.57 GB of RAM @ about %75 complete, but only using about %20 average CPU on a Phenom 9950. I had to start shutting down a few services (apache, mysql, etc...) because the swap partitions where getting hit quite heavily and causing my GUI to freeze up for long periods. </p>

CC BY-SA 3.0
2013-11-19T06:57:40.703Z
2013-11-19T06:57:40.703Z
user8965
<p>Whenever I run bitcoin, my computer (Dell E4200 running Ubuntu 12.04, with AwesomeWM) lags quite heavily.</p>

<p>It will operate normally for 10-15 seconds, then 'freeze' for 10 to 15 seconds, during which time keyboard and mouse input seems not to register. Some actions are more affected than others. Chrome won't output keystokes in this textarea during such a lag, but I can change tabs freely. All the keystrokes show when the freeze ends.</p>

<p>I am running bitcoin-qt from this repository: <a href="https://launchpad.net/~bitcoin/+archive/bitcoin">https://launchpad.net/~bitcoin/+archive/bitcoin</a></p>

<p>I installed it with <code>sudo apt-get install bitcoin-qt</code></p>

<p>Version shown during install:
<code>Unpacking bitcoin-qt (from .../bitcoin-qt_0.6.2-precise0_amd64.deb) ...</code></p>

<p>I had the same issue when I was running Ubuntu Unity, and the 'original' bitcoin client.</p>

<p>My client is currently synchronizing with the network.</p>

<p>My total CPU usage is between 20-60%, with occasional spikes to 90+%.</p>

<p>Memory usage is steady at ~60%, and swap is ~5%.</p>

<p>Any clues to help me diagnose / solve this issue?</p>

<p>Thank you.</p>

CC BY-SA 3.0
2012-06-21T16:58:54.033Z
Are you running on an encrypted filesystem?
Stephen Gornick
CC BY-SA 3.0
2012-06-21T23:16:37.520Z
Yes, my home folder is encrypted.
doctororange
CC BY-SA 3.0
2012-06-21T23:24:36.140Z
Is this while downloading the blockchain? Or do you already have all the blocks?
David Schwartz
CC BY-SA 3.0
2012-06-22T00:10:20.590Z
It's currently download the blockchain.
doctororange
CC BY-SA 3.0
2012-06-22T01:58:38.833Z
While downloading the blockchain, it's got effectively an unlimited amount of work to do that it's trying to do as quickly as possible. I'd recommend doing that when you have nothing else to do. (Overnight, or over many nights if needed.) Then it should be able to stay synched without high load.
David Schwartz
<performance>
Why does Bitcoin make my computer lag/freeze?
doctororange
# Why does Bitcoin make my computer lag/freeze?

(Asked by: username_0 on 2012-06-21)

Whenever I run bitcoin, my computer (Dell E4200 running Ubuntu 12.04, with AwesomeWM) lags quite heavily.

It will operate normally for 10-15 seconds, then 'freeze' for 10 to 15 seconds, during which time keyboard and mouse input seems not to register. Some actions are more affected than others. Chrome won't output keystokes in this textarea during such a lag, but I can change tabs freely. All the keystrokes show when the freeze ends.

I am running bitcoin-qt from this repository: <https://launchpad.net/~bitcoin/+archive/bitcoin>

I installed it with `sudo apt-get install bitcoin-qt`

Version shown during install:
`Unpacking bitcoin-qt (from .../bitcoin-qt_0.6.2-precise0_amd64.deb) ...`

I had the same issue when I was running Ubuntu Unity, and the 'original' bitcoin client.

My client is currently synchronizing with the network.

My total CPU usage is between 20-60%, with occasional spikes to 90+%.

Memory usage is steady at ~60%, and swap is ~5%.

Any clues to help me diagnose / solve this issue?

Thank you.

**Tags:** performance

> **Comments:**
> **username_1**: Are you running on an encrypted filesystem?  
> **username_0**: Yes, my home folder is encrypted.  
> **username_2**: Is this while downloading the blockchain? Or do you already have all the blocks?  
> **username_0**: It's currently download the blockchain.  
> **username_2**: While downloading the blockchain, it's got effectively an unlimited amount of work to do that it's trying to do as quickly as possible. I'd recommend doing that when you have nothing else to do. (Overnight, or over many nights if needed.) Then it should be able to stay synched without high load.  

---

## 4 answers

### Answer by username_3 on 2012-06-21. Score: 2

When you use the Bitcoin client for the first time, the client has to download the whole Bitcoin blockchain from the network. This can really (really!) take a while and because it is stored in your homefolder and therefore has to be encrypted, this take some CPU power as well.

Apart from this, while your client runs, it helps verifying new transactions offered to the network, just like every connected Bitcoin client does, these calculations can take CPU power as well.

What CPU does your machine have?
You can try to use clients like [MultiBit](http://multibit.org/) that do not download the whole blockchain, but only the part that is relevant to your coins.

> **Comments:**
> **username_4**: I don't think there's compression going on.  What takes the CPU time is verifying the signatures on all transactions newer than the newest snapshot.  
> **username_3**: I was quite sure I read somewhere that the older parts of the blockchain were stored is a compressed way. Although doing some search I cannot find the source I got this from. If it would not be true, I'm sorry, but I really thought it was true :)  
> **username_0**: I believe it's stored as a merkle tree. Thanks for your answer. Perhaps the problem will cease when the whole chain has finished downloading.  
> **username_4**: @username_3 You may have read about 'pruning' of the blockchain to remove transactions whos outputs have already been spent.  This has been proposed as a way of saving disk space, but as far as I know it hasn't been implemented yet.  
> **username_3**: @ChrisMoose No actually I definitely read about compression. Weird, because indeed everywhere I look, it's never mentioned. Will delete it from the answer.  

---

### Answer by username_1 on 2012-06-22. Score: 1

You indicated you are on an ecrypted filesystem.

This makes sense due to the BDB log files including sensitive data:

* [Does the BerkeleyDB-based wallet.dat implementation leak private key data?](https://bitcoin.stackexchange.com/questions/2140)

There is no method currently that allows the public data to be in one location and the private date to be kept in another (presumably, on an ecrypted filesystem). See Issue #791 for this:

* <http://github.com/bitcoin/bitcoin/issues/791>

So perhaps a solution is to use a non-encrypted filesystem until you have the blockchain brought up to date. Or throw hardware at the problem so it is less noticeable.


---

### Answer by username_5 on 2012-06-22. Score: 1

Although bitcoin is a heavy CPU user, that shouldn't cause freeze-ups of the sort you describe. They are usually caused by driver code. Since the only devices bitcoin uses are the network and the disk, and it isn't a heavier user of the network than many other applications, I would look for disk problems. Bad disk blocks cause freezes. Check for errors in the system log, or run [Disk Utility](https://help.ubuntu.com/11.04/ubuntu-help/disk-check.html) and look at the "SMART Status".


---

### Answer by username_6 on 2013-11-19. Score: 1

In my case, the first time running bitcoin-qt on Kubuntu Linux 12.04, on an X86\_64 machine, synchronising the block chain is consuming 3.57 GB of RAM @ about %75 complete, but only using about %20 average CPU on a Phenom 9950. I had to start shutting down a few services (apache, mysql, etc...) because the swap partitions where getting hit quite heavily and causing my GUI to freeze up for long periods.


---

