Process is stuck with more virtual memory than physical memory available
I have a process that seems to be stuck in an interesting way. top shows this:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
38984 gergely 20 0 332m 276 184 S 0.7 0.0 18:13.16 Holmake
79492 gergely 20 0 10.7g 6.5g 316 D 0.7 84.5 107:04.76 buildheap
buildheap uses 84.5% of physical memory and 10.7 GB of virtual memory in all. This is on a machine with 8GB physical memory assigned. But the process itself uses only 0.7% of the cpu cycles.
Following answer Linux: how to detect if a process is thrashing too much?
the 12th variable in /proc/79492/stat is 336236. Is this way too high?
$ cat /proc/79492/oom_score
333
Again this is not clear whether this is too high or not.
Does this show too much thrashing?
And, is there any other cure than asking the sysadmin to assign more phyiscal memory to the machine?
process swap
add a comment |
I have a process that seems to be stuck in an interesting way. top shows this:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
38984 gergely 20 0 332m 276 184 S 0.7 0.0 18:13.16 Holmake
79492 gergely 20 0 10.7g 6.5g 316 D 0.7 84.5 107:04.76 buildheap
buildheap uses 84.5% of physical memory and 10.7 GB of virtual memory in all. This is on a machine with 8GB physical memory assigned. But the process itself uses only 0.7% of the cpu cycles.
Following answer Linux: how to detect if a process is thrashing too much?
the 12th variable in /proc/79492/stat is 336236. Is this way too high?
$ cat /proc/79492/oom_score
333
Again this is not clear whether this is too high or not.
Does this show too much thrashing?
And, is there any other cure than asking the sysadmin to assign more phyiscal memory to the machine?
process swap
add a comment |
I have a process that seems to be stuck in an interesting way. top shows this:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
38984 gergely 20 0 332m 276 184 S 0.7 0.0 18:13.16 Holmake
79492 gergely 20 0 10.7g 6.5g 316 D 0.7 84.5 107:04.76 buildheap
buildheap uses 84.5% of physical memory and 10.7 GB of virtual memory in all. This is on a machine with 8GB physical memory assigned. But the process itself uses only 0.7% of the cpu cycles.
Following answer Linux: how to detect if a process is thrashing too much?
the 12th variable in /proc/79492/stat is 336236. Is this way too high?
$ cat /proc/79492/oom_score
333
Again this is not clear whether this is too high or not.
Does this show too much thrashing?
And, is there any other cure than asking the sysadmin to assign more phyiscal memory to the machine?
process swap
I have a process that seems to be stuck in an interesting way. top shows this:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
38984 gergely 20 0 332m 276 184 S 0.7 0.0 18:13.16 Holmake
79492 gergely 20 0 10.7g 6.5g 316 D 0.7 84.5 107:04.76 buildheap
buildheap uses 84.5% of physical memory and 10.7 GB of virtual memory in all. This is on a machine with 8GB physical memory assigned. But the process itself uses only 0.7% of the cpu cycles.
Following answer Linux: how to detect if a process is thrashing too much?
the 12th variable in /proc/79492/stat is 336236. Is this way too high?
$ cat /proc/79492/oom_score
333
Again this is not clear whether this is too high or not.
Does this show too much thrashing?
And, is there any other cure than asking the sysadmin to assign more phyiscal memory to the machine?
process swap
process swap
asked Dec 11 at 14:01
Gergely
354314
354314
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I wouldn't assume that memory exhaustion is the problem. If it was, I'd expect to see the process terminated by the kernel OOM (out of memory) killer, or page allocation faults in dmesg. Also bear in mind that overcommitting of memory and swapping is "normal", although there are obvious performance implications.
The easiest way to see what's really going on is to use strace to dump out the processes syscalls.
strace -p <PID>
will attach strace to a running process, "-p" option is for PID of the process.
Alternatively, you can run your program directly with strace:
strace buildheap
With a bit of luck you'll be able to see what the process is waiting on, such as trying to read a file it doesn't have permission to access.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487353%2fprocess-is-stuck-with-more-virtual-memory-than-physical-memory-available%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I wouldn't assume that memory exhaustion is the problem. If it was, I'd expect to see the process terminated by the kernel OOM (out of memory) killer, or page allocation faults in dmesg. Also bear in mind that overcommitting of memory and swapping is "normal", although there are obvious performance implications.
The easiest way to see what's really going on is to use strace to dump out the processes syscalls.
strace -p <PID>
will attach strace to a running process, "-p" option is for PID of the process.
Alternatively, you can run your program directly with strace:
strace buildheap
With a bit of luck you'll be able to see what the process is waiting on, such as trying to read a file it doesn't have permission to access.
add a comment |
I wouldn't assume that memory exhaustion is the problem. If it was, I'd expect to see the process terminated by the kernel OOM (out of memory) killer, or page allocation faults in dmesg. Also bear in mind that overcommitting of memory and swapping is "normal", although there are obvious performance implications.
The easiest way to see what's really going on is to use strace to dump out the processes syscalls.
strace -p <PID>
will attach strace to a running process, "-p" option is for PID of the process.
Alternatively, you can run your program directly with strace:
strace buildheap
With a bit of luck you'll be able to see what the process is waiting on, such as trying to read a file it doesn't have permission to access.
add a comment |
I wouldn't assume that memory exhaustion is the problem. If it was, I'd expect to see the process terminated by the kernel OOM (out of memory) killer, or page allocation faults in dmesg. Also bear in mind that overcommitting of memory and swapping is "normal", although there are obvious performance implications.
The easiest way to see what's really going on is to use strace to dump out the processes syscalls.
strace -p <PID>
will attach strace to a running process, "-p" option is for PID of the process.
Alternatively, you can run your program directly with strace:
strace buildheap
With a bit of luck you'll be able to see what the process is waiting on, such as trying to read a file it doesn't have permission to access.
I wouldn't assume that memory exhaustion is the problem. If it was, I'd expect to see the process terminated by the kernel OOM (out of memory) killer, or page allocation faults in dmesg. Also bear in mind that overcommitting of memory and swapping is "normal", although there are obvious performance implications.
The easiest way to see what's really going on is to use strace to dump out the processes syscalls.
strace -p <PID>
will attach strace to a running process, "-p" option is for PID of the process.
Alternatively, you can run your program directly with strace:
strace buildheap
With a bit of luck you'll be able to see what the process is waiting on, such as trying to read a file it doesn't have permission to access.
answered Dec 11 at 14:35
timmins
213
213
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487353%2fprocess-is-stuck-with-more-virtual-memory-than-physical-memory-available%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown