-
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
take prewarmed container's memory as used memory #4911
take prewarmed container's memory as used memory #4911
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4911 +/- ##
==========================================
- Coverage 83.38% 77.28% -6.10%
==========================================
Files 201 201
Lines 9441 9446 +5
Branches 396 398 +2
==========================================
- Hits 7872 7300 -572
- Misses 1569 2146 +577
Continue to review full report at Codecov.
|
Below prs has relation with current pr
|
upsteam guy: Tyson replied on dev mail list for this pr as below
Regarding
Regarding |
|
||
val prewarmedPoolForOtherKind = prewarmedPool.filter { info => | ||
info match { | ||
case (_, PreWarmedData(_, `kind`, `memory`, _, _)) => false |
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.
Why does it require filtering prewarm pool for other kinds?
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.
hm.. i forgot the reason why i want to get the other kind/memory prewarmpool
:(,
but then, i feel use prewarmedPool
directly is more nature, already updated.
370ddef
to
4187f34
Compare
4187f34
to
31741d1
Compare
val createdContainer = | ||
// Is there enough space on the invoker for this action to be executed. | ||
if (hasPoolSpaceFor(busyPool, r.action.limits.memory.megabytes.MB)) { | ||
if (hasPoolSpaceFor(busyPool ++ prewarmedPool, memory)) { |
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.
I feel this needs proper documentation.
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.
LGTM with a minor nit.
31741d1
to
f933685
Compare
f933685
to
22db3cb
Compare
Codecov Report
@@ Coverage Diff @@
## master #4911 +/- ##
===========================================
+ Coverage 29.09% 76.85% +47.76%
===========================================
Files 195 202 +7
Lines 9553 9820 +267
Branches 413 416 +3
===========================================
+ Hits 2779 7547 +4768
+ Misses 6774 2273 -4501
Continue to review full report at Codecov.
|
Merged as it has been around 2 months. |
Description
Due to this pr (Adjust prewarm container dynamically): #4871 is merged
I think it is a good chance to add this feature.
for master branch, if invoker has
16GB
physical memory, currently, if we configure 12GB user memory and 5GB prewarm pool, invokers will try to create containers up to 17GB memory and it may will end up with OOM.After apply this feature, user just configure invoker memory to a precise value:
16GB
, when reaches16GB
, it will not create container any more, this can avoidOOM
This has another benefit that make user must calculate the prewarmed container's memory carefully, and configure the invoker memory more accurately
Related issue and scope
My changes affect the following components
Types of changes
Checklist: