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

Re: [HTCondor-users] limit total memory usage of jobs



Didn't get any replies here, so I asked on Stack Overflow. On there
someone said:

Use a locally evaluated START policy expression that mixes the
machine's current state (from its ClassAds) with the max memory macro
to test if the currently available RAM is x% of the total and evaluate
START to False if so.

With respect to that I have 2 questions:

1) What in the ClassAd shows the current amount of RAM used or
available? When I look at the ClassAd while jobs are running I do not
see any values related to the memory changing - they always seem to
show that total RAM.

2) Assuming there is such a value in the ClassAd that give that, how
do I reference it in the policy expression?

Thanks in advance for any help anyone can provide with this.

On Fri, Feb 23, 2018 at 11:32 AM, Larry Martell <larry.martell@xxxxxxxxx> wrote:
> I have an execute host with 132 slots and condor will happily run 132
> jobs there. But depending on the jobs those 132 can use all the RAM
> and cause swapping and eventually trashing. How can I set a config
> option that says, 'do not run jobs if the RAM used is more then nnGB'?
>
> I have read https://htcondor-wiki.cs.wisc.edu/index.cgi/wiki?p=HowToLimitMemoryUsage
> but it does not say how to do this.
>
> When I say RAM used I am taking about the number I see in the used
> column in free:
>
> $ free -mh
>                       total        used        free      shared
> buff/cache   available
> Mem:           125G         44G         18G         19M         63G         79G