We have a mac1.metal instance in AWS. Configured with 2 users, one for the QA team and another one for Devs. I'm trying to limit the resource usage of the users, so the any of the teams can't claim the full resources of the machine and leave the other team without using the device.

On Linux, there is the /etc/security/limits.conf file, and on FreeBSD there is rctl command, as well as ulimit command with its file /etc/login.conf. If I understand correctly, these only limit resources to processes and not users. On Linux, there is also cgroups.

There is a ulimit utility in macOS, but it seems only processes, and not users, can be configured to limit the resources they use.

Is there another tool to achieve user resource limits?

1 Answer 1


Apple has long prioritized responsiveness for the user at the console and limited traditional Unix / system configuration items. I’m eager to try the AWS hardware, but have not had that pleasure yet. There's no direct lever to control things per user since macOS is tailored to one main user. If you care about unix background daemons and processes getting better priority perf mode is the place to start.

Especially running on physical Apple hardware (I suppose virtualized workloads should benefit as well), I do often turn on performance mode - https://support.apple.com/en-us/HT202528

sudo nvram boot-args="serverperfmode=1 $(nvram boot-args 2>/dev/null | cut -f 2-)"

That increases TCP stack buffer allocations, increases the max processes in several ways and has worked very well without me needing to tune macOS servers further in more than a decade.

If you run into specific problems as opposed to theoretical or potential ones, I would head to App Tamer to manage things.

It's much more nuanced / powerful than just a "here is the limit for user X" from my testing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .