Skip to content
Snippets Groups Projects

Reduce cpu

Closed Éloïs requested to merge reduce_cpu into dev

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Éloïs mentioned in merge request !1211 (closed)

    mentioned in merge request !1211 (closed)

  • @vincentrou i rewrote the management of the ecoMode parameter in the configuration:

    All default values must be collected in constants to know where to find them, do not use type definitions for this. In addition, your cli ecoMode option is just a present or absent flag, but you used it as if it were accompanied by a entered value, I solved this problem.

    Before merger I will do some tests tomorrow, and I also require the approval of @c-geek.

    Edited by Éloïs
  • I repost my initial post on this MR

    This MR uses the number of test per second to evaluate if the duniter is too fast (I set it to 300 test/s for now : it is one of my i7 core at 30% of CPU usage). At first the eco mode reduce number of cores and when there is only one core left it reduce CPU usage.

    For now the configuration is not saved so if the node is restarted the config will comeback to the initial state.

    Any remark is welcome !

  • It is working for me since yesterday. I begin with 3 Cores at 100%. I am now with 1 Cores at 50% (with 400 tests/second). It is now difficult for me to find a block but when everyone will have this patch, the common difficulty will decrease.

    Do you think it is interesting to save the configuration in the config.json in case of node restart ?

  • Do you think it is interesting to save the configuration in the config.json in case of node restart ?

    yes why not :)

  • Cédric Moreau
  • Cédric Moreau
  • Cédric Moreau
  • To sum up, this is a good idea and it seems correctly implemented. However we should rely on an component which tells us the current CPU loading to be more generic. Also this would allow us to mock the behavior so we can tests more precisely each component.

    Eventually, I think that this component of CPU loading detection could replace the current behavior in proof.ts.

  • Cédric Moreau
  • Cédric Moreau
  • Cédric Moreau mentioned in merge request !1216 (merged)

    mentioned in merge request !1216 (merged)

  • vincentrou added 4 commits

    added 4 commits

    • 42ca7a5a - [enh] Improve ecomode unit test + fix workers
    • 6959f9f1 - [enh] Put constants in a ProverConstants
    • 93c5b747 - [enh] Eco mode should not be by default
    • d19e76bf - Merge branch 'reduce_cpu_improvements' into 'reduce_cpu'

    Compare with previous version

  • Lorsque je sync mon noeud en 1.6.14, le CPU n'est pas respecté. Il se fait donc kill par le surveillant du VPS.

    Est-ce que cette merge request peut potentiellement régler ce bug ?

  • @Insoleet Non c'est plutôt la MR !1225 (merged) qui le fera.

  • J'ai rajouté un mode boost pour éviter qu'un membre en eco mode sorte de la fenêtre courante. Est ce que je push directement ou il vaut mieux que je rebase sur la MR !1228 (merged) d'abord ? Car il y a quelques changements sur le prover apparemment !

  • @vincentrou Il vaudrait mieux que tu rebases sur !1228 (merged) en effet !

    Edited by Cédric Moreau
  • vincentrou added 100 commits

    added 100 commits

    Compare with previous version

  • I have made modification to

    • Add and remove workers more cleanly by modifying the slaves array
    • Add function BoostCPU to put enable every cores at 100%
    • Get the current number of block of the actual member to activate Boost CPU

    For now all tests are not passing because I add a call to this.server.getBcContext() in BlockProver.ts. But I do not saw how to add this in the test of proof-of-work.js for example.

    Finally, Could it be better to refactor the code in PowerCluster.ts instead of blockProver.ts.

    Any remark is welcome !

  • vincentrou resolved all discussions

    resolved all discussions

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading