-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Updated PID pressure node condition. #57136
Conversation
19f4aab
to
6bea1d5
Compare
/retest |
ae8aa02
to
c48ae33
Compare
xref #43783 |
/retest |
} | ||
} | ||
|
||
if files, err := filepath.Glob("/proc/[0-9]*"); err == nil { |
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.
looks like syscall.Sysinfo also reports the number of processes. want to use that?
package main
import (
"fmt"
"syscall"
)
func main() {
var info syscall.Sysinfo_t
syscall.Sysinfo(&info);
fmt.Println("procs : ", info.Procs)
}
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.
That's better, let me try it :).
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.
it seems there's some gap between two way:
root@ubuntu-xenial:/home/ubuntu# ./main
procs : 140
procs : 120
package main
import (
"fmt"
"path/filepath"
"syscall"
)
func main() {
var info syscall.Sysinfo_t
syscall.Sysinfo(&info)
fmt.Println("procs : ", info.Procs)
if files, err := filepath.Glob("/proc/[0-9]*"); err == nil {
fmt.Println("procs : ", len(files))
}
}
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.
Those are the LWP's i believe they count towards the pid_max too
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.
let me ping Go community to confirm :).
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.
The max pid is from /proc/sys/kernel/pid_max
, The value of current running process is from sysinfo.Procs, which actually the value of nr_threads
in kernel.
Question here is: If one node’s thread-max
< pid_max
, kernel can’t fork thread anymore if num of threads reaches thread-max
but not pid-max
, should we also consider about thread-max
?
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.
Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
/retest |
/retest |
@kubernetes/sig-node-pr-reviews |
ping for comments :). |
/cc @yujuhong |
@@ -40,6 +40,8 @@ const ( | |||
SignalAllocatableMemoryAvailable Signal = "allocatableMemory.available" | |||
// SignalAllocatableNodeFsAvailable is amount of local storage available for pod allocation | |||
SignalAllocatableNodeFsAvailable Signal = "allocatableNodeFs.available" | |||
// SignalPIDAvailable is amount of PID available for pod allocation | |||
SignalPIDAvailable Signal = "pid.available" |
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.
Would it make sense to have a node-allocatable amount of PIDs, like we do for other resources?
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.
ping :) |
/lgtm |
/lgtm |
@cjwagner why is all: you can safely ignore this, looking into why it is showing up though... |
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dixudx, k82cn, liggitt, vishh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
@k82cn: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Automatic merge from submit-queue (batch tested with PRs 57136, 59920). If you want to cherry-pick this change to another branch, please follow the instructions here. |
@BenTheElder This is WAI as far as I can tell. This PR modifies files that have the suffixes |
I see. I'm going to delete that job anyhow, thanks! |
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):part of #54313
Release note: