Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support reloading pool sizes with SIGHUP #3019

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Conversation

End-rey
Copy link
Contributor

@End-rey End-rey commented Nov 20, 2024

Get new pool sizes from these fields in config:

  • object.put.pool_size_remote
  • replicator.pool_size (but I noticed that it is immediately overwritten by this function, maybe I should also reload policer.max_workers?)
  • storage.shard_pool_size

Refs #1770.

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 29.16667% with 17 lines in your changes missing coverage. Please review.

Project coverage is 22.85%. Comparing base (1092989) to head (b40b85c).
Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
cmd/neofs-node/config.go 0.00% 16 Missing ⚠️
pkg/util/worker_pool.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3019   +/-   ##
=======================================
  Coverage   22.84%   22.85%           
=======================================
  Files         791      791           
  Lines       58684    58709   +25     
=======================================
+ Hits        13409    13418    +9     
- Misses      44377    44394   +17     
+ Partials      898      897    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

pkg/local_object_storage/engine/control.go Show resolved Hide resolved
pkg/local_object_storage/engine/control.go Outdated Show resolved Hide resolved
cmd/neofs-node/config.go Outdated Show resolved Hide resolved
cmd/neofs-node/config.go Outdated Show resolved Hide resolved
@End-rey End-rey force-pushed the sighup-reload-pool-sizes branch from 552711d to 32dce46 Compare November 21, 2024 10:33
@@ -21,6 +21,9 @@ type WorkerPool interface {
// functions have returned so synchronization must be achieved
// via other means (e.g. sync.WaitGroup).
Release()

// Tune changes the capacity of this pool.
Tune(int)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this change solve something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for _, pool := range e.shardPools {
pool.Tune(int(e.shardPoolSize))
}

e.shardPools are WorkerPools, and I need to Tune.

@@ -860,6 +875,10 @@ func (c *cfg) configWatcher(ctx context.Context) {

c.shared.policer.Reload(c.policerOpts()...)

// Pool

c.reloadObjectPoolSizes()
Copy link
Member

@carpawell carpawell Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you, please, put it before // Policer or even // Logger? imo it would be more convenient: first some internal things and then a series of Reload()

@roman-khimov
Copy link
Member

Conflicts.

Change sizes of the `replication` and `putRemote` pools.

Refs #1770.

Signed-off-by: Andrey Butusov <[email protected]>
@End-rey End-rey force-pushed the sighup-reload-pool-sizes branch from 32dce46 to b40b85c Compare November 21, 2024 16:04
@roman-khimov roman-khimov merged commit d0b3744 into master Nov 21, 2024
22 checks passed
@roman-khimov roman-khimov deleted the sighup-reload-pool-sizes branch November 21, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants