From 2269d2cf2719184b9d841bdbb7c1a572c3cb4519 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Mon, 29 Jan 2024 14:21:19 +0100 Subject: [PATCH] change default for MaxConcurrency Signed-off-by: Christian Richter --- changelog/unreleased/concurrency-defaults.md | 8 ++++++++ go.mod | 2 +- go.sum | 4 ++-- .../storage-users/pkg/config/defaults/defaultconfig.go | 2 ++ .../v2/pkg/storage/utils/decomposedfs/options/options.go | 2 +- vendor/modules.txt | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/concurrency-defaults.md diff --git a/changelog/unreleased/concurrency-defaults.md b/changelog/unreleased/concurrency-defaults.md new file mode 100644 index 0000000000..6faa701892 --- /dev/null +++ b/changelog/unreleased/concurrency-defaults.md @@ -0,0 +1,8 @@ +Enhancement: Modify the concurrency default + +We have changed the default MaxConcurrency value from 100 to 5 to prevent too frequent gc runs on low memory systems. +We have also bumped reva to pull in the related changes from there. + +https://github.com/owncloud/ocis/pull/8309 +https://github.com/owncloud/ocis/issues/8257 +https://github.com/cs3org/reva/pull/4485 diff --git a/go.mod b/go.mod index 8825edc79d..c5e3ef35c2 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.9.0 github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 - github.com/cs3org/reva/v2 v2.18.1-0.20240126141248-c9e4a3bcd0da + github.com/cs3org/reva/v2 v2.18.1-0.20240129131717-cff0a2eeb959 github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25 github.com/disintegration/imaging v1.6.2 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e diff --git a/go.sum b/go.sum index 979d48a781..36f8bae17a 100644 --- a/go.sum +++ b/go.sum @@ -1019,8 +1019,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c= github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME= github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY= github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.18.1-0.20240126141248-c9e4a3bcd0da h1:VgWIr/lE6cv2f5IjjWgR0LOAK41gsUytBsSZo/4DRq4= -github.com/cs3org/reva/v2 v2.18.1-0.20240126141248-c9e4a3bcd0da/go.mod h1:GCN3g6uYE0Nvd31dGlhaGGyUviUfbG2NkecPRv5oSc4= +github.com/cs3org/reva/v2 v2.18.1-0.20240129131717-cff0a2eeb959 h1:8uiYRWlbrhQJk4pHawpJUTFx/Yy0G5yvMYam2TMKDYo= +github.com/cs3org/reva/v2 v2.18.1-0.20240129131717-cff0a2eeb959/go.mod h1:GCN3g6uYE0Nvd31dGlhaGGyUviUfbG2NkecPRv5oSc4= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= diff --git a/services/storage-users/pkg/config/defaults/defaultconfig.go b/services/storage-users/pkg/config/defaults/defaultconfig.go index 82a65ff790..65510c8ec0 100644 --- a/services/storage-users/pkg/config/defaults/defaultconfig.go +++ b/services/storage-users/pkg/config/defaults/defaultconfig.go @@ -73,6 +73,7 @@ func DefaultConfig() *config.Config { GeneralSpaceAliasTemplate: "{{.SpaceType}}/{{.SpaceName | replace \" \" \"-\" | lower}}", PermissionsEndpoint: "com.owncloud.api.settings", MaxAcquireLockCycles: 20, + MaxConcurrency: 5, LockCycleDurationFactor: 30, }, OCIS: config.OCISDriver{ @@ -85,6 +86,7 @@ func DefaultConfig() *config.Config { GeneralSpaceAliasTemplate: "{{.SpaceType}}/{{.SpaceName | replace \" \" \"-\" | lower}}", PermissionsEndpoint: "com.owncloud.api.settings", MaxAcquireLockCycles: 20, + MaxConcurrency: 5, LockCycleDurationFactor: 30, AsyncUploads: true, }, diff --git a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/options/options.go b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/options/options.go index f58edff6a2..f21912687c 100644 --- a/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/options/options.go +++ b/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/options/options.go @@ -149,7 +149,7 @@ func New(m map[string]interface{}) (*Options, error) { } if o.MaxConcurrency <= 0 { - o.MaxConcurrency = 100 + o.MaxConcurrency = 5 } if o.Propagator == "" { diff --git a/vendor/modules.txt b/vendor/modules.txt index fdd0e2920c..95160eb6b3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -362,7 +362,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1 github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1 github.com/cs3org/go-cs3apis/cs3/tx/v1beta1 github.com/cs3org/go-cs3apis/cs3/types/v1beta1 -# github.com/cs3org/reva/v2 v2.18.1-0.20240126141248-c9e4a3bcd0da +# github.com/cs3org/reva/v2 v2.18.1-0.20240129131717-cff0a2eeb959 ## explicit; go 1.21 github.com/cs3org/reva/v2/cmd/revad/internal/grace github.com/cs3org/reva/v2/cmd/revad/runtime