z-classic / z-nomp

z-nomp is mining pool software for Zcash and Zclassic so you can create internet money in your home!
MIT License
291 stars 437 forks source link

Graph rendering loads CPU up to 100% #331

Closed theicosuperman closed 6 years ago

theicosuperman commented 6 years ago

Firefox is hanging up, opera is working but slowly.

default

sennevb commented 6 years ago

Javascript is handled on cliënt side, so this can be normal..

theicosuperman commented 6 years ago

I did this in config.json "stats": { "updateInterval": 0.1, "historicalRetention": 172800, "hashrateWindow": 30 },

Unfortunately I don't know how to make graph update more often. Is this possible?

TheComputerGenie commented 6 years ago

You set it to hold 2 days worth of info; used 30 seconds as your time of "seconds worth of shares should be gathered to generate hashrate"; and "gather stats to broadcast to page viewers and store in redis for historical stats" at a rate of 10 times per second, and you're confused as to why it pegs the CPU?

and now you want it to update more often than that?

theicosuperman commented 6 years ago

Wow, I completely missed out updateInterval time stretch. for now I understand what was really wrong. Thank you for explanation. After I turend "updateInterval": to 1, I don't see this cpu load no more. Btw redis ops/s was more than 200 in this setting.