Operating System - Tru64 Unix
1752292 Members
4595 Online
108786 Solutions
New Discussion юеВ

Re: memory stack

 
SOLVED
Go to solution
Aladdin_2
Advisor

memory stack

Hello everbody:
when issuing the ulimit -a, on my tru64 machone, I get the following:

root@billing4# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 10485760
stack(kbytes) 32768
memory(kbytes) 10190528
coredump(blocks) 0
nofiles(descriptors) 4096
vmemory(kbytes) 6291456

when another user issued it he got different data parameters, when I as a root switched to that user using "su - user" i kept getting the same parameters as root.

my question now, can I increase the size of the stack, is it per user, or per session, and whast the potential side effects for such step??

Thanks in advance
9 REPLIES 9
Venkatesh BL
Honored Contributor

Re: memory stack

I think man 'ulimit' should have the info you are looking for.
Aladdin_2
Advisor

Re: memory stack

Thanks alot for your reply.
actually I serached there and on the net before posting this thread, but couldnt find an answer to my question about increasing the size of stack.
Vladimir Fabecic
Honored Contributor

Re: memory stack

Not sure if I got the point.
Do you want to increase the size of the stack for all users or some users?
And post output of:
# sysconfig -q proc
In vino veritas, in VMS cluster
Aladdin_2
Advisor

Re: memory stack

Thanks vladimir:
soory if it was unclear, first I would like to know if this stack is shared for all users, or each one has its own. The other thing If i can increase it to a specific user, and what are the side effects I have to be aware of??

Here is the output:
proc:
max_proc_per_user = 2048
max_threads_per_user = 4096
per_proc_stack_size = 33554432
max_per_proc_stack_size = 33554432
per_proc_data_size = 6442450944
max_per_proc_data_size = 10737418240
max_per_proc_address_space = 10737418240
per_proc_address_space = 6442450944
executable_stack = 0
autonice = 0
autonice_time = 600
autonice_penalty = 4
open_max_soft = 4096
open_max_hard = 4096
ncallout_alloc_size = 8192
round_robin_switch_rate = 0
sched_min_idle = 0
give_boost = 1
maxusers = 4096
num_wait_queues = 4096
num_timeout_hash_queues = 4096
enhanced_core_name = 0
enhanced_core_max_versions = 16
exec_disable_arg_limit = 0
dump_cores = 1
dump_setugid_cores = 0
executable_data = 0



Thanks alot
Vladimir Fabecic
Honored Contributor
Solution

Re: memory stack

This stack is for single proces, not for all.
Note that ulimit value for ordinary users
stack(kbytes)
is result of kernel parameter
per_proc_stack_size
Also note there is kernel parameter
max_per_proc_stack_size
This is the maximum value of stack that can be increased by ulimit command.
When you do "su - user" you get ulimit values of "previous" proces, in your case from root.
If you want "default" stack for all users, then define this value for "per_proc_stack_size" kernel parameter. If you want some users to have biger value put appropriate ulimit command in user's .profile (or other depending on shell).

Not sure if I answered your question. If not, please be more specific.
In vino veritas, in VMS cluster
Vladimir Fabecic
Honored Contributor

Re: memory stack

Also look man pages for "sys_attrs_proc"
In vino veritas, in VMS cluster
jim owens_1
Valued Contributor

Re: memory stack

Two additions to what vladimir said:

1) The user may be running a different shell
which has a built-in ulimit so it will report
those values and not the system values. Shell
internal limits only sometimes affect programs.
To see the system limit have the user run:
/usr/bin/ulimit

2) Well-written programs should not need more
than the 32MB of stack allowed on your system
so you should ask why the user needs more.
Aladdin_2
Advisor

Re: memory stack

Thanks alot for your reply guys.
your answers really made it clear, in case I want to increase the stack limit for some user, or some process what are the issues or side effects I should be aware of??
Vladimir Fabecic
Honored Contributor

Re: memory stack

If you increase the stack limit for some user what are the issues or side effects?
That will allow more memory to be addresed (used) by process threads.
As Jim said, well-written programs should not need more than 32MB of stack, but some programs may need more. In that case you must increase stack limit.
In case you have enough memory, it should not be a problem.
In vino veritas, in VMS cluster