Pages:
Author

Topic: Technical question regarding POS coins and CPU time - page 2. (Read 1457 times)

sr. member
Activity: 350
Merit: 250
Although the stake search thread is set the low priority it will eat up the CPU time if the number of transactions in the wallet is significant. For each input tx that is met staking age conditions it tries to find a so called PoS kernel for each second in the past since it completed the last pass through the set of transactions. The way the "standard" most advanced implementation does the search is sub-optimal IMO.

So, if that is the case, it might behoove us to collect all those small transactions and group them into one huge send back to the wallet to clean them up? I can see how that would get exponentially worse... 300 small transactions lead to 300 small POS rewards which then leads to 600 small transactions leading to 600 smaller POS rewards, which turn into 1200 small POS rewards, etc...

Given we are an exchange with tons of small deposits (from mining pools) we have a much larger than usual number of transactions/addresses in the wallet than 'normal' wallets do. Tomorrow I'll take one of the offending coins and try consolidating all of the transactions into one address and see what that does to the CPU time for the wallet.

Thanks for the tip.

That being said, JPC has been one of our most active coins. It's still one of the most polite ones as far as CPU time and staking.
full member
Activity: 238
Merit: 122
Have you profiled the application?  Where's the CPU time being spent?  It's entirely possible the algorithm to calculate PoS is broken in a way that still consumes all the CPU time.

It's true PoS should result in lower CPU overhead but any algorithm anywhere, if improperly implemented, can give horrible efficiency.

We actually recompiled one wallet with profiling and analyzed it with gprof, and for some reason all the time %'s were listed as 0. 0% time for everything. Tried it with another tool and it ran so slow, after an hour it still hadn't finished scanning/validating the blockchain. Figured we'd ask here and see if we could find what the issue was in the code itself.

0% time for everything?  Are you running the program inside a virtual machine?  Virtual machines don't have profiling hardware so they'll ruin gprof results, otherwise I haven't seen that issue.
sr. member
Activity: 350
Merit: 250
Have you profiled the application?  Where's the CPU time being spent?  It's entirely possible the algorithm to calculate PoS is broken in a way that still consumes all the CPU time.

It's true PoS should result in lower CPU overhead but any algorithm anywhere, if improperly implemented, can give horrible efficiency.

We actually recompiled one wallet with profiling and analyzed it with gprof, and for some reason all the time %'s were listed as 0. 0% time for everything. Tried it with another tool and it ran so slow, after an hour it still hadn't finished scanning/validating the blockchain. Figured we'd ask here and see if we could find what the issue was in the code itself.
hero member
Activity: 574
Merit: 523
Although the stake search thread is set the low priority it will eat up the CPU time if the number of transactions in the wallet is significant. For each input tx that is met staking age conditions it tries to find a so called PoS kernel for each second in the past since it completed the last pass through the set of transactions. The way the "standard" most advanced implementation does the search is sub-optimal IMO.
member
Activity: 74
Merit: 10
I had some cool coins and the wallet gave my computer a BSOD each time I exited it. The block chain was growing incredibly quickly because the coin stake age required seemed like it was 5 minutes or some incredibly low value. I cannot remember what the CPU usage was, but the coins never seemed to stop staking.
full member
Activity: 238
Merit: 122
Have you profiled the application?  Where's the CPU time being spent?  It's entirely possible the algorithm to calculate PoS is broken in a way that still consumes all the CPU time.

It's true PoS should result in lower CPU overhead but any algorithm anywhere, if improperly implemented, can give horrible efficiency.
sr. member
Activity: 350
Merit: 250
We are experimenting with a possible feature of having coins that generate POS actually credit the coins created to users who hold those coins in their AllCrypt.com balance.

A problem we're having in the preliminary testing of this is that SOME, not all, of the POS coins we host chew up 100% CPU time when they are, presumably, staking the POS coins.

I am not a coin dev, but I am a coder at heart. We have patch code that modifies every coin we run at AllCrypt.com (adding in missing features, like walletnotify on those coins that use it, or patching out 'dumb' restrictions like not being able to use the 'move' RPC command on amounts too small to send across the blockchain, etc), so I am personally familiar with a lot of how the code works. I was under the impression that there should not be much, if any, CPU usage for POS mining? You're not running random numbers against a target, it's based on coins you already have, and their age.

Am I misunderstanding how POS minting works? I'm trying to better understand it so that we can mitigate the CPU usage of these coins. In addition, not all coins are doing this. If it were all of them, I'd just throw in the towel and say "POS minting takes too much CPU to leave it turned on for the exchange's wallets" - but coins like JackpotCoin and LockCoin bounce between 5% and 35% CPU time when minting, while coins like LiteCoinPlus and CapitalCoin are consistently chewing up 100% CPU. CoolCoin and DistroBlitz are coins we've had to turn off, those never drop below 100%.

It seems the "polite" coins use about 25-30% CPU and the others take all they can.

We'd love to have the feature, but cannot afford to have wallets dominating the server because they are running wild with CPU time minting POS blocks.

If anyone has any insight on what exactly happens with POS minting, links (I've tried searching, all I find is links to options for bitcoin for POS, and not anything technical about how it works), insight on why some coins are nice and others go nuts, we'd love to hear it.

Thanks,
Ed
AllCrypt.com lead developer
Pages:
Jump to: