Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: farmer_boy on November 23, 2010, 05:29:25 PM



Title: Bitcoin harddisk attack
Post by: farmer_boy on November 23, 2010, 05:29:25 PM
Running bitcoin feels like its indexing my harddisk. I will probably stop running the client, because of that. I don't mind the CPU usuage, but its seek behaviour is ridiculous. Isn't there some way to keep more in memory data structures and only write them to disk when the program is stopped or when there is a lot of date to write?

What are the harddisk requirements anyway?


Title: Re: Bitcoin harddisk attack
Post by: grondilu on November 23, 2010, 05:35:32 PM
Running bitcoin feels like its indexing my harddisk. I will probably stop running the client, because of that. I don't mind the CPU usuage, but its seek behaviour is ridiculous. Isn't there some way to keep more in memory data structures and only write them to disk when the program is stopped or when there is a lot of date to write?

What are the harddisk requirements anyway?


I'm not sure I understand your pb correctly but...  I guess you could make a symlink from a virtual fs to $HOME/.bitcoin, and crontab a backup of your wallet.



Title: Re: Bitcoin harddisk attack
Post by: farmer_boy on November 23, 2010, 05:40:23 PM
Running bitcoin feels like its indexing my harddisk. I will probably stop running the client, because of that. I don't mind the CPU usuage, but its seek behaviour is ridiculous. Isn't there some way to keep more in memory data structures and only write them to disk when the program is stopped or when there is a lot of date to write?

What are the harddisk requirements anyway?


I'm not sure I understand your pb correctly but...  I guess you could make a symlink from a virtual fs to $HOME/.bitcoin, and crontab a backup of your wallet.
To do that one needs to know the requirements of the application. I was suggesting to put this logic into the application, but it appears that after running it for some time, it stopped attacking my harddisk. It's now just frying my CPUs, but that's ok.

I would like to know what it was doing to my harddisk before. I suppose it is some kind of syncing to the rest of the nodes, getting a semi-complete history of the network?


Title: Re: Bitcoin harddisk attack
Post by: m0mchil on November 23, 2010, 05:44:29 PM
Initially it downloads 'blocks' from other peers. It does this in bundles of 500, but this still involves some disk activity. This will stop when you have all blocks.

At the moment the block chain will take about 100 MB of disk space. This is the public shared history of all transactions ever happened. It will grow with time. There are plans for some optimizations like removing spent transactions from disk.

About the CPU - bitcoin is trying to solve current block, containing all recent transactions. This could take a significant amount of time. Please search and read more past forum threads - all this is explained many times.


Title: Re: Bitcoin harddisk attack
Post by: BrightAnarchist on November 23, 2010, 07:13:07 PM
Are you running anti-virus on a windows box? That could explain crazy harddisk behavior. If so, you should put the bitcoin executable on the list of "ignore" processes.


Title: Re: Bitcoin harddisk attack
Post by: wumpus on November 23, 2010, 07:59:05 PM
Just disable coin generation and your CPU will be ok.


Title: Re: Bitcoin harddisk attack
Post by: farmer_boy on November 23, 2010, 08:07:45 PM
The CPU usage was expected when generating hashes, but perhaps I was not clear there. The harddisk activity gives a bad impression, imho, for first time users, especially if it is a tiny fraction (100MB) of the available internal memory on the machine. So, by default, I would recommend only doing something with the harddisk if there is some real work to be performed (i.e. does not fit in RAM or user sends KILL signal to application).


Title: Re: Bitcoin harddisk attack
Post by: wumpus on November 23, 2010, 08:10:22 PM
Yeah. My guess is that synchronous writing to disk is used for the blocks, to make sure that a power failure won't lose data. Isn't a bad idea IMO...


Title: Re: Bitcoin harddisk attack
Post by: MrFlibble on November 23, 2010, 11:18:39 PM
Running bitcoin feels like its indexing my harddisk. [...] I don't mind the CPU usuage, but its seek behaviour is ridiculous.

Sounds like the problem I noticed, only with spinny disk instead of Compact Flash (cheapskate SSD drive).
https://www.bitcoin.org/smf/index.php?topic=274.msg23624#msg23624 (a sticky topic)

Did performance improve once you finished fetching the block chain?


Title: Re: Bitcoin harddisk attack
Post by: farmer_boy on November 24, 2010, 12:17:03 AM
Running bitcoin feels like its indexing my harddisk. [...] I don't mind the CPU usuage, but its seek behaviour is ridiculous.

Sounds like the problem I noticed, only with spinny disk instead of Compact Flash (cheapskate SSD drive).
https://www.bitcoin.org/smf/index.php?topic=274.msg23624#msg23624 (a sticky topic)

Did performance improve once you finished fetching the block chain?
Yes, afterwards it was ok.

I suppose it depends on where you live, but in an area where power supply is stable, I think keeping everything in memory and writing it in one go would be best. It's not like it's the end of the world when your machine crashes. Your wallet should be on non-volatile memory of course.

I still have the problem of building the application, which is also bad for adoption; many people don't like it when they are running black boxes. Can someone look here?  http://bitcointalk.org/index.php?topic=1898.0


Title: Re: Bitcoin harddisk attack
Post by: MrFlibble on November 24, 2010, 01:22:16 AM
Sounds like the problem I noticed, only with spinny disk instead of Compact Flash (cheapskate SSD drive).
https://www.bitcoin.org/smf/index.php?topic=274.msg23624#msg23624 (a sticky topic)
[...]
I suppose it depends on where you live, but in an area where power supply is stable, I think keeping everything in memory and writing it in one go would be best. [...]

Yes. I used /dev/shm and a symlink, until the blockchain download finished.

Quote
I still have the problem of building the application, which is also bad for adoption; many people don't like it when they are running black boxes. Can someone look here?  http://bitcointalk.org/index.php?topic=1898.0

(Sounds like wx was broken.  I haven't messed with it yet, sorry.  Does it have a helloworld you can build?)

I don't like running black boxes, but I don't have time now to read the source so I see little benefit in compiling.   (I have read "Reflections on trusting trust".)  I have a DMZ and that's good enough for now.

HTH,


Title: Re: Bitcoin harddisk attack
Post by: farmer_boy on November 24, 2010, 02:11:36 AM
Sounds like the problem I noticed, only with spinny disk instead of Compact Flash (cheapskate SSD drive).
https://www.bitcoin.org/smf/index.php?topic=274.msg23624#msg23624 (a sticky topic)
[...]
I suppose it depends on where you live, but in an area where power supply is stable, I think keeping everything in memory and writing it in one go would be best. [...]

Yes. I used /dev/shm and a symlink, until the blockchain download finished.

Quote
I still have the problem of building the application, which is also bad for adoption; many people don't like it when they are running black boxes. Can someone look here?  http://bitcointalk.org/index.php?topic=1898.0

(Sounds like wx was broken.  I haven't messed with it yet, sorry.  Does it have a helloworld you can build?)
Yes, I stated in my post that I could build and run the demos included with wx.


Title: wx + build
Post by: MrFlibble on November 24, 2010, 11:51:11 PM
(Sounds like wx was broken.  I haven't messed with it yet, sorry.  Does it have a helloworld you can build?)
Yes, I stated in my post that I could build and run the demos included with wx.

Sorry.  I didn't read your post carefully enough, just the compiler output.   :-[