[#9999] config: Add shard.limits config

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2025-02-04 18:20:48 +03:00
parent 5d79abe523
commit 8c22d3d156
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0
9 changed files with 521 additions and 4 deletions

View file

@ -154,6 +154,45 @@ FROSTFS_STORAGE_SHARD_0_GC_REMOVER_SLEEP_INTERVAL=2m
FROSTFS_STORAGE_SHARD_0_GC_EXPIRED_COLLECTOR_BATCH_SIZE=1500
#### Limit of concurrent workers collecting expired objects by the garbage collector
FROSTFS_STORAGE_SHARD_0_GC_EXPIRED_COLLECTOR_WORKER_COUNT=15
#### Limits config
FROSTFS_STORAGE_SHARD_0_LIMITS_MAX_READ_RUNNING_OPS=10000
FROSTFS_STORAGE_SHARD_0_LIMITS_MAX_READ_WAITING_OPS=1000
FROSTFS_STORAGE_SHARD_0_LIMITS_MAX_WRITE_RUNNING_OPS=1000
FROSTFS_STORAGE_SHARD_0_LIMITS_MAX_WRITE_WAITING_OPS=100
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_0_TAG=internal
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_0_WEIGHT=20
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_0_LIMIT_OPS=0
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_0_RESERVED_OPS=1000
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_1_TAG=client
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_1_WEIGHT=70
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_1_RESERVED_OPS=10000
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_2_TAG=background
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_2_WEIGHT=5
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_2_LIMIT_OPS=10000
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_2_RESERVED_OPS=0
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_3_TAG=writecache
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_3_WEIGHT=5
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_3_LIMIT_OPS=25000
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_4_TAG=policer
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_4_WEIGHT=5
FROSTFS_STORAGE_SHARD_0_LIMITS_READ_4_LIMIT_OPS=25000
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_0_TAG=internal
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_0_WEIGHT=200
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_0_LIMIT_OPS=0
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_0_RESERVED_OPS=100
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_1_TAG=client
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_1_WEIGHT=700
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_1_RESERVED_OPS=1000
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_2_TAG=background
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_2_WEIGHT=50
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_2_LIMIT_OPS=1000
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_2_RESERVED_OPS=0
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_3_TAG=writecache
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_3_WEIGHT=50
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_3_LIMIT_OPS=2500
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_4_TAG=policer
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_4_WEIGHT=50
FROSTFS_STORAGE_SHARD_0_LIMITS_WRITE_4_LIMIT_OPS=2500
## 1 shard
### Flag to refill Metabase from BlobStor

View file

@ -139,7 +139,10 @@
"skip_session_token_issuer_verification": true
},
"get": {
"priority": ["$attribute:ClusterName", "$attribute:UN-LOCODE"]
"priority": [
"$attribute:ClusterName",
"$attribute:UN-LOCODE"
]
}
},
"storage": {
@ -170,7 +173,8 @@
},
"compress": true,
"compression_exclude_content_types": [
"audio/*", "video/*"
"audio/*",
"video/*"
],
"compression_estimate_compressibility": true,
"compression_estimate_compressibility_threshold": 0.7,
@ -206,6 +210,70 @@
"remover_sleep_interval": "2m",
"expired_collector_batch_size": 1500,
"expired_collector_worker_count": 15
},
"limits": {
"max_read_running_ops": 10000,
"max_read_waiting_ops": 1000,
"max_write_running_ops": 1000,
"max_write_waiting_ops": 100,
"read": [
{
"tag": "internal",
"weight": 20,
"limit_ops": 0,
"reserved_ops": 1000
},
{
"tag": "client",
"weight": 70,
"reserved_ops": 10000
},
{
"tag": "background",
"weight": 5,
"limit_ops": 10000,
"reserved_ops": 0
},
{
"tag": "writecache",
"weight": 5,
"limit_ops": 25000
},
{
"tag": "policer",
"weight": 5,
"limit_ops": 25000
}
],
"write": [
{
"tag": "internal",
"weight": 200,
"limit_ops": 0,
"reserved_ops": 100
},
{
"tag": "client",
"weight": 700,
"reserved_ops": 1000
},
{
"tag": "background",
"weight": 50,
"limit_ops": 1000,
"reserved_ops": 0
},
{
"tag": "writecache",
"weight": 50,
"limit_ops": 2500
},
{
"tag": "policer",
"weight": 50,
"limit_ops": 2500
}
]
}
},
"1": {
@ -267,7 +335,7 @@
"endpoint": "localhost",
"exporter": "otlp_grpc",
"trusted_ca": "",
"attributes":[
"attributes": [
{
"key": "key0",
"value": "value"
@ -296,7 +364,7 @@
},
{
"mask": "10.78.70.74/24",
"source_ips":[
"source_ips": [
"10.78.70.185",
"10.78.71.185"
]

View file

@ -219,6 +219,48 @@ storage:
expired_collector_batch_size: 1500 # number of objects to be marked expired by the garbage collector
expired_collector_worker_count: 15 # number of concurrent workers collecting expired objects by the garbage collector
limits:
max_read_running_ops: 10000
max_read_waiting_ops: 1000
max_write_running_ops: 1000
max_write_waiting_ops: 100
read:
- tag: internal
weight: 20
limit_ops: 0
reserved_ops: 1000
- tag: client
weight: 70
reserved_ops: 10000
- tag: background
weight: 5
limit_ops: 10000
reserved_ops: 0
- tag: writecache
weight: 5
limit_ops: 25000
- tag: policer
weight: 5
limit_ops: 25000
write:
- tag: internal
weight: 200
limit_ops: 0
reserved_ops: 100
- tag: client
weight: 700
reserved_ops: 1000
- tag: background
weight: 50
limit_ops: 1000
reserved_ops: 0
- tag: writecache
weight: 50
limit_ops: 2500
- tag: policer
weight: 50
limit_ops: 2500
1:
writecache:
path: tmp/1/cache # write-cache root directory