forked from TrueCloudLab/frostfs-node
[#64] node: Use pool_size_local and separate pool for local puts
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
7eaf159a8b
commit
73bb590cb1
10 changed files with 31 additions and 5 deletions
|
@ -496,6 +496,10 @@ type cfgObjectRoutines struct {
|
|||
|
||||
putRemoteCapacity int
|
||||
|
||||
putLocal *ants.Pool
|
||||
|
||||
putLocalCapacity int
|
||||
|
||||
replicatorPoolSize int
|
||||
|
||||
replication *ants.Pool
|
||||
|
@ -834,10 +838,13 @@ func initObjectPool(cfg *config.Config) (pool cfgObjectRoutines) {
|
|||
optNonBlocking := ants.WithNonblocking(true)
|
||||
|
||||
pool.putRemoteCapacity = objectconfig.Put(cfg).PoolSizeRemote()
|
||||
|
||||
pool.putRemote, err = ants.NewPool(pool.putRemoteCapacity, optNonBlocking)
|
||||
fatalOnErr(err)
|
||||
|
||||
pool.putLocalCapacity = objectconfig.Put(cfg).PoolSizeLocal()
|
||||
pool.putLocal, err = ants.NewPool(pool.putLocalCapacity, optNonBlocking)
|
||||
fatalOnErr(err)
|
||||
|
||||
pool.replicatorPoolSize = replicatorconfig.PoolSize(cfg)
|
||||
if pool.replicatorPoolSize <= 0 {
|
||||
pool.replicatorPoolSize = pool.putRemoteCapacity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue