btcd
btcd copied to clipboard
GOGC and GOMAXPROCS configuration items added and defaults set
I think GOGC can be set via environment variable, the runtime checks for it, maybe, but for certain it is better done directly in the app.
Increasing GOMAXPROCS above the number of CPU threads can produce substantial improvements in initial block download and validation.
These both default to prior defaults if unset but provide a way for deployments to dramatically improve IBD and speed of updating the DB when new blocks arrive. Not important improvements but produce a ~50% time to initial sync at the cost of around double memory use.
IBD is a definite weak point for btcd versus bitcoind. There is minimal cost efficiency between a 4gb vs 2gb memory availability nowadays, so this brings btcd closer to parity of performance.
Pull Request Test Coverage Report for Build 3219456685
- 0 of 19 (0.0%) changed or added relevant lines in 1 file are covered.
- 10 unchanged lines in 4 files lost coverage.
- Overall coverage decreased (-11.2%) to 55.105%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
config.go | 0 | 19 | 0.0% |
<!-- | Total: | 0 | 19 |
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
addrmgr/addrmanager.go | 1 | 71.7% |
connmgr/connmanager.go | 2 | 86.07% |
config.go | 3 | 5.09% |
peer/peer.go | 4 | 73.2% |
<!-- | Total: | 10 |
Totals | |
---|---|
Change from base Build 3216328982: | -11.2% |
Covered Lines: | 26518 |
Relevant Lines: | 48123 |
💛 - Coveralls
fwiw, i extended this a little by embedding the sample configuration, integrating the RPC credentials rewrite, that to date has never been updated to 1.16 embed capability despite targeting 1.17.
https://github.com/mleku/btcd/commit/c08425ad7ca03e08ef7758e81c4df40c88ce21d4