mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: remove async+sync seperation in resource tracker (#1254)
This simplifies resource tracker. Originally, logically we had split the cpu/mem into two pools where a 20% was kept specifically for sync calls to avoid async calls dominating the system. However, resource tracker should not handle such call prioritization. Given the improvements to the evictor, I think we can get rid of this code in resource tracker for time being.
This commit is contained in:
@@ -259,7 +259,7 @@ func (a *agent) GetCall(opts ...CallOpt) (Call, error) {
|
||||
}
|
||||
|
||||
mem := c.Memory + uint64(c.TmpFsSize)
|
||||
if !a.resources.IsResourcePossible(mem, c.CPUs, c.Type == models.TypeAsync) {
|
||||
if !a.resources.IsResourcePossible(mem, c.CPUs) {
|
||||
return nil, models.ErrCallResourceTooBig
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user