mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-01 18:01:28 -06:00
Make the number of concurrent goroutines in decomposedfs configurable (#5887)
* Make the number of concurrent goroutines in decomposedfs configurable * Update services/storage-users/pkg/config/config.go Co-authored-by: Martin <github@diemattels.at> * Update services/storage-users/pkg/config/config.go Co-authored-by: Martin <github@diemattels.at> --------- Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de> Co-authored-by: Martin <github@diemattels.at>
This commit is contained in:
@@ -113,6 +113,7 @@ type OCISDriver struct {
|
||||
ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OCIS_SHARE_FOLDER" desc:"Name of the folder jailing all shares."`
|
||||
MaxAcquireLockCycles int `yaml:"max_acquire_lock_cycles" env:"STORAGE_USERS_OCIS_MAX_ACQUIRE_LOCK_CYCLES" desc:"When trying to lock files, ocis will try this amount of times to acquire the lock before failing. After each try it will wait for an increasing amount of time. Values of 0 or below will be ignored and the default value of 20 will be used."`
|
||||
LockCycleDurationFactor int `yaml:"lock_cycle_duration_factor" env:"STORAGE_USERS_OCIS_LOCK_CYCLE_DURATION_FACTOR" desc:"When trying to lock files, ocis will multiply the cycle with this factor and use it as a millisecond timeout. Values of 0 or below will be ignored and the default value of 30 will be used."`
|
||||
MaxConcurrency int `yaml:"max_concurrency" env:"STORAGE_USERS_OCIS_MAX_CONCURRENCY" desc:"Maximum number of concurrent go-routines. Higher values can potentially get work done faster but will also cause more load on the system. Values of 0 or below will be ignored and the default value of 100 will be used."`
|
||||
AsyncUploads bool `yaml:"async_uploads" env:"STORAGE_USERS_OCIS_ASYNC_UPLOADS" desc:"Enable asynchronous file uploads."`
|
||||
MaxQuota uint64 `yaml:"max_quota" env:"OCIS_SPACES_MAX_QUOTA;STORAGE_USERS_OCIS_MAX_QUOTA" desc:"Set a global max quota for spaces in bytes. A value of 0 equals unlimited. If not using the global OCIS_SPACES_MAX_QUOTA, you must define the FRONTEND_MAX_QUOTA in the frontend service."`
|
||||
}
|
||||
@@ -139,6 +140,7 @@ type S3NGDriver struct {
|
||||
ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_S3NG_SHARE_FOLDER" desc:"Name of the folder jailing all shares."`
|
||||
MaxAcquireLockCycles int `yaml:"max_acquire_lock_cycles" env:"STORAGE_USERS_S3NG_MAX_ACQUIRE_LOCK_CYCLES" desc:"When trying to lock files, ocis will try this amount of times to acquire the lock before failing. After each try it will wait for an increasing amount of time. Values of 0 or below will be ignored and the default value of 20 will be used."`
|
||||
LockCycleDurationFactor int `yaml:"lock_cycle_duration_factor" env:"STORAGE_USERS_S3NG_LOCK_CYCLE_DURATION_FACTOR" desc:"When trying to lock files, ocis will multiply the cycle with this factor and use it as a millisecond timeout. Values of 0 or below will be ignored and the default value of 30 will be used."`
|
||||
MaxConcurrency int `yaml:"max_concurrency" env:"STORAGE_USERS_S3NG_MAX_CONCURRENCY" desc:"Maximum number of concurrent go-routines. Higher values can potentially get work done faster but will also cause more load on the system. Values of 0 or below will be ignored and the default value of 100 will be used."`
|
||||
}
|
||||
|
||||
// OwnCloudSQLDriver is the storage driver configuration when using 'owncloudsql' storage driver
|
||||
|
||||
@@ -123,6 +123,7 @@ func Ocis(cfg *config.Config) map[string]interface{} {
|
||||
"permissionssvc_tls_mode": cfg.Commons.GRPCClientTLS.Mode,
|
||||
"max_acquire_lock_cycles": cfg.Drivers.OCIS.MaxAcquireLockCycles,
|
||||
"lock_cycle_duration_factor": cfg.Drivers.OCIS.LockCycleDurationFactor,
|
||||
"max_concurrency": cfg.Drivers.OCIS.MaxConcurrency,
|
||||
"asyncfileuploads": cfg.Drivers.OCIS.AsyncUploads,
|
||||
"max_quota": cfg.Drivers.OCIS.MaxQuota,
|
||||
"statcache": map[string]interface{}{
|
||||
@@ -166,6 +167,7 @@ func OcisNoEvents(cfg *config.Config) map[string]interface{} {
|
||||
"permissionssvc_tls_mode": cfg.Commons.GRPCClientTLS.Mode,
|
||||
"max_acquire_lock_cycles": cfg.Drivers.OCIS.MaxAcquireLockCycles,
|
||||
"lock_cycle_duration_factor": cfg.Drivers.OCIS.LockCycleDurationFactor,
|
||||
"max_concurrency": cfg.Drivers.OCIS.MaxConcurrency,
|
||||
"max_quota": cfg.Drivers.OCIS.MaxQuota,
|
||||
"statcache": map[string]interface{}{
|
||||
"cache_store": cfg.Cache.Store,
|
||||
@@ -213,6 +215,7 @@ func S3NG(cfg *config.Config) map[string]interface{} {
|
||||
"s3.bucket": cfg.Drivers.S3NG.Bucket,
|
||||
"max_acquire_lock_cycles": cfg.Drivers.S3NG.MaxAcquireLockCycles,
|
||||
"lock_cycle_duration_factor": cfg.Drivers.S3NG.LockCycleDurationFactor,
|
||||
"max_concurrency": cfg.Drivers.S3NG.MaxConcurrency,
|
||||
"asyncfileuploads": cfg.Drivers.OCIS.AsyncUploads,
|
||||
"statcache": map[string]interface{}{
|
||||
"cache_store": cfg.Cache.Store,
|
||||
@@ -259,6 +262,7 @@ func S3NGNoEvents(cfg *config.Config) map[string]interface{} {
|
||||
"s3.endpoint": cfg.Drivers.S3NG.Endpoint,
|
||||
"s3.bucket": cfg.Drivers.S3NG.Bucket,
|
||||
"max_acquire_lock_cycles": cfg.Drivers.S3NG.MaxAcquireLockCycles,
|
||||
"max_concurrency": cfg.Drivers.S3NG.MaxConcurrency,
|
||||
"lock_cycle_duration_factor": cfg.Drivers.S3NG.LockCycleDurationFactor,
|
||||
"statcache": map[string]interface{}{
|
||||
"cache_store": cfg.Cache.Store,
|
||||
|
||||
Reference in New Issue
Block a user