Re: [OMPI users] Set maximum number of CPU (or threads) for a user
Hello, > > Hi, > > I am using OpenMPI 4.1.1 (without a scheduler) and I want to limit the > number of CPU or threads a specific user (or host, if I must) can use. > Is there a configuration or environment variable I can use? This user > has not been following our resource management policy so simply asking > him to use -np 2 will not suffice. > > Thank you, > > Dave Martin > in the same direction as previous answers: did you consider the user.slice feature in systemd? This would let you use cgroups to constrain a users complete login sessions. No extra software needed. See https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html especially "CPUQuota". These limits can be set in a user.slice. Best Regards Christof -- Dr. rer. nat. Christof Köhler email: c.koeh...@uni-bremen.de Universitaet Bremen/FB1/BCCMS phone: +49-(0)421-218-62334 Am Fallturm 1/ TAB/ Raum 3.06 fax: +49-(0)421-218-62770 28359 Bremen signature.asc Description: PGP signature
Re: [OMPI users] Set maximum number of CPU (or threads) for a user
There are also PAM modules available which forbid user logins to compute nodes unless the user has a job running on that node. I guess the devious user would start an 'empty' job to allocate some nodes then continue to run their excessive workloads via ssh. Do these PAM modules restrict the user somehow to the cgroup of a job (assuming cgroups are in use)? On Tue, 27 Jun 2023 at 03:27, John Hearns wrote: > There is a way to do this. > The best way would be a resource management system which allocates cgroups. > Without the RMS it is possible to define a cgroup for a given user (group > ?) such that they are within the cgroup when logging in. > > https://github.com/plaguedbypenguins/splosh > > It would be interesting to test this on a multi node MPI job - would it > work with MPI launchers? > > > > On Mon, 26 Jun 2023 at 18:08, Dave Martin via users < > users@lists.open-mpi.org> wrote: > >> Hi, >> >> I am using OpenMPI 4.1.1 (without a scheduler) and I want to limit the >> number of CPU or threads a specific user (or host, if I must) can use. >> Is there a configuration or environment variable I can use? This user >> has not been following our resource management policy so simply asking >> him to use -np 2 will not suffice. >> >> Thank you, >> >> Dave Martin >> >>
Re: [OMPI users] Set maximum number of CPU (or threads) for a user
The other method is the use of the clue stick. https://www.urbandictionary.com/define.php?term=LART On Tue, 27 Jun 2023 at 03:31, John Hearns wrote: > There are also PAM modules available which forbid user logins to compute > nodes unless the user has a job running on that node. > > I guess the devious user would start an 'empty' job to allocate some nodes > then continue to run their excessive workloads via ssh. > Do these PAM modules restrict the user somehow to the cgroup of a job > (assuming cgroups are in use)? > > On Tue, 27 Jun 2023 at 03:27, John Hearns wrote: > >> There is a way to do this. >> The best way would be a resource management system which allocates >> cgroups. >> Without the RMS it is possible to define a cgroup for a given user (group >> ?) such that they are within the cgroup when logging in. >> >> https://github.com/plaguedbypenguins/splosh >> >> It would be interesting to test this on a multi node MPI job - would it >> work with MPI launchers? >> >> >> >> On Mon, 26 Jun 2023 at 18:08, Dave Martin via users < >> users@lists.open-mpi.org> wrote: >> >>> Hi, >>> >>> I am using OpenMPI 4.1.1 (without a scheduler) and I want to limit the >>> number of CPU or threads a specific user (or host, if I must) can use. >>> Is there a configuration or environment variable I can use? This user >>> has not been following our resource management policy so simply asking >>> him to use -np 2 will not suffice. >>> >>> Thank you, >>> >>> Dave Martin >>> >>>
Re: [OMPI users] Set maximum number of CPU (or threads) for a user
There is a way to do this. The best way would be a resource management system which allocates cgroups. Without the RMS it is possible to define a cgroup for a given user (group ?) such that they are within the cgroup when logging in. https://github.com/plaguedbypenguins/splosh It would be interesting to test this on a multi node MPI job - would it work with MPI launchers? On Mon, 26 Jun 2023 at 18:08, Dave Martin via users < users@lists.open-mpi.org> wrote: > Hi, > > I am using OpenMPI 4.1.1 (without a scheduler) and I want to limit the > number of CPU or threads a specific user (or host, if I must) can use. > Is there a configuration or environment variable I can use? This user > has not been following our resource management policy so simply asking > him to use -np 2 will not suffice. > > Thank you, > > Dave Martin > >
[OMPI users] Set maximum number of CPU (or threads) for a user
Hi, I am using OpenMPI 4.1.1 (without a scheduler) and I want to limit the number of CPU or threads a specific user (or host, if I must) can use. Is there a configuration or environment variable I can use? This user has not been following our resource management policy so simply asking him to use -np 2 will not suffice. Thank you, Dave Martin