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

Add --tstop and --tstart option preventing GPU overheating. #1146

Merged
merged 1 commit into from May 25, 2018

Conversation

Projects
None yet
4 participants
@StefanOberhumer
Collaborator

StefanOberhumer commented May 24, 2018

As we're getting summer here:

To be sure not to burn the GPUs the miner stops mining on a GPU
if a specific temperature (--tstop) is reached.
After cooling down and reaching --tstart temperature (default 40)
mining will be (re)started on the GPU.

@@ -690,6 +729,9 @@ class MinerCLI
<< " Use at your own risk! If GPU generates errored results they WILL be forwarded to the pool" << endl
<< " Not recommended at high overclock." << endl
#endif
<< " Temperature management: (implies -HWMON=0|1)" << endl

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Description should be set to

"Temperature management: (implies -HWMON=1)"

Would not work on without hwmon

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Description should be set to

"Temperature management: (implies -HWMON=1)"

Would not work on without hwmon

This comment has been minimized.

@StefanOberhumer

StefanOberhumer May 24, 2018

Collaborator

-HWMON=0 will be automatically enabled (m_show_hwmonitors=true which is what -HWMON=0 does).

@StefanOberhumer

StefanOberhumer May 24, 2018

Collaborator

-HWMON=0 will be automatically enabled (m_show_hwmonitors=true which is what -HWMON=0 does).

// Sanity check --tstart/--tstop
if (m_tstop && m_tstop <= m_tstart)

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Implement a check for tstop to have a range from tstart of, at least, 10 degrees
Otherwise a tstop of 41 and a tstart of 40 would be legit but will never start mining I assume

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Implement a check for tstop to have a range from tstart of, at least, 10 degrees
Otherwise a tstop of 41 and a tstart of 40 would be legit but will never start mining I assume

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Also do not let tstart be lower than 40.
A tstart of 10 would make no sense.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Also do not let tstart be lower than 40.
A tstart of 10 would make no sense.

This comment has been minimized.

@StefanOberhumer

StefanOberhumer May 24, 2018

Collaborator
  • In your example - it will mine if the temperature equals 40 degrees.
  • Forcing (tstart >= 40) and (tstart + 10 <= tstop):
    Hmmm: I like it when software does not too much automatically - the user should have the control !
    I force the two values to be in a range of 30 to 100 and 0 for tstop to disable feature again (eg --tstop 60 --tstop 0) ?
@StefanOberhumer

StefanOberhumer May 24, 2018

Collaborator
  • In your example - it will mine if the temperature equals 40 degrees.
  • Forcing (tstart >= 40) and (tstart + 10 <= tstop):
    Hmmm: I like it when software does not too much automatically - the user should have the control !
    I force the two values to be in a range of 30 to 100 and 0 for tstop to disable feature again (eg --tstop 60 --tstop 0) ?

@StefanOberhumer StefanOberhumer deleted the StefanOberhumer:Add-tstop-tstart-Option--PreventingOverheating branch May 24, 2018

@StefanOberhumer StefanOberhumer restored the StefanOberhumer:Add-tstop-tstart-Option--PreventingOverheating branch May 24, 2018

Show outdated Hide outdated libethcore/Miner.h
@AndreaLanfranchi

This comment has been minimized.

Show comment
Hide comment
@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Bottomline ... a good catch.
Highly requested.
Almost ready to merge.

Collaborator

AndreaLanfranchi commented May 24, 2018

Bottomline ... a good catch.
Highly requested.
Almost ready to merge.

Show outdated Hide outdated libethcore/Miner.h
Add --tstop and --tstart option preventing GPU overheating.
To be sure not to burn the GPUs the miner stops mining on a GPU
if a specific temperature (--tstop) is reached.
After cooling down and reaching --tstart temperature (default 40)
mining will be (re)started on the GPU.
@StefanOberhumer

This comment has been minimized.

Show comment
Hide comment
@StefanOberhumer

StefanOberhumer May 25, 2018

Collaborator

As suggested to use std::atomic_flag for m_wait_for_tstart_temp:

  • Unlike std::atomic<bool>, std::atomic_flag does not provide load or store operations.
  • So I decided to use std::atomic<bool> for m_wait_for_tstart_temp flag.
Collaborator

StefanOberhumer commented May 25, 2018

As suggested to use std::atomic_flag for m_wait_for_tstart_temp:

  • Unlike std::atomic<bool>, std::atomic_flag does not provide load or store operations.
  • So I decided to use std::atomic<bool> for m_wait_for_tstart_temp flag.
@chfast

chfast approved these changes May 25, 2018

Very nice!
Sorry about confusion about atomic_flag vs atomic<bool>. I though they are almost the same.

@chfast chfast merged commit 8cc88d9 into ethereum-mining:master May 25, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@StefanOberhumer StefanOberhumer deleted the StefanOberhumer:Add-tstop-tstart-Option--PreventingOverheating branch May 25, 2018

@Ali8668

This comment has been minimized.

Show comment
Hide comment
@Ali8668

Ali8668 commented Sep 20, 2018

Goood

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment