Hi, guys. then, in spite of `initicalCount` is more readable than `count`, but someone afraid that `renaming the field would be a breaking change` . i think we can change count to initialCount directly, And this problem: renaming the field would be a breaking change, i think it is not a problem, because this pr's all changes in invoker side only, after applied this pr to new invoker, has no bad influences on old invokers and other components(e.g. controller). in spite of controller has runtime info, it just has only one effect: print the detail runtime.
-----Original Message----- From: "甯尤刚"<[email protected]> To: <[email protected]>; Cc: Sent: 2020/4/28周二 08:32 (GMT+08:00) Subject: Adjust prewarm container dynamically Hi, guys. I wrote a pr here(Adjust prewarm container dynamically): https://github.com/apache/openwhisk/pull/4058 This feature is disabled by default. if want to use it, can add some extra configuration in runtimes.json as below "stemCells": [ { "initialCount": 2, //filedName is changed from count to initialCount "memory": "256 MB", "reactive": { "minCount": 1, "maxCount": 4, "ttl": "2 minutes", "threshold": 1, "increment": 1 } } ] initialCount means create init containers when invoker starts reactive is optional(disabled by default), have several sub configuration 1. minCount: if some prewarmed containers are deleted due to unused, need to keep minCount containers not to be deleted. 2. maxCount: can't create more containers more than maxCount. 3. ttl: if the container is not used after ttl time, the container needs to be deleted if total prewarmed containers is greater than minCount 4. threshold/increment: per cold start number happened(threshold) in previous minute, the per increment prewarmed containers need to be created, calculation formula is: number of new created prewarmed containers = (number of cold start in previous minute / threshold) * increment e.g. let's assume threshole is `1`, increment is `1` as well. in previous minute, if cold start number is `1`, increment is `1`, need to add prewarmed container: `1/1 * 1 = 1`. if cold start number is `2`, increment is `1`, need to add prewarmed container: `2/1 * 1 = 2`. Have any suggestion?
