Config: Reduce workers default
CPUs with with hyper-threading can't properly manage the load otherwise.
This commit is contained in:
parent
d215f782e6
commit
8627153288
1 changed files with 2 additions and 2 deletions
|
@ -331,7 +331,7 @@ func (c *Config) Workers() int {
|
|||
numCPU := runtime.NumCPU()
|
||||
|
||||
// Limit number of workers when using SQLite to avoid database locking issues.
|
||||
if c.DatabaseDriver() == SQLite && numCPU > 4 && c.options.Workers <= 0 {
|
||||
if c.DatabaseDriver() == SQLite && numCPU >= 8 && c.options.Workers <= 0 {
|
||||
return 4
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ func (c *Config) Workers() int {
|
|||
}
|
||||
|
||||
if numCPU > 1 {
|
||||
return numCPU - 1
|
||||
return numCPU / 2
|
||||
}
|
||||
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue