The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Heap and stack naan High Level Programming 5 04-29-2008 11:40 PM
what is stack winding and stack unwinding amitpansuria High Level Programming 2 08-07-2007 02:46 PM
Sol10 upgraded from 5.8 - shell issues? buffsluft SUN Solaris 1 05-26-2006 01:30 PM
swap space / paging space aaronh AIX 2 05-19-2004 07:06 AM
pageing space vs swap space VeroL UNIX for Dummies Questions & Answers 1 01-22-2004 07:54 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-11-2007
Registered User
 

Join Date: Dec 2007
Posts: 46
Stumble this Post!
stack space in sol10

we have a solaris 10 box (V440)

we are looking for a way to set the stack size for all processes on the system.

we know we can use ulimit -s

Code:
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
nofiles(descriptors) 256
memory(kbytes) unlimited

$ ulimit -s 16384

$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 16384
coredump(blocks) unlimited
nofiles(descriptors) 256
memory(kbytes) unlimited
this is fine but it only effects the current shell.

is there something we can put in to /etc/system that will effect the whole box??
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-11-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,325
Stumble this Post!
You can change the stack size by setting default_stksize to whatever value you need. Note, however, that it is the minimum size that a stack can have. In other words, no thread can be created with a stack size smaller than this value.

Increasing this value will result in increased kernel memory consumption, so do it only if really required.
Reply With Quote
  #3 (permalink)  
Old 12-11-2007
Registered User
 

Join Date: Dec 2007
Posts: 46
Stumble this Post!
Quote:
Originally Posted by blowtorch View Post
Increasing this value will result in increased kernel memory consumption, so do it only if really required.
yep, i figure that we show several GB of free RAM and many GB of free swap.
if we have 8MB more stack space per PID and about 100 PID's on the box then my math says we may be using about 1GB more RAM if we change the stack size.

we have a strange database program that has been giving a "cant fork" error for some weeks, when we put ulimit -s 16384 in the startup script it solved the problem.

but now when we do a lookup or search using the command line tools we also get a "cant fork", if we put a ulimit -s 16384 before we do the command line stuff we are OK again.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0