Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watch-address uses 100% of the CPU #153

Closed
ggutoski opened this issue Nov 18, 2014 · 6 comments
Closed

watch-address uses 100% of the CPU #153

ggutoski opened this issue Nov 18, 2014 · 6 comments

Comments

@ggutoski
Copy link

Running on testnet build with server obelisk-testnet.airbitz.co:9091. Wait time bumped up to 5000ms from 2000ms but otherwise all defaults are preserved. The command still reports new transactions to the watched address, so it's not hung---just hogging CPU.

Edit: The rest of this issue has been cut and moved to a new separate Issue 154

@evoskuil
Copy link
Member

Hi @ggutoski , could you give me the platform info and how you are measuring CPU usage?

@ggutoski
Copy link
Author

Platform:
ubuntu 14.04 (running as a guest on VMware Player with Windows 7 host)
Intel Core i7-3520M CPU @ 2.90GHz, 64 bit

I measure CPU usage using System Viewer. (No laughing.) Screenshot below. bx eats up as much CPU as the system will let it---88% in this image.
image

@evoskuil
Copy link
Member

The level seems high on Windows as well, at about 20% average CPU utilization on my dev machine, about the same as compilation on any given thread in VS 2013.

@ggutoski ggutoski changed the title watch-address uses 100% of the CPU, reports only new (unconfirmed) transactions watch-address uses 100% of the CPU Nov 19, 2014
@pmienk
Copy link
Member

pmienk commented Nov 19, 2014

Looking at the code, obelisk_client.poll_until_termination takes a timeout parameter which when not specified (as in watch-address) defaults to 0. Presumably you're seeing a busy-wait behavior due to the default. What would be a 'sane' default?

@evoskuil
Copy link
Member

Fixed in #155

@evoskuil
Copy link
Member

Thanks for the bug report @ggutoski and the fix @pmienk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants