Prerequisites
Describe the Feature Request
Greatly speed up db compaction on SSDs by using multiple CPU cores.
Describe the Use Case
Users with multiple CPU cores and SSDs.
This will greatly speed up compaction as of electrs v0.8.10:
romanz/electrs#1138
Describe Preferred Solution
4 is probably a good number of processor cores to leave available (that leaves at least 2 cores with cache available for all other containers)
Selection of number to set db_parallelism to in electrs.toml something like:
if [[ $(nproc) -gt 4 ]]
then
electrs_use_procs=$(expr $(nproc) - 4)
else
electrs_use_procs=1
fi
echo $electrs_use_procs
Equivalent typescript (assuming we can call nproc):
const totalCores = parseInt(await compat.mod("nproc"), 10);
const adjustedCores = totalCores > 4 ? totalCores - 4 : 1;
Describe Alternatives
Alternative is to leave it at the default (1)
Anything else?
No response
Prerequisites
Describe the Feature Request
Greatly speed up db compaction on SSDs by using multiple CPU cores.
Describe the Use Case
Users with multiple CPU cores and SSDs.
This will greatly speed up compaction as of electrs v0.8.10:
romanz/electrs#1138
Describe Preferred Solution
4 is probably a good number of processor cores to leave available (that leaves at least 2 cores with cache available for all other containers)
Selection of number to set db_parallelism to in electrs.toml something like:
Equivalent typescript (assuming we can call
nproc):Describe Alternatives
Alternative is to leave it at the default (1)
Anything else?
No response