<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: stack size in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642944#M44164</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;There are three related kernel parameters (6 if you count each of their _64bit cousins) which act as resource limits for individual processes. These values do not consume resources themselves but serve to prevent any one process from grabbing all the memory in sight.&lt;BR /&gt;&lt;BR /&gt;1) Maxtsiz - maximum size of a process text segment; i.e. it's executable instructions&lt;BR /&gt;&lt;BR /&gt;2) Maxdsiz - maximum size of a process data segment including dynamic memory&lt;BR /&gt;&lt;BR /&gt;3) Maxssiz - maximum size of a process stack segment&lt;BR /&gt;&lt;BR /&gt;Of these 3, maxssiz is usually the least important and can usually remain at the default 8MB and in almost all cases 32-64MB is plenty even if you need to run very large programs. The reason for this is that the stack segment is used to store 'auto' variables and function parameters. No sane or competant programmer is going to declare a 32MB array as an auto declared variable. Something like that will either be a global variable (ok) or dynamically allocated (better) - in both of these cases that space then comes from the data segment. The other reason to not have a huge stack segment is to prevent runaway recursion. There are probably some exceptions but I have not had to exceed 32MB maxssiz in many years. In the few cases where a large stack size was requested for a software package, I have made polite calls to the software developers and asked a few pointed questions. In those cases, the need for the large stack segments disappeared with the next release. &lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
    <pubDate>Fri, 11 Jan 2002 13:28:54 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2002-01-11T13:28:54Z</dc:date>
    <item>
      <title>stack size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642941#M44161</link>
      <description>Hi,&lt;BR /&gt;I want to know what stack value signifies in in ulimit -a o/p.I have given this command in two machines&lt;BR /&gt;one has stack=65536 (kb) and other has 8192 kb ..is it related to kernel param.How can i increase that..is it possible...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Jan 2002 11:23:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642941#M44161</guid>
      <dc:creator>dhanish</dc:creator>
      <dc:date>2002-01-11T11:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: stack size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642942#M44162</link>
      <description>To change Stack Size:&lt;BR /&gt;&lt;BR /&gt;Document Id  : A4606375 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Problem Description&lt;BR /&gt;&lt;BR /&gt;How do I limit csh data and stack size?&lt;BR /&gt;&lt;BR /&gt;Configuration Info&lt;BR /&gt;&lt;BR /&gt;Operating System -HP-UX&lt;BR /&gt;    Version -10.01&lt;BR /&gt;Hardware System -I70&lt;BR /&gt;&lt;BR /&gt;Solution&lt;BR /&gt;&lt;BR /&gt;There is no way to limit the csh data and stack size unless it&lt;BR /&gt;is programmed with setrlimit. setrlimit() sets a limit on&lt;BR /&gt;consumption of system resources by the current process and&lt;BR /&gt;each process it creates.&lt;BR /&gt;&lt;BR /&gt;However, ksh and sh can be changed by:&lt;BR /&gt;&lt;BR /&gt;     ulimit -d (new size)&lt;BR /&gt;     ulimit -s (new size)&lt;BR /&gt;&lt;BR /&gt;It can be verified with:&lt;BR /&gt;&lt;BR /&gt;     ulimit -a&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Jan 2002 11:34:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642942#M44162</guid>
      <dc:creator>Alan Casey</dc:creator>
      <dc:date>2002-01-11T11:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: stack size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642943#M44163</link>
      <description>Document Id  : A5390409 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;PROBLEM&lt;BR /&gt;&lt;BR /&gt;How do I increase the values of stack and&lt;BR /&gt;data size in the shell?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CONFIGURATION&lt;BR /&gt;Operating System - HP-UX&lt;BR /&gt;Version - 10.20&lt;BR /&gt;Hardware System - HP 9000&lt;BR /&gt;Series - T600&lt;BR /&gt;&lt;BR /&gt;RESOLUTION&lt;BR /&gt;&lt;BR /&gt;You can use "ulimit -a" to display the&lt;BR /&gt;current values of the data and stack size, as in the&lt;BR /&gt;following example:&lt;BR /&gt;&lt;BR /&gt;     ulimit -a&lt;BR /&gt;&lt;BR /&gt;     set to:&lt;BR /&gt;     time(seconds)        unlimited&lt;BR /&gt;     file(blocks)         unlimited&lt;BR /&gt;     data(kbytes)         16000&lt;BR /&gt;     stack(kbytes)        65536&lt;BR /&gt;     memory(kbytes)       unlimited&lt;BR /&gt;     coredump(blocks)     4290772993&lt;BR /&gt;     nofiles(descriptors) 2048&lt;BR /&gt;&lt;BR /&gt;The ulimit for the user can be changed at the command line&lt;BR /&gt;or in the profile for that user.&lt;BR /&gt;&lt;BR /&gt;The data is reference to the maxdsiz kernel parameter&lt;BR /&gt;and the stack is reference to maxssiz kernel parameter.&lt;BR /&gt;These parameters can only be changed within the kernel which&lt;BR /&gt;requires a reboot.&lt;BR /&gt;&lt;BR /&gt;Another good way to determine the current system configuration&lt;BR /&gt;is the following:&lt;BR /&gt;&lt;BR /&gt;     echo "maxssiz/D" | adb -k /stand/vmunix /dev/kmem&lt;BR /&gt;&lt;BR /&gt;     echo "4 * 20396" | bc&lt;BR /&gt;&lt;BR /&gt;     (this is because /dev/kmem values are in plain terms)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Jan 2002 11:35:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642943#M44163</guid>
      <dc:creator>Alan Casey</dc:creator>
      <dc:date>2002-01-11T11:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: stack size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642944#M44164</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;There are three related kernel parameters (6 if you count each of their _64bit cousins) which act as resource limits for individual processes. These values do not consume resources themselves but serve to prevent any one process from grabbing all the memory in sight.&lt;BR /&gt;&lt;BR /&gt;1) Maxtsiz - maximum size of a process text segment; i.e. it's executable instructions&lt;BR /&gt;&lt;BR /&gt;2) Maxdsiz - maximum size of a process data segment including dynamic memory&lt;BR /&gt;&lt;BR /&gt;3) Maxssiz - maximum size of a process stack segment&lt;BR /&gt;&lt;BR /&gt;Of these 3, maxssiz is usually the least important and can usually remain at the default 8MB and in almost all cases 32-64MB is plenty even if you need to run very large programs. The reason for this is that the stack segment is used to store 'auto' variables and function parameters. No sane or competant programmer is going to declare a 32MB array as an auto declared variable. Something like that will either be a global variable (ok) or dynamically allocated (better) - in both of these cases that space then comes from the data segment. The other reason to not have a huge stack segment is to prevent runaway recursion. There are probably some exceptions but I have not had to exceed 32MB maxssiz in many years. In the few cases where a large stack size was requested for a software package, I have made polite calls to the software developers and asked a few pointed questions. In those cases, the need for the large stack segments disappeared with the next release. &lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Fri, 11 Jan 2002 13:28:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642944#M44164</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-01-11T13:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: stack size</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642945#M44165</link>
      <description>Hi Thanks for you response.So when i give ulimit -a ..it gives the value of data ,stack and text ..are these values for 32 bir or 64 bit as ..i have configured both in /stand/system..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thnks&lt;BR /&gt;</description>
      <pubDate>Sat, 12 Jan 2002 10:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stack-size/m-p/2642945#M44165</guid>
      <dc:creator>dhanish</dc:creator>
      <dc:date>2002-01-12T10:04:40Z</dc:date>
    </item>
  </channel>
</rss>

