cancel
Showing results for 
Search instead for 
Did you mean: 

Using the ulimit command

SOLVED
Go to solution
Russ Park
Frequent Advisor

Using the ulimit command

I was working with my Oracle DBA who, at the direction of Oracle Tech support, ran an "RDA" - included in that analysis is a report that showed the output of the 'ulimit -a' command. The tech analyzing the report said that two of the items, data and stack, needed to be increased. I read the following from the man page (couldn't find anything in the online documentation):

NOTES

The ulimit command affects only the current execution environment, therefore it has no effect when run in a separate execution environment such as one of the following:

nohup ulimit -f 10000 env ulimit 10000

Therefore, I have some questions:
1. Can I run the ulimit command while running multi-user to increase a limit w/o any concerns that doing so will interrupt any services?

2. If in fact this helps, how do we make the changes permanent?

Thanks!
3 REPLIES
Hein van den Heuvel
Honored Contributor
Solution

Re: Using the ulimit command


You make the changes permanent through SYSCONFIG.

For example if you needed the stack to be 32768 KB (we use that for spike)you could use:

sysconfig -r proc per_proc_stack_size=33554432

compare the following numbers from ulimit with those from sysconfig, and you'll see the correspondence:

root> ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 131072
stack(kbytes) 8192
memory(kbytes) 4068048
coredump(blocks) unlimited
nofiles(descriptors) 4096
vmemory(kbytes) 4194304
root> ulimit -a | awk -F"[ (+" '/kbyte/{print $1,$3*1024}'
data 134217728
stack 8388608
memory 4165681152
vmemory 4294967296
root> sysconfig -q proc | grep proc
proc:
max_proc_per_user = 256
per_proc_stack_size = 8388608
max_per_proc_stack_size = 33554432
per_proc_data_size = 134217728
max_per_proc_data_size = 1073741824
max_per_proc_address_space = 4294967296
per_proc_address_space = 4294967296
Ralf Puchner
Honored Contributor

Re: Using the ulimit command

1. Yes you can use the ulimit command in multiuser mode it will affect only processes started within this session.

2. the parameters mentions in .1 must be set within dxkerneltuner or /etc/sysconfigtab
(sysconfig command)

Btw. limit parameters were discussed several times here in the forum. Please look into previous postings for explanations.
Help() { FirstReadManual(urgently); Go_to_it;; }
Russ Park
Frequent Advisor

Re: Using the ulimit command

Thanks to both, I believe I understand better. I also realized after I posted that there was alot said out there, but sometimes it helps to refine your question to get simple answers. As a rule, we should all do our homework first :)

Thanks!