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
4294967296
If 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.oracle
Then 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)
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

gjl

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today