forked from TrueCloudLab/frostfs-node
[#845] object/put: Separate pools for local and remote operations
In previous implementation Object PUT used single pool of workers for local and remote ops, but these ops are heterogeneous. Use remote/local pool for remote/local operations in PUT service. At first the pools are configured with the same size. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3b2b6007c6
commit
ee20200c2e
5 changed files with 25 additions and 10 deletions
|
@ -195,7 +195,7 @@ type cfgLocalStorage struct {
|
|||
}
|
||||
|
||||
type cfgObjectRoutines struct {
|
||||
put *ants.Pool
|
||||
putRemote, putLocal *ants.Pool
|
||||
}
|
||||
|
||||
type cfgControlService struct {
|
||||
|
@ -435,7 +435,12 @@ func initObjectPool(cfg *config.Config) (pool cfgObjectRoutines) {
|
|||
|
||||
optNonBlocking := ants.WithNonblocking(true)
|
||||
|
||||
pool.put, err = ants.NewPool(objectconfig.Put(cfg).PoolSize(), optNonBlocking)
|
||||
pool.putRemote, err = ants.NewPool(objectconfig.Put(cfg).PoolSize(), optNonBlocking)
|
||||
if err != nil {
|
||||
fatalOnErr(err)
|
||||
}
|
||||
|
||||
pool.putLocal, err = ants.NewPool(objectconfig.Put(cfg).PoolSize(), optNonBlocking)
|
||||
if err != nil {
|
||||
fatalOnErr(err)
|
||||
}
|
||||
|
|
|
@ -281,7 +281,7 @@ func initObjectService(c *cfg) {
|
|||
objectCore.WithDeleteHandler(objInhumer),
|
||||
),
|
||||
putsvc.WithNetworkState(c.cfgNetmap.state),
|
||||
putsvc.WithWorkerPool(c.cfgObject.pool.put),
|
||||
putsvc.WithWorkerPools(c.cfgObject.pool.putRemote, c.cfgObject.pool.putLocal),
|
||||
putsvc.WithLogger(c.log),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue