Default stack size vs. -Xss option

Hi,
What the default stack size?
That is, if you use the -Xss<size> option, it will set the stack
size to <size>, but what is the default. I've searched and only
found one posting that says it is 256k.
http://forum.java.sun.com/thread.jsp?forum=256&thread=40530
Is that correct? Since this is a JVM option, is it platform
dependant? In that case, what would it be on Win2k and Solaris?
We are serializing graph objects and getting a StackOverflowError
on occassion. There is a well known bug about this:
http://developer.java.sun.com/developer/bugParade/bugs/4152790.html
Thanks.
--- Patrick

Hi,
It depends on version and OS.
In Solaris there is in addition the OS restriction in ulimit
or maxssiz in HP.
hurricane% ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
nofiles(descriptors) 4096
vmemory(kbytes) unlimited
Workaround - Use "ulimit -s 2048" in bash shell or "limit stacksize 2048" in tcsh to limit the initial thread stack to 2 MB.
http://java.sun.com/docs/hotspot/VMOptions.html
Check the link for the Solaris defaults.

Similar Messages

  • Change the default stack size in the java.exe file

    Does anyone know how to change the default stack size of the jvm?
    I'm having problems with my stack. Is there anyway I can change it. I found a tool editbin.exe which is shipped with Visual c++, however I don't have the tool.
    Thanks,
    William

    I am using JNI to connect java with a C++ application.
    When calling the C++ appliction, STACK_OVERFLOW
    happends. I tried java -Xss<size> to increase the
    stack size, but failed.This has nothing to do with the above question.
    Does anyone knows why?Probably because the java parameter specifies the java stack size and not the C++ stack size.

  • JVM 1.4 default stack size

    Hi,
    I would like to know what is the default stack size of JVM of jdk 1.4.
    Is there any command which i can use to find the current stack size set up?
    Is the heap size & stack size same?
    Actually i'm getting a java.lang.StackOverflowError when i execute a class ProgramCallDocument which is present in the jt400.jar provided by IBM in thier Websphere Application Studio Server suite.
    The class is working fine with jdk 1.3. But it is giving an error in jdk 1.4
    Do any one have any clue about this? Please Help.
    Thanks,
    Jac.

    Thanks for the reply...
    Actaully I was looking for how to know the current stack size set for JVM. I assume that using -Xss command will increase the stack size, but before doing so I need to take the current stack size.
    Please let me know if you know the command for getting the current stack size set for JVM.
    Thanks,
    Jacob.

  • Need of changing the default stack size permanently as reported by ulimit -

    Hi All,
    In order to install proper 11gr2 on solaris 10 I need to make change of stack size permanently.
    My current ulimit -s is 8192 but according to the oracle 11g installation docs (Configure Shell Limits) they recommend you change the value reported by ulimit -s to be 32k (or 32768).
    I can change this value usiing "ulimit -s 32768" but after reboot of sever this value alwayes change back to old value(8192).
    I tried to do that in /etc/projects but not able to make this permanent, How to make stak size permanently in solaris 10.
    I am on ...
    Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC

    Hi;
    I suggest please review:
    http://serverfault.com/questions/21417/how-to-set-ulimits-in-solaris-10
    It seems that parameter will lost after server reboot. SoThe above settings are not permanent and will be lost after the reboot of the server. To make the changes permanent you need to set this in the respective user profile file. (For ex : .bash_profile on linux)
    Please review:
    Connecting Using: sqlplus "/ as sysdba" Fails with ORA-12547 with Lower Ulimit Setting [ID 878375.1]
    Regard
    Helios

  • Optimizing thread stack size

    There seems to be general confusion around the actual behaviour of the -Xss option.
    I need to optimise the thread stack size on Windows 2000 server running JVM 1.4.2 (07).
    1. What is the actual minimum stack size for this JVM ? 1k, 6k, 64k ?
    2. Do there exist any mechanism to measure the maximum value actually utilized by a particular application ?
    The goal is simply to allocate the appropriate amount of stack space instead of guessing a safe value.

    The default stack size is 256K on UNIX and on 32-bit Windows operating systems. To set Stack size
    java -XX:NewSize=128m -XX:MaxNewSize=128m -XX:SurvivorRatio=8 -Xms512m -Xmx512m
    1. Setting the New generation heap size
    -XX:NewSize
    Use this option to set the New generation Java heap size. Set this value to a multiple of 1024 that is greater than 1MB. As a general rule, set -XX:NewSize to be one-fourth the size of the maximum heap size. Increase the value of this option for larger numbers of short-lived objects.
    Be sure to increase the New generation as you increase the number of processors. Memory allocation can be parallel, but garbage collection is not parallel.
    2. Setting the maximum New generation heap size
    -XX:MaxNewSize
    Use this option to set the maximum New generation Java heap size. Set this value to a multiple of 1024 that is greater than 1MB.
    3. Setting New heap size ratios
    -XX:SurvivorRatio
    The New generation area is divided into three sub-areas: Eden, and two survivor spaces that are equal in size.
    Use the -XX:SurvivorRatio=X option to configure the ratio of the Eden/survivor space size. Try setting this value to 8, and then monitor your garbage collection.
    4. Setting minimum heap size
    -Xms
    Use this option to set the minimum size of the memory allocation pool. Set this value to a multiple of 1024 that is greater than 1MB. As a general rule, set minimum heap size (-Xms) equal to the maximum heap size (-Xmx) to minimize garbage collections.
    5. Setting maximum heap size
    -Xmx
    Use this option to set the maximum Java heap size. Set this value to a multiple of 1024 that is greater than 1MB.
    Hope these are the options you are looking for.

  • BUG: Unable to increase stack size in OJVM

    Hi,
    I have a complex ADF Faces page (jspx) that has reached the level of complexity that I can reliably cause the JVM to die when running the page with:
    Fatal error: Cannot find class java/lang/StackOverflowError
    Process exited with exit code -1.when running within JDeveloper. I have tried adding
    -Xms1024m -Xmx1024m(yes, I know an outrageous stack size) to the project run properties, and it still crashes. However, if I change to the server JVM instead of ojvm, it works fine, even with a much smaller stack, although the default stack size will crash as well.
    So,
    1). Shouldn't -Xms and -Xmx work for OJVM? If not, this is going to be a pain when I need to debug, as OJVM rocks for that.
    2). Is there some way to configure ADF/OC4J so that I won't bomb like this? I'm guessing that the XML document (JSPX) is big enough that it's causing the XML parser to blow up. Just a guess however.
    Thanks,
    John

    It's unclear if the problems discussed happen after OJC compiles, or Javac compiles, or both. We have uncovered a bug in the compilation of jspx files using OJC. There is a chance that this bug fix will fix the problems mentioned. Email me at keimpe.bronkhorst AT oracle.com if you want to try out a patched OJC. This is not an OJVM fix, so if you compile with Javac, I can't help you at this time.
    Keimpe Bronkhorst
    JDev team

  • -Xss: Stack size too large

    There is a requirement of high stack size in the application but when I try to set the stack size > 128m , I get the below error
    [ERROR] Argument error: -Xss130m
    [ERROR] -Xss: Stack size too large
    Could not create the Java virtual machine.
    Is there a upper limit of 128m on stack size. The Jrockit version is 64 bit.
    Please help

    Hi,
    Are you running OS in 32 bit or 64 bit.
    eg:
    O/S 32-bit Default 64-bit Default
    Windows 64 kB 320 kB
    Linux 128 kB 1 mB
    Please check your stack size you mentioned it is 128m please change to KB it will work.
    Regards,
    Kal

  • Cannot increase the stack size

    Hi,
    We have a program which gives a StackOverflowError. Trying the increase the stack size using command line options does not work. A simple program shows that the stack is the same size, whatever option we set.
    This is the program:
    class StackOverflowTest
    public static int counter = 0;
    public static void main(String[] a)
    try {
    sub();
    } catch (StackOverflowError e)
    System.out.println("recursive calls: "+counter);
    public static void sub()
    counter++;
    sub();
    We tried several -Xss (and -Xoss) settings: 600K, 2048K, 4M but got the same recursion deep: 16683 (with Eclipse), or 16689 (command line).
    We used Windows XP.
    Do you have any clue?
    Many thanks,
    Zsolt

    Oh good, they seem to have broken the forum formatting again.
    ====================================================================================================================
    Bug ID:     4362291     Stack size argument ignored (-Xss and -ss)
    ====================================================================================================================
    public class StackOverflowTest {
        public static int counter = 0;
        public static final void main(String[] a) {
            new Thread(new Runnable() {
                public void run() {
                    try {
                        sub();
                    } catch (StackOverflowError e) {
                        System.out.println("recursive calls: "+counter);
            }).start();
        public static final void sub() {
         counter++;
         sub();
    /code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Increase of Stack size impact

    Hi there,
    Please, what is the impact of increasing the Stack size with the -Xss option for the whole system. is there any relationship or formula between -Xms, -Xmx and -Xss options.
    Is it necessary to increase the -Xmx option When i increase the -Xss option.
    I'm using Weblogic 9.1 within a machine of 16GB under AIX 64bits and IBM JVM. My parameters are : -Xms=-Xmx=1GB and i think pass the -Xss to 1MB because i get many StackOverflow exceptions.
    Think you for your help

    hi,
    Changing the fonts in Print using ABAP is not possible. as basic report output is a text editor.
    By changing "Customizing of Local Layout" will only change in display screen and not in print.
    One possible way to create a new printer formatr thry SPAD and use that format in while printing.
    to know more details about SPAD
    Using SPAD - SAP Spool Administration to print different paper size
    The SAP spool system manages its own output devices. This includes mostly printers, but also fax and archiving devices. In order for you to use output devices defined in your operating system from the SAP System, you must define these devices in the SAP spool system.
    this is a piece of code from SAP-IMG ...its about printing fonts...see if this helps u....
    REPORT ZFONT NO STANDARD PAGE HEADING LINE-SIZE 80 LINE-COUNT 65.
    Start of print-control
    NEW-PAGE PRINT ON.
    PRINT-CONTROL FUNCTION 'SF000'.
    WRITE: / 'This is CPI 20'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF020'.
    WRITE: / 'This is CPI 6'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF008'.
    WRITE: / 'This is CPI 12'.
    Depending on your SAP printer device, this may also work
    PRINT-CONTROL FONT 1 LPI 6.
    you can try to change font and LPI numbers
    WRITE: / 'font 1 lpi 6'.
    PRINT-CONTROL FONT 2 LPI 6.
    WRITE: / 'font 2 lpi 6'.
    PRINT-CONTROL FONT 3 LPI 6.
    WRITE: / 'font 3 lpi 6'.
    End of print-control
    NEW-PAGE PRINT OFF.
    *--- End of Program
    also check out these links:
    For More Info Go thru this Link,
    font size in basic list output
    http://www.sapdesignguild.org/resources/MiniSG-old/BCMSG03E_DEL.htm
    http://sap4.com/modules.php?name=conteni2&pa=showpagina&pid=100
    do reward points if it helps
    rgds

  • How to change the default window size display font size on Lync 2013 main window?

    Hi champs,
    Just a simple non-technical question: How to change the default window size display font size on Lync 2013 main window on Windows 7 desktop?
    Thanks,

    Hi,
    Did you mean change the Lync: Change the Default Font and Color of Instant Messages just as Edwin said above?
    If not, as I know, there is no natural way to change it.
    If yes, on the latest version of Lync 2013 client, there is a new option “IM” on Lync client “Options” list. And you need to change the default Font and Color of IM in the interface of “IM”.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • How do I set default font size?

    Some programs (most importantly for me, Thunderbird) use a default font size that is too small for my eye comfort. Some (such as Firefox) allow me to change the font size, but Thunderbird does not (though there is a menu item to change font size, which does not work).
    I gather that such programs are using a default system font size. So I would like to change this. Some Help articles suggested that I could do this from the Font Panel, but they give no indication where to find the Font Panel. I cannot find it in System Preferences or via the Spotlight.
    I am using OS X 10.4.7
    I am computer-literate, but new to the Mac, having had this computer for about a week and a half.
    P.S. In Thunderbird -> Preferences -> Fonts there is an option to configure the fonts used by Thunderbird. The settings affect messages, but not the main window with the message list. However, at this point I'd really like to set the system default so all programs that use the system default will be affected.
    Thanks.
    Daniel

    This still does not work.
    I tried all of them.
    Theme Font & Size Changer
    Big Buttons
    Default FullZoom Level
    NoSquint.
    It only works for that page of that web site, as soon as you leave you start all over again.
    Can't we just say Firefox messed up and needs to revert to the way it used to work without have to do ANYTHING to adjust any sizing.
    This is utterly ridiculous.
    It's a web browser for GOD sakes...not the OS. It shouldn't be doing anything but displaying web sites with NO INTERVENTION by the user for each and every page.
    Why are programers always looking for ways to take a working product and make it useless???

  • How do I get Distiller to render other than the default page size

    I have double ad I laid out in Illustrator and I need to make a PDF with the Bleed/Trim/Color bars/ETC. In the past I could print to postscript file and run it through distiller, but after distilling, only an 8x11 is created.  I've gone into the edit settings and created another preset that has the default page size set to the size I need it, but it seems counterproductive and not what I'm used to.  Is there something that I'm missing?
    Note: When generating the PS file I've tried selecting both my printer ppd and the device independent option.

    Working in Mac Illustrator CC. Acrobat XI
    I go to Print with these settings:
    Drag the postScript File onto Distiller (Tried various preset settings)
    And I get this – an 8.5 x 11 portion:
    I've also tried printing with my printer PPD:

  • How do I change the default paper size for printing?

    I am running Firefox 3.6.3. Recently, the default paper size for printing unexpectedly changed to a user-defined size of 3.00" x 4.57". It used to be letter size (8.5 x 11). The default paper size is 8.5 x 11 for everything else. I have tried changing the size in the preferences dialog box and then clicking "default", but after I close Firefox or if Firefox opens a new window, the default size switches back to 3.00" x 4.57". Does anyone know how to fix this?
    == This happened ==
    Every time Firefox opened
    == About 2 weeks ago

    In "mine" dutch firefox 3.6.12 there is no option to change paper-size see
    "about:config" Promise to be careful (and be!) Enter "print.postscript.paper_size" gives a empty screen
    "paper_size" gives a few results
    What about the numbers 4259872, 4784247 and what is the meaning of
    paper_size, paper_size_type , paper_size_unit

  • Change default paper size to A4 Two Sided Margins

    My default paper size (System Preferences > Printers & Scanners) is currently set to A4.
    However, I think this is giving me problems when I try to print duplex (HP Photosmart 5520). If I select two-sided printing in the print dialog (from any application) I get an error saying that the margins have to be adjusted.
    I think this is preventing me from setting two-sided as the default, or even including it in presets. If I try to include it in a preset, next time I select the preset, two sided printing remains off.
    How can I change my default paper size to "A4, Two Sided Margins"? There is an option in the print dialog to change it (only for that current print job) but this particular paper size/margins is not available in System Preferences where you select the default paper size.
    Is there something I can install to make this option show up in System Preferences? Can I make a custom paper size for it?

    You may be able to change the defaults by following the instructions of PAHU in the thread linked below, but you're on your own as to the consequences.
    How to STOP default two sided printing

  • Change the Default Page Size for WebI

    Hello Experts,
    We have requriement where we need to change the default page size and margins for WebI, I have change the page size in defaultconfig.xml but don't see any options for Margins, How do I change the default margins?
    Any help or suggestion would be highlt appereciated.
    Thanks,
    Nishith

    From what I am finding it doesn't seem to be possible in 3.x, I could be wrong and someone might chime in with a workaround but at least it was added in 4.0
    -Dave

Maybe you are looking for

  • How can i get the correct text from the url which has the mulitp-languages?

    hi, all i built a application and deployed it on sun application server 8.1. when i request a url which include some multi-languages (for example http://xxx.com/servlet?value=XXX. the 'XXX' may be simply chinese. ), i got the ??? instead of the corre

  • How can I stream photos to 2 of 4 devices, have same apple ID?

    Hi, my wife and I both have a IPhone and IPad. We use the same apple account for purchases. But I don't want to stream photos on all devices.  Is there a way to stream photos from my phone to my iPad but not to my wife's and then have her devices sha

  • How to Create material master workflow

    Hi All, Can anybody tell me how to create material master workflow? i need to customize the workitem  for creating data in different views in MM01 transaction with restriction to particular user. Regards, Priti

  • Java IDOC_AAE configuration issue in PI IDOC sender channel and in ECC SM58.

    Dear Experts, My configuration scenario is  outbound:   SAP (IDOC)-------->PI------->AS2 ThirdParty. SAP PI version: 7.31 dual stack. First time i have done IDOC_AAE settings done in ECC and PI NWA with the help of below links. http://scn.sap.com/doc

  • C3-01 is restarting (software problem)

    Hi.      I have problem with Nokia C3-01. When I input in: Menu -> Messaging -> Others messages -> Flash message and click "Back", phone is restarting. Every time when I'm trying exit from "Flash message", phone is restarting Somebody have that probl