-Xmx -Xms and paging

I have a 64 bit windows box with 2gigs.
The operating system takes 600 mgs.
If I do this:
-Xmx2000m -Xms512m
will it page (ie use virtual memory) only when it needs to and then stop using virtual memory when memory consumption goes back down?
In other words I have an algo that can spike in terms of memory, but I would like to know if after one of these spikes it can ever stop paging, or will the vm get in this case its 2gig of memory and the os will presume that it has to page?
thanks.

will it page (ie use virtual memory) only when it
needs to and then stop using virtual memory when
memory consumption goes back down?
Depends on the JVM implementation.
Some will release memory no longer needed after garbage collection, some will not, some may be smart enough to keep track of memory requirements over time and try to predict if that memory will be needed again soonish and keep it if so.
Whether it will page or not depends on your operating system and available hardware, not the JVM.

Similar Messages

  • How can I set VM parameters except Xms and Xmx?

    I can set the Xms and Xmx as the following:
    <j2se version="1.4+" initial-heap-size="80m" max-heap-size="80m"/>
    but how can I set other VM parameter such as Xmn,XX:SurvivorRatio,and some which to special JVM(for example:JRockit)?

    There is a whole list ov vm-args considered "safe" by java web start listed in the developers guide at:
    http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html#resources
    these can be set with the new arg to the j2se element, vm-args like this:
    <j2se version="1.5.0+" java-vm-args="-esa -Xnoclassgc"/>
    /Andy

  • Xms and Xmx parameters

    Hi, on a windows machine with jdk1.3 I start oracle's oc4j(standalone) from commandline. I specify Xms and Xmx parameters. Hence;
    java -Xms512M -Xmx512M -jar oc4j.jar
    is the command line command.
    But after I start the app server, when I look at the Window's task manager the java. exe has about 50M memory usage. Is there something wrong???
    Thanks all.

    The best option is to set it in setDomain.cmd/sh OR comEnv.cmd/sh depending on your WLS version, since even if you are starting your manage servers from commandline rather than using nodemanager, it will internally use this to set the environment.
    However if you are using nodemanager, you might try "server start" tab for passing JVM arguments.
    For windows service try the following link:
    http://e-docs.bea.com/wls/docs103/server_start/winservice.html#wp1186212 ----> its for WLS10.3

  • JVM Java heap space Error || even with -Xms- and -Xmx commands

    hi all, i got a problem by allocating a very great boolean array.
    first of all, here is my testcode:
    public static void main(String[] args) {
              boolean[] testfield = new boolean[70000000];          
              while(true){
              //NOP     
         }as you see, i try to allocate an array with 70.000.000 boolean values - as 1 boolean may be represented as at least one physical bit we calculate the total amount of needed RAM-Space:
    70.000.000 bit / 8 = 8750000 byte
    8.750.000 byte = 8.75 MByte
    My System ist WinVista Ultimate 64-bit running on a Quadcore T2200 with 2GB-DDR3 RAM
    Looking in my Vista Ressourcemanager shows, that eclipse.exe reserves about 1.023 Mbyte....
    As IDE I use eclipse
    my eclipse.ini looks as follows:
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256M
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms512m
    -Xmx1024m
    -XX:PermSize=512mby using following VMCommand "-XX:+PrintGCDetails" and running the above code the output displays:
    [GC [DefNew: 180K->63K(960K), 0.0008311 secs][Tenured: 43K->107K(4096K), 0.0060371 secs] 180K->107K(5056K), 0.0069249 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
    [Full GC [Tenured: 107K->105K(60544K), 0.0044835 secs] 107K->105K(61504K), [Perm : 17K->16K(12288K)], 0.0045553 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
         at termain.main(termain.java:15)
    Heap
    def new generation   total 4544K, used 163K [0x246a0000, 0x24b80000, 0x24b80000)
      eden space 4096K,   4% used [0x246a0000, 0x246c8fe0, 0x24aa0000)
      from space 448K,   0% used [0x24aa0000, 0x24aa0000, 0x24b10000)
      to   space 448K,   0% used [0x24b10000, 0x24b10000, 0x24b80000)
    tenured generation   total 60544K, used 105K [0x24b80000, 0x286a0000, 0x286a0000)
       the space 60544K,   0% used [0x24b80000, 0x24b9a420, 0x24b9a600, 0x286a0000)
    compacting perm gen  total 12288K, used 16K [0x286a0000, 0x292a0000, 0x2c6a0000)
       the space 12288K,   0% used [0x286a0000, 0x286a41c0, 0x286a4200, 0x292a0000)
        ro space 8192K,  62% used [0x2c6a0000, 0x2cba2ba0, 0x2cba2c00, 0x2cea0000)
        rw space 12288K,  52% used [0x2cea0000, 0x2d4e88e0, 0x2d4e8a00, 0x2daa0000)so can anyone tell me please, how i manage to allocate bigger arrays? or where at least is the problem?
    Originally i was thinking like that way: Integer.MAXVALUE = (2^32)-1
    => biggest index an array can have
    => biggest allocation possible with ints weights (((2^32)-^1)/8)/1000*1000 = (round) 537 MByte < 2GByte => everything fine .... but it seems like not :-(
    When i try to allocate 60.0000.000 it works fine....but that is far not enough :-&
    thank you very much for your helping answers!

    The Sun Java virtual machine stores booleans as bytes, not bits, so for an array of 70 million booleans you need 70 million bytes, plus 8 bytes for the object header, and 4 bytes for the array length.
    I suspect that your eclipse.ini controls the JVM running the Eclipse IDE, not the JVM running your application. Note that in the -XX:+PrintGCDetails output at the end, it shows you running out of memory with 4MB of young generation and 60MB of old generation. That's the default configuration, as if you hadn't specified -Xms and -Xmx.
    The array of 60 million booleans only requires 60 million bytes (plus overhead), which fits in the default old generation.
    I think you need to put the -Xms and -Xmx in the same place you put the -XX:+PrintGCDetails, since that does seem to display information about the JVM running your application, not the JVM running Eclipse.

  • Why are -Xms and -Xmx limits so small?

    On a Win XP machine with 3GB of installed memory, the limits for -Xms and -Xmx are 1GB. My knapsack program works for small inputs (< 20 objects). But for real world problems it crashes immediately with an out-of-memory error. What possible harm could it do to allow a Java user to increase -Xms and -Xmx to 2 or 3 GB, or even larger? I would not care if it thrashed, if it finally came up with a good answer.

    CHE22 wrote:
    CHE22 wrote:
    On a Win XP machine with 3GB of installed memory, the limits for -Xms and -Xmx are 1GB.
    tschodt wrote:
    How did you arrive at that?
    By reading this:
    http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf.
    I guess you are referring to
    Automatic Selection of Collector, Heap Sizes, and Virtual Machine
    A server-class machine is defined to be one with
    • 2 or more physical processors and
    • 2 or more gigabytes of physical memory
    13 Ergonomics - Automatic Selections and Behavior Tuning Sun Microsystems, Inc.
    This definition of a server-class machine applies to all platforms, with the exception of 32-bit platforms running a version of the Windows operating system.
    On machines that are not server-class machines, the default values for JVM, garbage collector, and heap sizes are
    • the client JVM
    • the serial garbage collector
    • Initial heap size of 4MB
    • Maximum heap size of 64MB
    On a server-class machine, the JVM is always the server JVM unless you explicitly specify the -client
    command line option to request the client JVM. On a server-class machine running the server JVM, the default
    garbage collector is the parallel collector. Otherwise, the default is the serial collector.
    On a server-class machine running either JVM (client or server) with the parallel garbage collector, the default initial and maximum heap sizes are
    • Initial heap size of 1/64th of the physical memory, up to 1GB. (Note that the minimum initial heap size is 32MB, since a server-class machine is defined to have at least 2GB of memory and 1/64th of 2GB is 32MB.)
    • Maximum heap size of 1/4th of the physical memory, up to 1GB.
    Otherwise, the same default sizes as for non-server-class machines are used (4MB initial heap size and 64MB maximum heap size). Default values can always be overridden by command line options. Relevant options are shown in Section 8.And you missed that it said default.
    And by adding any small integer to 1 in -Xms1G.Show us exactly what you specified, do you realize that-Xms11Gmeans 11 GB, much larger than 32-bit Windows can handle.

  • Proper use of JVM XMs and XMx settings

    I've configured Tomcat to run with -XMs1024m -XMx1024m, and am interested to know GC performs when the -XMs and XMx are the same value.
    Would it generally be better to have a lower -xms value?

    The -XMs only tells the VM how much memory to initially allocate, and doesn't have any correlation with normal operation of GC. I've used -XMs in the past when I know my memory requirements are pretty large, and that way will keep the VM from continuing to dynamically allocate more and more memory up to the XMx setting.

  • SAP ECC6 memory and paging issues

    Dear Experts
    I have recently upgraded my 4.6C systems to an ECC 6 system (DB2 LUW 9.5 on AIX 5.3 TL9 64 Bit OS)
    I have been running the LPAR with 14 GB of memory and we are around 100-200+ users using the system, I was monitoring using nmon and found that Physical Memory was around 99.8% Used   (14311.8MB and 22.6MB was free) also the paging space was around 37.2% in result causing the system at times to run slow which can have a very negative effect on the users.
    After further investigation I found that after a system restart the Physical Memory would start around 50.9% and increased at a steady pace until it reached 99.8% that is when the system would start using the paging space which would steadily increase, I found that the only solution was a system restart at least once a week to reduce the memory consumption.
    At first glance it looked like a database manger memory leak with the process db2sysc, so I searched the net with the search words u201Cdb2 memory leaku201D and found the following APARs and notes.
    APAR JR30285 - Pervasive memory leak when compiling SQL statements that use SQL/XML functions
    APAR IZ35230 - There is a pervasive unix-specific private memory leak in the security component
    Note 1288341 - Memory leak in APPLHEAPSZ -> SQL0954C 
    Note 1352361 - Memory leak in shared memory area abrfci
    Note 1147821 - DB6: Known Errors and available Fixes in DB2 9.5 LUW
    After reading the notes and APARs I decided to updated DB2 to the latest fix pack (5SAP), but after the fix pack was implemented it did not solve the memory problem
    I started look at different problems with SAP ECC6, db2 and AIX with paging/memory problems and I found the following notes to do with AIX memory and paging but none of them helped as all parameters and settings were set accordingly  
    789477 - Large extended memory on AIX (64-bit) as of Kernel 6.20
    191801 - AIX 64-bit with very large amount of Extended Memory
    973227 - AIX Virtual Memory Management: Tuning Recommendations
    884393 - AIX saposcol consumes large amount of memory.
    856848 u2013 AIX Extended Memory Disclaiming 
    1048686 u2013 Recommended AIX settings for SAP
    1121904 u2013 SAP on AIX: Recommendations for Paging
    1086130 u2013 DB6: DB2 Standard Parameter Settings
    After even more investigation I found the following evidence suggesting AIX Virtual Memory Manager might have a problem

    Shared memories inside of pool 40
    Key:       42  Size:    17792992 (  17.0 MB) DB TTAB buffer              
    Key:       43  Size:    53606392 (  51.1 MB) DB FTAB buffer              
    Key:       44  Size:     8550392 (   8.2 MB) DB IREC buffer              
    Key:       45  Size:     7014392 (   6.7 MB) DB short nametab buffer     
    Key:       46  Size:       20480 (   0.0 MB) DB sync table               
    Key:       47  Size:    10241024 (   9.8 MB) DB CUA buffer               
    Key:       48  Size:      300000 (   0.3 MB) Number range buffer         
    Key:       49  Size:     2769392 (   2.6 MB) Spool admin (SpoolWP+DiaWP) 
    Shared memories outside of pools
    Key:        3  Size:   114048000 ( 108.8 MB) Disp. communication areas   
    Key:        4  Size:      523048 (   0.5 MB) statistic area              
    Key:        6  Size:   692224000 ( 660.2 MB) ABAP program buffer         
    Key:        7  Size:       14838 (   0.0 MB) Update task administration  
    Key:        8  Size:   134217828 ( 128.0 MB) Paging buffer               
    Key:        9  Size:   134217828 ( 128.0 MB) Roll buffer                 
    Key:       18  Size:     1835108 (   1.7 MB) Paging adminitration        
    Key:       19  Size:   119850000 ( 114.3 MB) Table-buffer                
    Key:       41  Size:    25010000 (  23.9 MB) DB statistics buffer        
    Key:       63  Size:      409600 (   0.4 MB) ICMAN shared memory         
    Key:       64  Size:     4202496 (   4.0 MB) Online Text Repository Buf. 
    Key:       65  Size:     4202496 (   4.0 MB) Export/Import Shared Memory 
    Key:     1002  Size:      400000 (   0.4 MB) Performance monitoring V01.0
    Key: 58900114  Size:        4096 (   0.0 MB) SCSA area                   
    Nr of operating system shared memory segments: 16
    Shared memory resource requirements estimated
    ================================================================
    Total Nr of shared segments required.....:         16
    System-imposed number of shared memories.:       1000
    Shared memory segment size required min..:  692224000 ( 660.2 MB)
    System-imposed maximum segment size......: 35184372088832 (33554432.0 MB)
    Swap space requirements estimated
    ================================================
    Shared memory....................: 1654.8 MB
    ..in pool 10  328.6 MB,   58% used
    ..in pool 40  143.3 MB,   30% used
    ..not in pool: 1174.1 MB
    Processes........................:  413.4 MB
    Extended Memory .................: 6144.0 MB
    Total, minimum requirement.......: 8212.2 MB
    Process local heaps, worst case..: 3814.7 MB
    Total, worst case requirement....: 21882.9 MB
    Errors detected..................:    0
    Warnings detected................:    3

  • Database Listing And Paging With Flash Builder

    Hello ;
    i trying to develop an android application with flash builder.
    i have a database and connected it, selected a table and created a service.
    my table have a four coloumn. id - img - tag - date
    id : as you know. table id coloumn auto increment.
    img : long text area. i want to listed to page when clicking the menu item.
    tag : tag is title of the img.
    date : standart date coloumn.
    i want to listing all data with menu style. i added to spinner list and it get to value at database tag (title) .
    how can i listing to text (long text area) in to the img coloumn when selected the tag (title) at spinner list. 
    thanks
    bye.

    i researched a many document but still can't find a insert data grid.
    it seems to under Components Panel all documents and videos
    but i can't see it?
    Anirudh SasikumarRangoraTodd_KoprivaJason San JoseSunilAdobeAmy_WongDatabase Listing And Paging With Flash BuilderUsing Flash BuilderFlex
    somebody help me please?
    thanks
    bye

  • Paging over phones and paging horns in CME

    Hi all!
    Cisco CME provides mechanisms for paging across phones with ephone-dn configurations, and paging across external paging systems that are connected to either FXS or FXO ports via dial-peer configurations.  I have done these numerous times.
    Recently I've been receiving requests to be able to dial a single paging extension and have the page go out across the phones and the horns/paging controller simultaneously.   Has anyone been able to do this, and would you share the info please?
    Thanks in advance,
    Kevin

    Hi,
    As per the doc that i shared "InformaCast has no special requirements for how multicast is enabled, and you should use your network vendor’s best practices and design considerations. Multicast is typically routed with Protocol Independent Multicast (PIM) that is deployed in either sparse or dense mode. InformaCast will work with either mode.
    For WAN links where your circuit provider will not route your multicast, you can configure GRE tunnels, which carry your multicast traffic from the location where the InformaCast server is located to its recipients. The only traffic that needs to traverse these GRE tunnels is the multicast traffic you might want to route. The tunnels do not need to create a full mesh between sites; they only need to be configured from the hub location to the spoke location(s). Please see the following link for details:
    http://www.cisco.com/en/US/tech/tk828/technologies_configuration_example09186a00801a5aa2.shtml
    For recipients to receive the audio portion of InformaCast broadcasts, they make requests using Internet Group Management Protocol (IGMP). While most networks default to IGMPv2, newer recipients may use IGMPv3. If newer recipients are being deployed, be sure to enable the newer protocol version on network devices."
    HTH
    Manish

  • LCDS Caching and Paging

    How do we keep items in the LCDS data services cache independent between user sessions?  If I use session in the destination, I can still update an item in one users cache and have it change another users item (if the identity attribute is the same).
    Another way to look at this question is that we want to use the data management services to enable dynamic loading and paging of large sets of data.  We don't want to utilize it for data management between sessions.
    Thanks.
    tj

    Have you seen the part of the example configs where it talks
    about what is required for data paging to work?
    <!--
    Indicates whether data paging is enabled for the destination
    and if you wish to override the
    pageSize set for the channel.
    Setting the custom flag to true indicates that the
    associated assembler has a paged-fill method
    corresponding to each method specified via the
    <fill-mathod> tag. The paged-fill method
    should have two additional java.lang.Integer params at the
    end of the parameters specified
    via the <params> tag. The first param specifes the
    index in the fill collection from which this
    method will start retrieving records. And the second param
    specifies the number of records to be
    retrieved by each paged-fill call.
    Default enabled value is false. Default pageSize value is
    10. Default custom value is false.
    <paging enabled="true" pageSize="5" custom="true"/>
    -->
    It seems to imply to me that you need the paged fill methods
    in your config in addition to the regular ones.
    I admit I have not got as far as getting a working paging
    setup yet, although this is something I will need to get working in
    the near future.

  • Jdbc and paging

    Hi,
    i have the following doubts regarding the jdbc and paging please clarify me...
    1)Is it advisable to use stored procedure to implement paging is records
    are more in database
    2)If the records are more in the database and we execute
    select * from table where id >10 and id<15 then will
    the query execution will be slow because the database is large(and so stored procedure will be faster)
    or as we are selecting only records between 10 and 15 so the
    query execution is not slow
    3)will the recordset help in solving the probem
    4)is there a way to select the count of the records along with the records for display in the page
    the count of the records is required to display the next button
    if two queries are to be written one to display the next button and second to get the records to
    display on the page then the system may be slow when many users are accessing and using stored
    procedures may be better
    5)when we write the select query with 'for update' clause then the row will be locked
    or the table is locked .
    6)when we write the select query with 'for update' clause then until we execute the update
    query the lock will be there and the lock will be released on executing the update query
    is that right then what about the case if after the select query we get some exception
    and code does not reach the update query then what about the lock will be lock remain
    and give problem
    regards
    Javid

    1) that would really depend on you goals. for performance only, stored procedures are precompiled so should be faster.
    2) definitely you should only select what you want and limiting the number of rows you return will speed up your query.
    3) what do you mean by that? a recordset represents the collection of rows returned from the query so should help you.
    4) it depends on your database. for instance, MySQL has a function to return the number of rows returned. however, some database has an unbuffered mode so that the first few rows will be returned very quickly without knowing how many rows are there, in which case, you won't know the number of rows until all the rows have been retrieved.
    5 and 6 are database-dependent, while most rdbms only lock the selected rows by default, some lock the entire table.
    Java 2 MVP
    http://www.brainbench.com

  • Difference between swap-ing and paging

    I wander what is difference between swap-ing and paging. What are pages-out and what are pages in(in transaction st06)

    HI
    The following link may also be useful.
    http://learnlinux.tsf.org.za/courses/build/internals/ch05s03.html
    Regards
    Chen

  • Java-options, What is the difference between the parameters xms and ms

    Hi,
    I have a problem with deploy bpel process , I get an error "java.lang.OutOfMemoryError: PermGen Space" several sources of information tells me that I have to change some parameters in the file "<ORACLE_HOME> / opmn / conf / opmn.xml" but I doubt some of the parameters, what is the difference between Xms and ms?
    And what is the value of the parameter MaxPermSize, which I must also change.
    Thanks
    Gustavo

    Did you ever find out what the difference between the two parameters were!? I have the same questions. Default for opmn.xml = "-server -XX:MaxPermSize=128M -ms512M -mx1024M ...." In attempting to maximize performance and accessible memory, Oracle docs identify adding/modifying "-server -Xmn1228m -XX:+AggressiveHeap -Xms2048m -Xmx2048m -XX:MaxPermSize=128M -ms2048M -mx2048M...." But I question if Xms and ms are really the same parameter or not?
    Thanks in advance...
    Steve

  • What do -Xms and -Xmx do?

    I know what they are supposed to do, but am unable to see any tangible results from setting them...

    On my machine they do exactly what they're supposed to...that is, to set the initial and max memory available for a program. I wrote two programs to test this :
      //this shows how much memory is available at start up
      public void main(String args[]) {
        System.out.println(Runtime.getRuntime().freeMemory());
      //this outputs how many KB memory the program sucked before crashing.
      public static void main(String args[]) throws Exception {
        Vector vec = new Vector();
        int i = 0;
        try {
          while (true) {
            vec.add(new byte[1024]);
            ++i;
        } finally {
          System.out.println(i);
        }When I run the first program w/o -x set, I get around 1.5 mb (1760896 bytes); when I invoke it with -Xms16m it returns 16 mb (16440960 bytes). The second program crashes at around 64mb (63633 to be exact). Invoking it with -Xmx16m crashes it at 16 mb, as expected (15813).
    Both -Xmx and -Xms are unsupported options...thus their effects are implementation-dependent. It's thus possible that your implementation doesn't support them. (I'm running this on Win2000 using Sun's JVM 1.4.1_01-b01.)
    The only other thought that occurs to me is that you're sending the wrong parameters...-Xms16 means you want to set the initial stack to 16 bytes, obviously something that would have little effect. -Xms16k would be 16kbytes, -Xms16m is in megabytes.

  • Java -Xms -Xmx permsize and MaxPermsize

    I am having an issue where I get java.out.of.memory errors when I try to create some large/complex reports.
    From the documentation:
    Novell Documentation
    It says "The default and recommended settings are as follows".
    If I increate the values to a higher number it will create my reports OK.
    What is the reason Novell recommends these values and what could be the issue if I increase it?
    Thanks,
    Hein

    heinkonijn,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

Maybe you are looking for

  • Asm weird errors

    we have 2 SUN FIRE 6900 with cluster ware 10.1.0.4..2 asm and database the node 1 runs forms reports services for solaris 10 the node 2 runs application server node 1 and node 2 are running different databases node 1 spdb and node 2 turbodb recently

  • Avoid distinct clause in the query

    hi i have a query from a single table using distinct clause and has columns (a,b,c,d,e,f,g,h,i) eg: select distinct a,b ,c,d from table where a<>0 and b<>0 and c<>0 and d<>0 and e=o and f=0 and g=0 and h=0 and i=0 ; when i see the execution plan with

  • Is there any xi content for R/3 4.7 ? where ?

    Hi All, A while back, we imported SRM content (message definitions, mainly) for SRM 5.5 into our Repositiory. Now I am searching for possible standard content regarding FICO in R/3 4.7. we run XI 3.0 (sp18, soon sp20) But now I cannot find anything o

  • Customized Self Registration results in User-defined exception

    Hello Folks, I've set up a custom self-registration form based on the Metalink Document 277789.1, but every time I try to create a new user I get a user defined exception. The user gets created but I still get a user-defined exception. Is it possible

  • Oracle dbxml2.5.16:crash with query execute()

    Hi, I encountered following crash while using DBXML 25.16 with C++ in multi-threaded environment: #0 0x0fa28704 in DbXml::NsDomElement::NsDomElement(DbXml::NsNode*, DbXml::NsDoc*) () from /usr/MotoAgent/thirdparty/lib/libdbxml-2.5.so #1 0x0fa29928 in