aionnetwork / aion_pool2

aion pool implementation with c# core.
13 stars 15 forks source link

Cpu load #18

Closed equ1miner closed 5 years ago

equ1miner commented 5 years ago

4 core xeon will go from 13% CPU to 100% and increasing ms response from steady a stratum flood auth, get work, broadcast work.

Rebooting the slave server or using different branches did not solve this. I closed the server due to orphans. Use a 8 core xeon dedicated + aux wallet seems to be enough.

Master didnt pick up new miners as no valid shares submitted so none on then relay.

Stock miningcore doesnt load up nearly as much but my guess is the 10sec block contributes to this.

equ1miner commented 5 years ago

Log file also increases very quickly and could exhaust disk space. Is there a way to auto prune the log in the config for those that dont mind the load. Thanks.

alinturbut commented 5 years ago

@easy-mine-crypto, please try and play a bit with the configuration parameters like:

Reference file: https://github.com/aionnetwork/aion_pool2/blob/master/aion_pool/examples/aion_pool.json

I am not sure if miningcore supports log rotation, but you can create a job that does this automatically for you.

equ1miner commented 5 years ago

@centrys-alin

i have solved the problem but didn't write back to you here are the modifications I made

Effiencency improved a lot too.

-> disabled the blockRefreshInterval completly, so the daemon doesn't get loaded up from useless calls -> provided a dedicated secondary slave for miner dev fees and increased the target time for dev fees, i was getting up to 150 shares per second @ 0.1-10 sol/s per connection (miners make two connections to your pool and to a miner writer's dev fee pool so you have to accept 1% of the sols a card or rig makes so some adjustments were needed on that slave bump difficulty immediatly up on fast shares as a precaution however even dev starts a a 4096diff and works down -> pruned my DB down from over 261gb to under 10gb, a resonable size that the master doesn't take so much power to read from (wowza every was all that really databased) -> limited the request frequency allowed on the api for block history -> removed banning from the internal manager and iptables is taking care of it for stratum floods -> blacklisted loads of invalid ip ranges --> whoever was initiating 100 connections++/second gave up, was blocked, ran out of bots because I havn't seen an attempt in over a month

Further luck -> as another pool operator to smeared us and our issue publically to gain users -> we naturally reduced allowed our users to reduce to ~10% of the aion network which was great as I could shut down and return the stratum slave server (the most problematic server ever) vs replacing it.

I guess you gunna have some of these stupid issues after making a few hundred thousand of blocks I have a few dedicated hardware servers at my disposal with the current high frequency 8core Xeons and DDR4 so all the times are under 10ms. Aion is still a resource pig but oh well I alway loved aion anyways.

Take care Alan appreciate the help and suggestions!

alinturbut commented 5 years ago

@equ1miner,

Great to hear! And thanks for sharing this information, also.

Can you close this ticket?

equ1miner commented 5 years ago

@centrys-alin i'll close this issue. Have you had the change to try aionr kernal. I am pretty busy at the moment so I am just starting to test it.

My server response is excellent so it doesn't need this but if its a little more lightweight this is obviously an advantage.