clawoflight/aursec

Handle laptops on battery

clawoflight opened this issue · 5 comments

This could be checked with acpi -a, for example, or possibly(?) systemd.
Some ideas:

  • Reduce the priority of the running geth process
  • Do not auto-mine if on battery

I could say that it's not allowed to mine in batterymod, but it's really difficult to reduce the cpulimit.
I could decrease the minerthreads in battery mod...
The priority can be easily set to a lower value. but it will still use 100%of the CPU if there is no other process
Pls tell me your suggestions

Maybe it would be better to not mine after every hash submission, because that takes quite long... Can you estimate how much faster it would be to not mine?

Interesting, I did not know that that's the way it works. Well, the CPU scheduler will clock it down if on battery, so that should help a lot.

Some thoughts:

  • run geth with a high nicety... say upwards of 10?
  • schedule the timer to run fairly often - maybe even touch a file when committing and have the timer mine (2,5,10 times?) if the file is present, then delete it
  • skip a timer event if on battery and below 50%

What do you think?
We can discuss it more on slack, or in person.

We will need to experiment with nice values before we decide on one :)

We have to discuss this again

what exactly do you want to discuss? :)