-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Scheduler] Implement FunctionPullingContainerPool #5102
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,13 @@ class ContainerPool(childFactory: ActorRefFactory => ActorRef, | |
.nextInt(v.toSeconds.toInt)) | ||
.getOrElse(0) | ||
.seconds | ||
context.system.scheduler.schedule(2.seconds, interval, self, AdjustPrewarmedContainer) | ||
if (prewarmConfig.exists(!_.reactive.isEmpty)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have no need to backfill the prewarm periodically if fyi, the reactive configuration in runtimes.json like below
|
||
context.system.scheduler.schedule( | ||
poolConfig.prewarmExpirationCheckInitDelay, | ||
interval, | ||
self, | ||
AdjustPrewarmedContainer) | ||
} | ||
|
||
def logContainerStart(r: Run, containerState: String, activeActivations: Int, container: Option[Container]): Unit = { | ||
val namespaceName = r.msg.user.namespace.name.asString | ||
|
@@ -590,9 +596,9 @@ object ContainerPool { | |
} | ||
.sortBy(_._2.expires.getOrElse(now)) | ||
|
||
// emit expired container counter metric with memory + kind | ||
MetricEmitter.emitCounterMetric(LoggingMarkers.CONTAINER_POOL_PREWARM_EXPIRED(memory.toString, kind)) | ||
if (expiredPrewarmedContainer.nonEmpty) { | ||
// emit expired container counter metric with memory + kind | ||
MetricEmitter.emitCounterMetric(LoggingMarkers.CONTAINER_POOL_PREWARM_EXPIRED(memory.toString, kind)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If expiredPrewarmedContainer is empty, have no need to emit this counter metric. |
||
logging.info( | ||
this, | ||
s"[kind: ${kind} memory: ${memory.toString}] ${expiredPrewarmedContainer.size} expired prewarmed containers") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these following two configurations used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but for
prewarm-promotion
, is used in FunctionPullingContainerPool only, and the configuration isfalse
which mean, didn't take prewarm container which has bigger memory