lncfg/workers: reduce default write pool workers to 8
Now that the write pool no longer executes blocking i/o operations, it is safe to reduce this number considerably. The write pool now only handles encoding and encryption of messages, making problem computationally bound and thus dependent on available CPUs. The descriptions of the workers configs is also updated to explain how users should set these on their on machines.
This commit is contained in:
parent
e013577a4f
commit
e3a6de1554
@ -9,7 +9,7 @@ const (
|
|||||||
|
|
||||||
// DefaultWriteWorkers is the default maximum number of concurrent
|
// DefaultWriteWorkers is the default maximum number of concurrent
|
||||||
// workers used by the daemon's write pool.
|
// workers used by the daemon's write pool.
|
||||||
DefaultWriteWorkers = 100
|
DefaultWriteWorkers = 8
|
||||||
|
|
||||||
// DefaultSigWorkers is the default maximum number of concurrent workers
|
// DefaultSigWorkers is the default maximum number of concurrent workers
|
||||||
// used by the daemon's sig pool.
|
// used by the daemon's sig pool.
|
||||||
@ -20,13 +20,13 @@ const (
|
|||||||
// pools.
|
// pools.
|
||||||
type Workers struct {
|
type Workers struct {
|
||||||
// Read is the maximum number of concurrent read pool workers.
|
// Read is the maximum number of concurrent read pool workers.
|
||||||
Read int `long:"read" description:"Maximum number of concurrent read pool workers."`
|
Read int `long:"read" description:"Maximum number of concurrent read pool workers. This number should be proportional to the number of peers."`
|
||||||
|
|
||||||
// Write is the maximum number of concurrent write pool workers.
|
// Write is the maximum number of concurrent write pool workers.
|
||||||
Write int `long:"write" description:"Maximum number of concurrent write pool workers."`
|
Write int `long:"write" description:"Maximum number of concurrent write pool workers. This number should be proportional to the number of CPUs on the host. "`
|
||||||
|
|
||||||
// Sig is the maximum number of concurrent sig pool workers.
|
// Sig is the maximum number of concurrent sig pool workers.
|
||||||
Sig int `long:"sig" description:"Maximum number of concurrent sig pool workers."`
|
Sig int `long:"sig" description:"Maximum number of concurrent sig pool workers. This number should be proportional to the number of CPUs on the host."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate checks the Workers configuration to ensure that the input values are
|
// Validate checks the Workers configuration to ensure that the input values are
|
||||||
|
Loading…
Reference in New Issue
Block a user