5

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.

  • Are you running on an encrypted filesystem? – Stephen Gornick Jun 21 '12 at 16:58
  • Yes, my home folder is encrypted. – doctororange Jun 21 '12 at 23:16
  • Is this while downloading the blockchain? Or do you already have all the blocks? – David Schwartz Jun 21 '12 at 23:24
  • It's currently download the blockchain. – doctororange Jun 22 '12 at 0:10
  • 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 Jun 22 '12 at 1:58
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 that do not download the whole blockchain, but only the part that is relevant to your coins.

  • 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 Jun 21 '12 at 14:56
  • 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 Jun 21 '12 at 15:08
  • 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 Jun 21 '12 at 23:06
  • @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 Jun 23 '12 at 6:28
  • @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 Jun 23 '12 at 8:37
1

You indicated you are on an ecrypted filesystem.

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

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:

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.

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 and look at the "SMART Status".

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.