Determine the project ID.
$ id -p |
Verify the current values of project.max-shm-memory, project.max-sem-ids, and process.max-sem-nsems assuming a project ID value of 1.
# prctl -P -n project.max-shm-memory -i project 1 # prctl -P -n project.max-sem-ids -i project 1 # prctl -P -n process.max-sem-nsems -i process $$ |
Set resource controls.
If the current values do not meet the minimum settings required, you can use either the prctl command or the projmod command. Changes made with the prctl command are good only until system reboot. The projmod command should be used to make changes that persist across reboot.
Using the prctl command:
# prctl -n project.max-shm-memory -v 536870912 -r -i project 1 # prctl -n project.max-sem-ids -v 32 -r -i project 1 # prctl -n process.max-sem-nsems -v 17 -r -i process $$ |
Using the projmod command:
# projmod -a -K "project.max-shm-memory=(priv,512mb,deny)" default # projmod -a -K "project.max-sem-ids=(priv,32,deny)" default # projmod -a -K "process.max-sem-nsems=(priv,17,deny)" default |