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

Re: [HTCondor-users] CPU Affinity in condor v8.9.1



Stuart, thanks for the tip!

Folks should be aware that this solution's reference to the "cgcreate" and "cgset" commands requires installation of the libcgroup-tools RPM.

Michael V. Pelletier
Information Technology
Digital Transformation & Innovation
Integrated Defense Systems
Raytheon Company

-----Original Message-----
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Stuart Anderson
Sent: Sunday, October 20, 2019 7:27 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [External] Re: [HTCondor-users] CPU Affinity in condor v8.9.1

Shawn,
	I think cgroup is the right solution for this. Try something like the following to limit the total memory and cpu usage by condor and all the processes that it spawns on your CentOS 7 systems,

/etc/systemd/system/condor.service.d/cgroup.conf

[Service]
MemoryAccounting = true
ExecStartPost    = /bin/bash -c "cgcreate -g *:htcondor; cgset -r memory.limit_in_bytes=186G -r memory.memsw.limit_in_bytes=186G -r cpu.cfs_quota_us=2000000 /htcondor"

After restarting the condor service you should then see these limits in /sys/fs/cgroup/*/htcondor and be able to dynamically change them.