mirror of https://github.com/BOINC/boinc.git
client: fix memory accounting for VM apps
At some point we decided that OS reporting of mem usage for VM apps was wrong, and we use wu.rsc_mem_usage instead. Fix: use this only for running VM apps; for non-running, use zero. Also, in mem usage print (mem_usage_debug) show whether the job is running.
This commit is contained in:
parent
f5a3309759
commit
4312c6c3bc
|
@ -409,11 +409,7 @@ void ACTIVE_TASK_SET::get_memory_usage() {
|
|||
// the memory of virtual machine apps is not reported correctly,
|
||||
// at least on Windows. Use the VM size instead.
|
||||
//
|
||||
if (atp->scheduler_state == CPU_SCHED_SCHEDULED) {
|
||||
pi.working_set_size_smoothed = atp->wup->rsc_memory_bound;
|
||||
} else {
|
||||
pi.working_set_size_smoothed = 0;
|
||||
}
|
||||
pi.working_set_size_smoothed = atp->wup->rsc_memory_bound;
|
||||
} else {
|
||||
pi.working_set_size_smoothed = .5*(pi.working_set_size_smoothed + pi.working_set_size);
|
||||
}
|
||||
|
@ -430,7 +426,8 @@ void ACTIVE_TASK_SET::get_memory_usage() {
|
|||
pi.page_fault_rate = pf/diff;
|
||||
if (log_flags.mem_usage_debug) {
|
||||
msg_printf(atp->result->project, MSG_INFO,
|
||||
"[mem_usage] %s: WS %.2fMB, smoothed %.2fMB, swap %.2fMB, %.2f page faults/sec, user CPU %.3f, kernel CPU %.3f",
|
||||
"[mem_usage] %s%s: WS %.2fMB, smoothed %.2fMB, swap %.2fMB, %.2f page faults/sec, user CPU %.3f, kernel CPU %.3f",
|
||||
atp->scheduler_state==CPU_SCHED_SCHEDULED?"":" (not running)",
|
||||
atp->result->name,
|
||||
pi.working_set_size/MEGA,
|
||||
pi.working_set_size_smoothed/MEGA,
|
||||
|
|
Loading…
Reference in New Issue