How do i set stack size in /etc/system??

How do i set stack size in /etc/system??

Post by Tom Adriaans » Thu, 03 Dec 1998 04:00:00



Hi,

How do i set the system default stack size in /etc/system

I can set the number of file descriptors, with the following entries
in the /etc/system file

set rlim_fd_max=4096
set rlim_fd_cur=1024

But how do I set the stack size. With ulimit I know how, but how do I do
it in the /etc/system file? where can I find the info? I looked already
in so many places to some kind of 'rlim_xxxx_cur' where xxx is something
like 'ss' or 'stack' or 'ssize' or ...., but could not find anything.

Quote:> ulimit -a

time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         2097148
stack(kbytes)        8192          <<<----
coredump(blocks)     unlimited
nofiles(descriptors) 1024
vmemory(kbytes)      unlimited

Quote:> ulimit
unlimited
> ulimit -s

8192

I want to change the 8192 to 18000.
I know that I can do it via the /etc/profile file, with an 'ulimit -s 18000'
command, but I want to konw the name for it, to set it in the /etc/system
file.

Anybody....???

 
 
 

How do i set stack size in /etc/system??

Post by Michael J. Wolsk » Thu, 03 Dec 1998 04:00:00


Try:

set lwp_default_stksize = xxx

   -**** Posted from Supernews, Discussions Start Here(tm) ****-
http://www.supernews.com/ - Host to the the World's Discussions & Usenet

 
 
 

How do i set stack size in /etc/system??

Post by Casper H.S. Dik - Network Security Engine » Sat, 05 Dec 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


Quote:>Try:

>set lwp_default_stksize = xxx

Yeah, right, and watch your system stop booting.

That's the defautl stack size for kernel lwps (8K), if you increase it
your processes won't notice, but your kernel will suddenly require a lot more memory.

There's no way to increase the default stack size in /etc/system.

You can do it from inside your shell, before running the program that
requires the big stack.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

How do i set stack size in /etc/system??

Post by Richard L. Hamilt » Sun, 06 Dec 1998 04:00:00




> [[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>>Try:

>>set lwp_default_stksize = xxx

> Yeah, right, and watch your system stop booting.

> That's the defautl stack size for kernel lwps (8K), if you increase it
> your processes won't notice, but your kernel will suddenly require a lot more memory.

> There's no way to increase the default stack size in /etc/system.

> You can do it from inside your shell, before running the program that
> requires the big stack.

It's a shame that one cannot refer to offsets from a symbol in
/etc/system, or (as far as I can tell) to 64-bit values, since the
information in sys/resource.h would be sufficient to tell one how to set a
default resource limit if that were possible.  (And I don't expect using
adb would do any good, since it needs to be set before process 1 is
created, as resource limits are inherited.)

--
ftp> get |fortune
377 I/O error: smart remark generator failed

Bogonics: the primary language inside the Beltway


 
 
 

How do i set stack size in /etc/system??

Post by Casper H.S. Dik - Network Security Engine » Mon, 07 Dec 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


Quote:>It's a shame that one cannot refer to offsets from a symbol in
>/etc/system, or (as far as I can tell) to 64-bit values, since the
>information in sys/resource.h would be sufficient to tell one how to set a
>default resource limit if that were possible.  (And I don't expect using
>adb would do any good, since it needs to be set before process 1 is
>created, as resource limits are inherited.)

Well, yes and mo.  While it would be really nice to be able to
set values at offsets, this would certainly not be portable between
releases and even between 32 bit and 64 bit kernels (in this particular
case, 32 bit and 64 bit kernels have the same limit structure but
older releases of Solaris have a different structure).

Perhaps some of these process specific attributes should be
set by init rathe rthan by the kernel.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

How do i set stack size in /etc/system??

Post by Richard L. Hamilt » Tue, 08 Dec 1998 04:00:00




> [[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>>It's a shame that one cannot refer to offsets from a symbol in
>>/etc/system, or (as far as I can tell) to 64-bit values, since the
>>information in sys/resource.h would be sufficient to tell one how to set a
>>default resource limit if that were possible.  (And I don't expect using
>>adb would do any good, since it needs to be set before process 1 is
>>created, as resource limits are inherited.)

> Well, yes and mo.  While it would be really nice to be able to
> set values at offsets, this would certainly not be portable between
> releases and even between 32 bit and 64 bit kernels (in this particular
> case, 32 bit and 64 bit kernels have the same limit structure but
> older releases of Solaris have a different structure).

> Perhaps some of these process specific attributes should be
> set by init rathe rthan by the kernel.

You're going to put in an RFE, right? :-)

Seriously, some systems already have init set the default umask, so
for setting defaults for inheritable process attributes, that would
be as good an approach as any.

It would also be useful to be able to set resource limits, umask, etc.
on a per-account basis.  Could one perhaps work that into a PAM module?
In particular, is the pam_sm_setcred() function called with an effective
uid of root?  If so, that would allow it to raise as well as lower limits.

--
ftp> get |fortune
377 I/O error: smart remark generator failed

Bogonics: the primary language inside the Beltway


 
 
 

1. setting system stack size in /etc/system

[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

I'm not sure what the question is, but a larger stack size should
not interfere with anything in the system.

A stacksize that is too small, OTOH, will cause panics.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

2. Max Sample Rate for USB Mice?!?

3. stack - max stack size (KB)

4. Multicast on Linux

5. how to set size of stack?

6. Slackware running on Toshiba Notebook 740CDT

7. set a = b or set a=b in /etc/system?

8. URGENT : Unable to boot a compaq lite

9. ULIMIT - data segment, stack, resident set, etc.

10. Possibel to implement system , such that Kernel stack grows on top of User Stack

11. Set font size for icons, menus, etc?

12. Netscape plug-ins, helper files, Acrobat etc.

13. How exactly does the file system write to disk in FreeBSD/DOS/etc???