Persistent Resource Controls in S10
In a previous blog entry, I used prctl to change a resource limit on a project wide basis. It turns out that this is only temporary - and will be overwritten on reboot. For persistant resource changes it seems we still need to use the projmod command (or edit the /etc/project file by hand). Initially, my project file looks like this:-bash-3.00# cat /etc/project system:0:::: user.root:1:::: noproject:2:::: default:3:::: group.staff:10:::: user.oracle:11::::
Which means that my shared memory limit will be reset on reboot, which is not what we want. To make the change permanent, we use the projmod command like so.
# projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" user.oracle # cat /etc/project system:0:::: user.root:1:::: noproject:2:::: default:3:::: group.staff:10:::: user.oracle:11::::project.max-shm-memory=(priv,4294967296,deny) # bc 4*1024*1024*1024 4294967296If you want to edit the /etc/project by hand, you'll need to enter just a decimal number. It won't accept 4gb (at least not on my system,i tried). The changes are only seen on reboot. To change dynamically, use
prctl -n project.max-shm-memory -r -v 4gb -i project user.oracleThen you will see the results immediately. When issuing the prctl command (above) at least one process e.g. a shell needs to be running in the project user.oracle (the simplest way to do this is to simply login to the machine as oracle in another terminal) ( Mar 28 2006, 03:49:09 PM BST ) Permalink Comments [0]
Trackback URL: http://blogs.sun.com/gjl/entry/persistent_resource_controls_in_s10
Comments:
Post a Comment:

