Reduce cpu
Merge request reports
Activity
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ïsI 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 ?
- Resolved by vincentrou
- Resolved by vincentrou
- Resolved by vincentrou
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.
- Resolved by vincentrou
- Resolved by vincentrou
mentioned in merge request !1216 (merged)
@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 Moreauadded 100 commits
- 0345d7e5 - Revert "Revert "[mod] refactoring ws2p connetion priorities #1184 (closed) #1185 (closed)""
- be21edfa - Revert "Revert "[enh] prepare the management of several ws2p versions +…
- 02b49ca7 - [mod] countConnexions : not counting connections with other nodes in your own key
- 9c22c5a9 - ws2p log add details
- 14237631 - [sec] update 'ws' dependency as a there is a security issue.
- 1edc424d - [enh] #1193 (closed) Refactoring test user.js to TestUser.ts
- 9eff3603 - ws2p server : add more log details
- 3e201282 - acceptKey : rm server dependence & forbidden oneself connection
- 92b2ec94 - [enh] add versioning in ws2p messages
- 3ac9d671 - test ws2p server limitations
- 762ce29d - [fix] completely close a removed connection
- 5b1df4c1 - repair test ws2p server limitations
- 7cb81e2b - test ws2p server limitations : rm waitDisconnection
- 06909cc4 - [fix] We do not accept keys already connected
- c6592954 - [typage] use type WS2PEndpoint
- c80f81d4 - [enh] reconnect all ten minutes and create a clique between own peers
- 6e07c0cc - [mod] rm CONNECTIONS_LOW_LEVEL
- 0b29109c - communicate only in ws2p V1 for the moment
- 2963b002 - merge dev into ws2p-v2
- 9e4ddd51 - remove Duplicate incoming Connections
- 3c90b511 - retry travis test
- fe063ef0 - [fix] insoleet feedbacks
- 4e474fb8 - ensure downward compatibility with ws2p 3
- 33752be8 - [fix] fast test ws2p_regexp
- 796c08eb - add ws2p endpoint downward compatibility
- 71152125 - [fix] create a 1/4 ratio between maxPrivate and maxPublic ws2p connections
- 0873bec2 - add downward compatibility
- 7dda307f - [enh] #1205 (closed) #1214 (closed)
- 5230520f - Add new file
- 1237abbc - Update .gitlab-ci.yml
- a4cc7517 - Merge branch '1.6-downward-compatibility' into 1.6
- 3a604a76 - [fix] integration test ws2p_heads
- 294b85b8 - [fix] ws2pHead V2
- 3be08088 - [fix] step reception
- 032d928d - [fix] ws2p step incrementation
- 813e3352 - [fix] head network stats
- eb3532ea - [fix] error in head api
- 9b84d20d - [fix] ws2p : broadcast headv2 + head v1
- cb1ae9b7 - [fix] #1214 (closed) accept closer heads
- f417c09f - [fix] head reception : undefined error
- 5eb2f7d4 - [enh] #1219 (closed)
- 7e836f3f - [fix] #1220 (closed)
- f0e29f79 - merge 1.6
- cf7d2068 - [fix] async isMember
- db4f5b18 - all DBDocuments are issuers
- 121cebe4 - [fix] wrong head v2 broadcasting & prevent fileds injection
- 9c1137f7 - [fix] update 'moment' dependency to avoid 'Regular Expression Denial of Service'.
- 1333c2d0 - [enh] #689 (closed) Support NodeJS 8
- 5994e648 - [enh] #689 (closed) Allow to make local builds
- 96e1434a - [enh] #689 (closed) Build for NodeJS 8 + NwJS 0.24.4
- 184a65b2 - Merge branch 'feature/es8' into '1.6'
- 1b9f671f - [enh] Better CPU% auto adjustment
- 879b80e1 - Test duniter-ci-on-redshift
- 45f6376f - Merge branch 'fix_update_moment_security' into '1.6'
- e39f59b9 - Update .gitlab-ci.yml
- dd6b4036 - Update .gitlab-ci.yml
- fc1fe6c2 - Use Node8
- e35b4899 - Update .gitlab-ci.yml
- c9606850 - Update .gitlab-ci.yml
- 5bf0c38e - Update .gitlab-ci.yml
- 75a2ef74 - Run build + tests in the same job
- 7df69dbd - Merge branch 'better_cpu_adjustement' into '1.6'
- 9989856c - Merge branch 'gitlab-ci-redshift' into '1.6'
- febdf7f7 - [fix] ws2p heads : prevent fields injection & refactoring headsReceived
- dd73c43b - [fix] WS2P public limitations test was failing
- c34a5fbd - merge from 1.6
- dcad8841 - Update .gitlab-ci.yml
- 5653926a - Update .gitlab-ci.yml
- fa52b6a3 - Update .gitlab-ci.yml
- 9ce00774 - [fix] replace hardcoded max ws2p quota by constant
- 78c11313 - [fix] ws2p trim connections
- d7fed2fd - Revert "Merge branch 'better_cpu_adjustement' into '1.6'"
- 14493488 - Revert "Merge branch 'better_cpu_adjustement' into '1.6'"
- 7d26a9b4 - Merge branch 'revert-7df69dbd' into '1.6'
- 89ebf164 - Merge branch '1.6' into 'stable/ws2p-v1.1-trymerge'
- d4123939 - revert wrong merge
- bbf2b959 - [fix] finalize the revert of the branch' better_cpu'
- 70a1073f - Merge branch 'stable/ws2p-v1.1-trymerge' into '1.6'
- 49537b7c - Revert "[fix] finalize the revert of the branch' better_cpu'"
- 7ac480f7 - [fix] #1234 (closed) PoW workers were not cancelling their current proof when asked
- f7c36eff - [fix] WS2P client testing was sometimes randomly failing
- 11a843f4 - [enh] Refactoring: RouterDependency
- 616084b0 - [enh] tests: remove logging of a block
- 4aa66888 - [enh] tests: remove logging 'SIGTERM'
- 6a785867 - [fix] tests: remove EventEmitter leaks
- c9783382 - [enh] Untrack some generated test files
- 7a566dd2 - [fix] tests: remove unhandledRejection EventEmitter leaks
- 6f01a449 - [fix] #1234 (closed) Remove ARM specific code
- 5d5dbb19 - try to exec github sync in redshift runner
-
d5e6ebcf - [fix] #1230 (closed) The
plug
command was broken by NodeJS 8 - 61574b18 - Merge branch 'node8_plug' into '1.6'
- 3bb0aa73 - [fix] #1234 (closed) Synchronize workers on each PoW task
- 155c98a7 - [fix] #1234 (closed) Need at least 1ms for PoW pauses
- d7988cc2 - Merge branch '1.6_fix_1234' into '1.6_fixes'
- 1015eba8 - [fix] #1246 (closed) Concurrent identities: keep only the most signed one
- de53778f - [fix] #1247 (closed) Travis CI builds were broken
- e843c8e0 - Merge branch '1.6_fixes' into '1.6'
- 4e8a97cb - Add CPU boost when few bloc of the user in frame
- 53fdad34 - Merge branch '1.6' into reduce_cpu
- 63a7f4b7 - Add and remove workers during eco mode
Toggle commit listI 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 !