[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ulimit memory to 1/X'th of physical memory for jobs
From: |
Ole Tange |
Subject: |
Re: ulimit memory to 1/X'th of physical memory for jobs |
Date: |
Thu, 9 Aug 2012 15:56:12 +0200 |
On Thu, Aug 9, 2012 at 3:39 PM, Hans Schou <chlor@schou.dk> wrote:
> 2012/8/9 Ole Tange <tange@gnu.org>
>>
>> I just swapped a machine to death by starting 1 jobs per CPU on a 48
>> core machine. The problem was that each job took more than 1/48th of
>> the memory.
>
> Another approach could be to avoid starting jobs when the system is
> swapping.
You mean like the --noswap option in GNU Parallel?
It would now have helped in my situation as the 48 processes started
out as small but each grew to > 1/48th of the memory.
> It take a very little resource to get the current number of pages swapped in
> or out:
>
> $ grep ^psw /proc/vmstat
> pswpin 83218
> pswpout 179322
Somewhat faster than vmstat (which is currently used), but probably
not portable.
/Ole