Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Bit_Happy on May 29, 2011, 05:20:35 AM



Title: What is the Windows client doing right after the last new block is downloaded?
Post by: Bit_Happy on May 29, 2011, 05:20:35 AM
Example 1) Today it was < 24 hours since last using the Bitcoin Windows client. The new block got downloaded quickly and "quietly".

Example 2) Yesterday I had not used the client for over 48 hours. Right after the last new block was downloaded the CPU usage and 'noise' rose to high levels for ~45 seconds or more (seemed like longer)  Note: My CPU is ~3.2ghz and normally runs < 10% load.

Mining is turned off, of course. I've noticed this CPU spike before at the end of downloading. Why?
My thoughts and feelings on the matter are not really important, but I can guarantee the typical "mainstream" user might not like their computer "making so much noise".

Is this a known issue, and are there plans to fix it? Thank you.


Title: Re: What is the Windows client doing right after the last new block is downloaded?
Post by: cypherdoc on May 29, 2011, 09:45:53 PM
Example 1) Today it was < 24 hours since last using the Bitcoin Windows client. The new block got downloaded quickly and "quietly".

Example 2) Yesterday I had not used the client for over 48 hours. Right after the last new block was downloaded the CPU usage and 'noise' rose to high levels for ~45 seconds or more (seemed like longer)  Note: My CPU is ~3.2ghz and normally runs < 10% load.

Mining is turned off, of course. I've noticed this CPU spike before at the end of downloading. Why?
My thoughts and feelings on the matter are not really important, but I can guarantee the typical "mainstream" user might not like their computer "making so much noise".

Is this a known issue, and are there plans to fix it? Thank you.

i've not experienced this


Title: Re: What is the Windows client doing right after the last new block is downloaded?
Post by: Matt Corallo on May 29, 2011, 10:00:09 PM
Ive seen this occasionally, but never in any kind of reliable, reproduceable way.  I would love to fix it...anyway, I have a feeling it is because your node is doing something in terms of interactions with other nodes that is really confusing it somehow...Might you try trying to see what kind of activity bitcoin has via Process Explorer.  How much is being uploaded/downloaded, just one thread eating cpu, any kind of info that might be helpful.


Title: Re: What is the Windows client doing right after the last new block is downloaded?
Post by: cypherdoc on May 29, 2011, 10:03:00 PM
Ive seen this occasionally, but never in any kind of reliable, reproduceable way.  I would love to fix it...anyway, I have a feeling it is because your node is doing something in terms of interactions with other nodes that is really confusing it somehow...Might you try trying to see what kind of activity bitcoin has via Process Explorer.  How much is being uploaded/downloaded, just one thread eating cpu, any kind of info that might be helpful.

hey Matt, mewantsbitcoin was telling me you had a way to analyze port usage.  he helped me open up 8333 and i want to see if my bitcoin activity has ported to it.


Title: Re: What is the Windows client doing right after the last new block is downloaded?
Post by: Matt Corallo on May 29, 2011, 10:15:15 PM
hey Matt, mewantsbitcoin was telling me you had a way to analyze port usage.  he helped me open up 8333 and i want to see if my bitcoin activity has ported to it.
You want to know what now?  If you want to know if your ports are properly forwarded, just see if bitcoin has >8 connections, as that means they are.  If you want to see what kind of bw each connection is using (like I asked the OP to), you can use Process Monitor.  If you want to see the total bw of this or that, I would suggest getting a good router that shows you that, though a simple iptables rule which does nothing will show you bw totals when you iptables -L -v, but there are no doubt much better ways of doing that...


Title: Re: What is the Windows client doing right after the last new block is downloaded?
Post by: cypherdoc on May 29, 2011, 10:26:17 PM
hey Matt, mewantsbitcoin was telling me you had a way to analyze port usage.  he helped me open up 8333 and i want to see if my bitcoin activity has ported to it.
You want to know what now?  If you want to know if your ports are properly forwarded, just see if bitcoin has >8 connections, as that means they are.  If you want to see what kind of bw each connection is using (like I asked the OP to), you can use Process Monitor.  If you want to see the total bw of this or that, I would suggest getting a good router that shows you that, though a simple iptables rule which does nothing will show you bw totals when you iptables -L -v, but there are no doubt much better ways of doing that...

why is 8 the magic # for determining that?


Title: Re: What is the Windows client doing right after the last new block is downloaded?
Post by: Matt Corallo on May 29, 2011, 10:38:57 PM
why is 8 the magic # for determining that?
Because, by default, the bitcoin client opens 8 outgoing connections.  If you have more than that, some number must be incoming, ie your ports are forwarded properly.  See MAX_OUTGOING_CONNECTIONS in net.cpp IIRC.


Title: Re: What is the Windows client doing right after the last new block is downloaded?
Post by: Bit_Happy on May 30, 2011, 01:33:12 AM
Ive seen this occasionally, but never in any kind of reliable, reproduceable way.  I would love to fix it...anyway, I have a feeling it is because your node is doing something in terms of interactions with other nodes that is really confusing it somehow...Might you try trying to see what kind of activity bitcoin has via Process Explorer.  How much is being uploaded/downloaded, just one thread eating cpu, any kind of info that might be helpful.

I agree the "CPU spike" doesn't happen in a reliable, reproducible way, and just downloaded Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653). Will offer more info if/when possible. Thanks for the tip about Process Explorer, Matt.