Re: [patch 00/10 -mm v3] oom killer rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 12 Mar 2010, KAMEZAWA Hiroyuki wrote:

> One question. Assume a host A and B. A has 4G memory, B has 8G memory.
> 
> Here, an applicaton which consumes 2G memory.
> 
> Then, this application's oom_score will be 500 on A, 250 on B.
> 

Right.

> How admin detemine the best oom_score_adj value ? Does it depend on envrionment
> even if runnning the same application ?
> 

Yes, because the idea of /proc/pid/oom_score_adj is to allow userspace to 
both set priorities for oom killing and also define when a task has become 
a memory leaker (i.e. using far more memory than expected).  You can't use 
a quantity of memory to either prefer or bias an application because you 
don't know its memory usage in context of the system, memcg, mempolicy, or 
cpuset: a bias of 1G would mean "always kill this task" in a cpuset with a 
512MB node whereas it would mean relatively nothing on a 64GB machine.  
With a proportion, however, you could easily set a oom_score_adj of 250, 
for example, to say this application should be penalized 25% of available 
memory regardless of whether that's the entire system or a "virtual 
system" consisting of a cpuset, memcg, or mempolicy.

It would obviously be trivial to add another /proc/pid knob that would 
calculate the value for you given a quantity based on the memory 
constraints of pid, I'm not against that addition.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]