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.

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.

  • 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.

  • 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

  • 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

  • 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.

  • Stack size for native thread attaching to JVM

    All:
    I have a native thread (see below, FailoverCallbackThread) that attaches to the JVM and does a Java call through JNI. The stack size for the native thread is 256KB.
    at psiUserStackBangNow+112()@0x20000000007a96d0
    at psiGuessUserStackBounds+320()@0x20000000007a8940
    at psiGuessStackBounds+48()@0x20000000007a8f60
    at psiGetPlatformStackInfo+336()@0x20000000007a9110
    at psiGetStackInfo+160()@0x20000000007a8b40
    at psSetupStackInfo+48()@0x20000000007a5e00
    at vmtiAttachToVMThread+208()@0x20000000007c88b0
    at tsAttachCurrentThread+896()@0x20000000007ca500
    at attachThread+304()@0x2000000000751940
    at genericACFConnectionCallback+400(JdbcOdbc.c:4624)@0x104b1bc10
    at FailoverCallbackThread+512(vocctx.cpp:688)@0x104b8ddc0
    at start_thread+352()@0x20000000001457f0
    at __clone2+208()@0x200000000030b9f0
    This causes stack overflow in Oracle JRockit JVM. (It does not cause overflow with Oracle Sun JDK.) Is there a recommended stack size for this use case for JRockit? Is there a way to compute it roughly?
    Platform Itanium 64 (linux)]
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    BEA JRockit(R) (build R26.4.0-63-63688-1.5.0_06-20060626-2259-linux-ia64, )
    mp

    How do I found default heap size, stack size for the
    thread, number of threads per jvm/process supported ?The threads is OS, OS install and jvm version specific. That information is also not useful. If you create the maximum number of threads that your application can create you will run out of memory. Threads require memory. And it is unlikely to run very well either.
    The default heap size and stack size are documented in the javadocs that explain the tools that come with the sun jdk.
    and how the above things will vary for each OS and how
    do I found ? Threads vary by OS, and OS install. The others do not (at least not with the sun jvm.)
    If I get "OutOfMemoryError: Unable to create new native thread" Most of the time it indicates a design problem in your code. At the very lease, you should consider using a thread pool instead.
    I found in one forum, in linux you can create maximum
    of 894 threads. Is it true ?Seems high since in linux each thread is a new process, but it could be.

  • Setting JVM stack size

    Hi,
    I have a Java Application that is packed in a jar file, and that I start double clicking the jar file in the Windows desktop. My question is: How can I say to the JVM that runs with a Stack Size greater of usual, I want 2MB?.
    Thanks in advance!!
    Salvador Huertas.

    You cannot alter the stack of the primordial thread that is started with the java command (the thread is already started before the size is read.) You can alter the stack size of subsequent threads that are started - the non-primordial threads.
    See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4362291
    So, you can't change the "JMV stack size" - you can change the size of additional threads.

  • What is the best way to verify default heap size in Java

    Hi All,
    What is the best way to verify default heap size in Java ? does it vary over JVM to JVM . I was reading this article http://javarevisited.blogspot.sg/2011/05/java-heap-space-memory-size-jvm.html , and it says default size is 128 MB but When I run following code :
    public static void main(String args[]) {
    int MB = 1024*1024;
    System.out.println(Runtime.getRuntime().totalMemory()/MB);
    It print "870" i.e. 870 MB.
    I am bit confused, what is the best way to verify default heap size in any JVM ?
    Edited by: 938864 on Jun 5, 2012 11:16 PM

    938864 wrote:
    Hi Kayaman,
    Sorry but I don't agree with you on verification part, Why not I can verify it ? to me default means value when I don't specify -Xms and -Xmx and by the way I was testing that program on 32 bit JRE 1.6 on Windows. I am also curious significant difference between 128MB and 870MB I saw, do you see anything obviously wrong ?That spec is outdated. Since Java 6 update 18 (Sun/Oracle implementation) the default maximum heap space is calculated based on total memory availability, but never more than 1GB on 32 bits JVMs / client VMs. On a 64 bits server VM the default can go as high as 32gb.
    The best way to verify ANYTHING is to address multiple sources of information and especially those produced by the source, not some page you find on the big bad internet. Even wikipedia is a whole lot better than any random internet site IMO. That's common sense, I can't believe you put much thought into it that you have to ask in a forum.

  • How to set the default maximum size for java's heap?

    Hi!
    Im trying to set the default max size for the java heap - but not from the command line.
    I would like to set it higher as default on my computer.. how can I do that?
    thanks!

    >
    ...You may increase the memory heap only when you're launching a new JVM.>Much like IWantToBeBig does.
    OTOH, it this is an app. with a GUI, it is easier to launch it using webstart, and request extra memory in the JNLP descriptor (the webstart launch file).

  • New FAQ Entry on JVM Parameters for Large Cache Sizes

    I've posted a new [FAQ entry|http://www.oracle.com/technology/products/berkeley-db/faq/je_faq.html#60] on JVM parameters for large cache sizes. The text of it is as follows:
    What JVM parameters should I consider when tuning an application with a large cache size?
    If your application has a large cache size, tuning the Java GC may be necessary. You will almost certainly be using a 64b JVM (i.e. -d64), the -server option, and setting your heap and stack sizes with -Xmx and -Xms. Be sure that you don't set the cache size too close to the heap size so that your application has plenty of room for its data and to avoided excessive full GC's. We have found that the Concurrent Mark Sweep GC is generally the best in this environment since it yields more predictable GC results. This can be enabled with -XX:+UseConcMarkSweepGC.
    Best practices dictates that you disable System.gc() calls with -XX:-DisableExplicitGC.
    Other JVM options which may prove useful are -XX:NewSize (start with 512m or 1024m as a value), -XX:MaxNewSize (try 1024m as a value), and -XX:CMSInitiatingOccupancyFraction=55. NewSize is typically tuned in relationship to the overall heap size so if you specify this parameter you will also need to provide a -Xmx value. A convenient way of specifying this in relative terms is to use -XX:NewRatio. The values we've suggested are only starting points. The actual values will vary depending on the runtime characteristics of the application.
    You may also want to refer to the following articles:
    * Java SE 6 HotSpot Virtual Machine Garbage Collection Tuning
    * The most complete list of -XX options for Java 6 JVM
    * My Favorite Hotspot JVM Flags
    Edited by: Charles Lamb on Oct 22, 2009 9:13 AM

    First of all please be aware HSODBC V10 has been desupported and DG4ODBC should be used instead.
    The root cause the problem you describe could be related to a timeout of the ODBC driver (especially while taking care of the comment: it happens only for larger tables):
    (0) [MySQL][ODBC 3.51 Driver]MySQL server has gone away (SQL State: S1T00; SQL
    (0) Code: 2006)
    indicates the Driver or the DB abends the connection due to a timeout.
    Check out the wait_timeout mysql variable on the server and increase it.

  • Error stack size

    Hi,
    i have build a package framework which in exceptional situations uses an encapsulated raise_application_error method with the
    -add to error stack- option. In combination with
    -speaking- messages it seems as if i am now running against the error stack size border. What i see is that the primarily generated errors are lost.
    Is it possible (and recommended) to increase the size and does anyone now how to do this ? (I still have to use 8.1.7)
    Thanks in advance,
    Bjoern

    First of all: you should mention it when you cross-post, to prevent people from wasting their time providing an answer already given in the other site.
    https://community.jboss.org/thread/223626
    Doing a google for "The stack size specified is too small, Specify at least 160k" gives plenty of reason to believe it is not really a 'problem', but simply a requirement of the JVM; how and why can only be answered by the developers of said JVM, you're not going to find them here because this is a user to user forum. And this isn't any different under Java 7.
    So other than downgrading, I don't see how you're going to make any impact. I would do the Google yourself, collect the search results that all indicate that the startup scripts are adjusted to the wishes of the JVM and present that to the vendor to shut them up. Anything more - well good luck getting an official statement from Oracle.

  • How to set the stack size for alchemy application?

    Anybody know how to set the stack size for alchemy application?
    If you know, please tell me how to adjust the stack size for alchemy application?

    Hi,
    The stack size is set as public const gstackSize in the alchemy generated code.  You can see this if you build with ACHACKS_TMPS set.  The default is one megabyte.
    One way to change the stack size is to use llvm-dis to disassemble avm2-libc/lib/avm2-libc.l.bc, generating avm2-libc.l.ll, modify the constant, and then use llvm-as to recompile your modified library and overwrite the old one.  These utilities should be in your path if alchemy is set up.

  • Overriding the default heap size of 64mb

    I run the java program on my pc on windows xp
    I need to increase the heap size, currently I launch the jar file using a batch file, the contents of the batch file are:
    java -Xms64m -Xmx512m -jar Lines.jar
    I have set the min and max heap size and when I click on the .bat file it launches the jar file with tose heap settings
    But I do not want to launch the jar file in this way(I don't want to use a batch file), is there anyway to override the default heap size for the java program to 512mb so that every time I launch the jar file the heap size is 512mb??
    Edited by: muddy777 on Sep 23, 2009 6:30 PM

    Vikash.SunJava wrote:
    set this in some machine startup like a scheduled task at machine startup
    java -Xms64m -Xmx512m
    This this will be default JVM settings.Huh?

  • Max-stack-size - default_stksize

    Hi,
    First, sorry for my english ^^
    I'm new on Solaris. I installed Solaris 10 on Sun V490 . I use Core Network.
    Why with the default setting, daemons or process of the OS "don't work" like this:
    Jun 17 14:50:10 unknown genunix: [ID 883052 kern.notice] basic rctl process.max-stack-size (value 8683520) exceeded by process 353In this example I generate the error with the format command. But I get this error with other command or deamon like nscd.
    I had the same problem with the value max-file-descriptor. The values set by projmod for the system project did not seem take effect. Thus I used the "old" parameters rlim_fd_cur, rlim_fd_max. Now it's ok.
    I find this parameter default_stksize in the Sun documentation. I put this in my /etc/system file:
    set default_stksize=16384At the boot time I have no error message for the value, but the max-stack-size value is the same:
    prctl -n process.max-stack-size 130
    process: 130: /usr/sbin/nscd
    NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
    process.max-stack-size
    basic 8,28MB - deny 130
    privileged 127MB - deny -
    system 2,00GB max deny -
    nscd is in the system project:
    ps -p 130 -o project
    PROJECT
    system
    Thank in advance, any idea is welcome.
    Guillaume

    Hi Prasad,
    Block Size is the number of parallel processes that are being executed in background during the application.  This is normally a configuration activity to be configured in line with basis.
    In Block size, we enter the number of objects to be processed per block by the CIF comparison/reconciliation during data selection in SAP APO or in the partner system.
    If you increase the block size, the memory required also increases. This has a positive effect on performance. If processes are cancelled due to lack of memory, you can decrease the block size to save memory.
    If you do not enter anything here, the system determines the block size dynamically from the number of objects that actually exist and the maximum number of work processes available.
    Normally, when you execute a job in background, it picks up the application server automatically or by manually defined server.  In parallel processing, at a time, one or more job of the same identify can be triggered under this scenario by defining application servers.  But too many parallel processing activity will affect the performance.
    One needs to define the parallel processes also to control system behaviour.  The Parallel processing profile is defined for parallel processing of background jobs. You then assign these profiles to variants in the applications.
    Regards
    R. Senthil Mareeswaran.

Maybe you are looking for