adjust memory limit multipliers for the default limiters

This commit is contained in:
vyzo 2022-01-11 10:56:37 +02:00
parent d22a48d4b0
commit 927d2d70b5
2 changed files with 12 additions and 12 deletions

View File

@ -94,15 +94,15 @@ func NewDynamicLimiter(memFraction float64, minMemory, maxMemory int64) *BasicLi
BaseLimit: DefaultSystemBaseLimit(),
}
transient := &DynamicLimit{
MinMemory: minMemory / 16,
MaxMemory: maxMemory / 16,
MemoryFraction: memFraction / 16,
MinMemory: minMemory / 4,
MaxMemory: maxMemory / 4,
MemoryFraction: memFraction / 4,
BaseLimit: DefaultTransientBaseLimit(),
}
svc := &DynamicLimit{
MinMemory: minMemory / 2,
MaxMemory: maxMemory / 2,
MemoryFraction: memFraction / 2,
MinMemory: minMemory / 4,
MaxMemory: maxMemory / 4,
MemoryFraction: memFraction / 4,
BaseLimit: DefaultServiceBaseLimit(),
}
proto := &DynamicLimit{
@ -112,9 +112,9 @@ func NewDynamicLimiter(memFraction float64, minMemory, maxMemory int64) *BasicLi
BaseLimit: DefaultProtocolBaseLimit(),
}
peer := &DynamicLimit{
MinMemory: minMemory / 16,
MaxMemory: maxMemory / 16,
MemoryFraction: memFraction / 16,
MinMemory: minMemory / 4,
MaxMemory: maxMemory / 4,
MemoryFraction: memFraction / 4,
BaseLimit: DefaultPeerBaseLimit(),
}
conn := &StaticLimit{

View File

@ -84,11 +84,11 @@ func newDefaultStaticLimiter(memoryCap int64) *BasicLimiter {
BaseLimit: DefaultSystemBaseLimit(),
}
transient := &StaticLimit{
Memory: memoryCap / 16,
Memory: memoryCap / 4,
BaseLimit: DefaultTransientBaseLimit(),
}
svc := &StaticLimit{
Memory: memoryCap / 2,
Memory: memoryCap / 4,
BaseLimit: DefaultServiceBaseLimit(),
}
proto := &StaticLimit{
@ -96,7 +96,7 @@ func newDefaultStaticLimiter(memoryCap int64) *BasicLimiter {
BaseLimit: DefaultProtocolBaseLimit(),
}
peer := &StaticLimit{
Memory: memoryCap / 16,
Memory: memoryCap / 4,
BaseLimit: DefaultPeerBaseLimit(),
}
conn := &StaticLimit{