10 votes

systemd, per-user cpu and/or memory limits

Starting with systemd v239, you can use drop-ins https://github.com/systemd/systemd/commit/5396624506e155c4bc10c0ee65b939600860ab67 # mkdir -p /etc/systemd/system/user-.slice.d # cat > /etc/...
ValdikSS's user avatar
  • 306
6 votes
Accepted

systemd, per-user cpu and/or memory limits

UPD: I'll keep my solution for the sake of history, but systemctl set-property should be called at login time, using pam_exec, see https://github.com/hashbang/shell-etc/pull/183. In this approach, ...
intelfx's user avatar
  • 311
4 votes

systemd, per-user cpu and/or memory limits

The issue you mentioned is still open, but this works for me. sudo systemctl edit --force user-1234.slice Then type and save this: [Slice] CPUQuota=10% I'm not sure why it works.
stack-polices-are-trolls's user avatar
3 votes
Accepted

Is it better to generate "UUID" and "TIMESTAMP" within the NodeJS application or using the database built-in functions?

Re MySQL or MariaDB: Mostly the performance difference is negligible. In general, fetching a row is much more costly than any 'standard' function being used in it. If you do need the value in both ...
Rick James's user avatar
  • 2,533
3 votes
Accepted

Best VMWare Esxi CPU Resource Allocation Policy

My suggestion was to assign all 88 cores to each VM, and give each 1/11 of CPU power reserved. PLEASE don't do this, please - presumably you've not been on an vSphere courses right? Don't use any ...
Chopper3's user avatar
  • 102k
2 votes
Accepted

Automating scheduling and dispatch of compute jobs by different users

Linux with systemd can set cgroups resource control on units. You might set a large ratio for machine.slice, such as CPUShares=100000. Then run the important jobs as containers in that slice. A ...
John Mahowald's user avatar
2 votes
Accepted

Understanding docker resource limitations

MEM USAGE refers to the actual amount of memory the container is using. MEM LIMIT is the maximum amount of memory the container would be allowed to use. If the program in the container tried to use ...
Michael Hampton's user avatar
2 votes
Accepted

Transfer Azure resource group to different account

The source and destination subscriptions must exist within the same Azure Active Directory tenant. In your case you will need to contact the support to do it. Quote; Contact support when you need ...
yagmoth555's user avatar
  • 17k
2 votes

systemd, per-user cpu and/or memory limits

On Ubuntu I needed to increase the TasksMax for a single user, the CI service user (UID 2000) that runs all of my group's tests, from the default limit of 10813 to something higher. I checked the old ...
Earl Ruby's user avatar
  • 429
2 votes

systemd, per-user cpu and/or memory limits

Another possibility of achieving CPU or memory limitations through cgroups is to use libpam-cgroup, which can select a profile at login from /etc/cgconfig.conf. A commonly seen example is the ...
Ale's user avatar
  • 1,723
2 votes

What happens to OpenStack instances with over-committed memory where physical memory runs full?

You can overcommit CPU as well as memory https://docs.openstack.org/arch-design/design-compute/design-compute-overcommit.html the effect of actual memory consumption exceeding physical memory of the ...
Rob's user avatar
  • 1,193
2 votes

What is the equivalent command of "minikube start --memory 5120 --cpus=4" for "Kind"?

Short answer: There is no equivalent in kind to achieve what you want. However, kind does not enforce any memory/cpu constraint by default, so unless you really want to do that, you can skip below ...
mello's user avatar
  • 46
1 vote
Accepted

How do CPUShares work across parent and children cgroups?

Whilst the hierarchy you laid out above appears valid https://docs.kernel.org/admin-guide/cgroup-v2.html rules out this kind of hierarchy. The documents use the phrase "No Internal Process ...
LXTune's user avatar
  • 36
1 vote

What is the equivalent command of "minikube start --memory 5120 --cpus=4" for "Kind"?

Kind is a tool designed to create local test and CI environments for kubernetes. This uses docker and kubeadm as a backend. Since its development is still in progress, kind also supports docker and ...
Kranthiveer Dontineni's user avatar
1 vote

How to manage hardware resources efficiently in a cloud gaming service?

This is a bit of an unorthodox setup, but if you want to maximise space utilisation of multiple instances of the same image, you'd need to move over to VMware Horizon or some other VDI solution, where ...
Stuggi's user avatar
  • 3,566
1 vote

Single-node SLURM server: restrict interactive CPU usage

I have been beating my head against exactly this problem for a while now and I finally came across this solution on stackexchange: https://unix.stackexchange.com/questions/526994/limit-resources-cpu-...
Luther Blissett's user avatar
1 vote

Virtual Machine Isolation

What tools and strategies exist for balancing these considerations Find a sysadmin, talk to him. It is very likely there is overallocation, but your possibility to find that out really depends on ...
TomTom's user avatar
  • 51.9k
1 vote
Accepted

Re: Billing - are subscriptions on Azure like Droplets on DO?

You can look at your billing at both the subscription level or the resource group, so for that scale of workload I would be looking to separate them at the resource group level, it's going to make ...
Sam Cogan's user avatar
  • 39k
1 vote
Accepted

Managing Resource Usage Limits on Linux Computers

I would look at cgroups - this allows to 'slice' the system by giving shares to a process. You can give limits in terms of memory, cpu, disk io etc. For example to limit to 10MB of memory into a ...
silviud's user avatar
  • 2,707

Only top scored, non community-wiki answers of a minimum length are eligible