How to minimize memory usage with VM settings

Using JDK 1.4.2, I am trying to minimize the memory usage of my application.
Our GUI application consumes about ~20MB of heap space during normal operation, but it can easily grow to 50MB in some rare cases (Special feature accessed by user).
We have to be able to run multiple instances (separate process/VMs) of this application on low end Windows PCs.
The applications don't usually run for very long (less than 8 hours).
Here is my problem.
If I set the -Xms=20M -Xmx=64M, it works fine, but the GC is not very aggressive and soon, the application starts using a lot of memory, even if it is not really needed. And it never returns the memory to Windows OS.
So each VM take more memory than really needed, which causes significant swapping on these low end PC (little RAM available).
If I reduce the -Xmx flag, than I run out of memory in the rare cases where I need the full memory.
Ideally, I would like to configure the GC to be more aggressive, i.e. the GC should collect instead of getting additional memory from the OS when possible.
I read a few papers on Sun's web site about HotSpot tunning, but most of them are geared for large servers.
Thanks!
Francois

And you are using the task manager to determine how "much" memory is being used correct?
I suggest that you search out and read the numerous threads on this site that discuss that subject.

Similar Messages

  • Minimize memory usage with a multi-frame MovieClip

    I have a MovieClip in Flash with 100 frames. Each frame contains a certain icon I need to use in a project. I create instances of this icon MovieClip wherever I need an icon to appear, and gotoAndStop to a certain frame to display that icon.
    Will storing a 100 icons in a single movieclip cause every single icon to be created in memory whenever I create an instance of the MovieClip? If I stored each icon in the library and attached only the icon that is needed, would that consume less memory than creating this MovieClip that has all the icons in it?

    if you create an object in the ide (ie, by putting it on-stage), then it (roughly) only exists in memory while it is on-stage (or on the backstage).

  • How to capture memory usage for web application

    In OATS openscripts, how to capture memory usage for web application? Does it have the exisitng java method that we can call to get the memory data (e.g. peak bytes, private bytes) consumed by web application?

    JProbe

  • How to monitor memory usage of "Memory-based Snapshot" executable (MRCNSP)  in Linux?

    We have noticed in the past that MRCNSP/Memory-based Snapshot program executable consumes around 3.8 GB of memory on the linux VM. I understand that value change planning  is 32 bit executable so 4 GB is the limit. I want to monitor the memory usage of the executable when the program runs. The program usually runs overnight. I wanted to check with you experts if you have any MRP executable memory usage monitoring script that I could use.
    I found the metalink note OS Environment and Compile Settings for Value Chain and MRP/Supply Chain Planning Applications (Doc ID 1085614.1) which talks about "top -d60 >>$HOME/top.txt". Please share your ideas for monitoring this process.
    We do not use Demand Planning or Demanta or Advanced Supply Chain Planning which are 64 bit application. That is our future direction.
    Environment:
    EBS : R12.1.2 on Linux. The concurrent manager is on 64 bit linux VM, web services on 32 bit VMs.
    DB: Oracle DB 11.2.0.3 on HP UX Itanium 11.31. Single database instance.
    Thanks
    Cherrish Vaidiyan

    RAM on the controller is not the same as the C: drive. With respect to the controller, you can think of it in the same terms as your computer. RAM is volatile memory and your C: drive is non volatile flash memory.
    Depending on the frequency of the temperature excursions above and below your 70C threshold, the service life of the controller and the method you used to append to the file, there could be a number of issues that may creep up over time.
    The first, and the one you brought up is the size of the file over time. Left unchecked this file could grow continuously until the system literally runs out of flash memory space and chokes. Depending on how your are appending data to this file, you could also use more than a trivial slice of processor time to read and write this big file on disk. While I have not personally ever run one of the RT controllers out of "disk space", I can't imagine that any good could come of that.
    One thought is to keep a rolling history of say the last 3 months. Each month, start a new file and append your data to it during the course of the month. Each time a new file is created, delete the data file from something like 3 months ago. This will ensure that you will always have the last 3 months of history on the system, however the monthly deletion of the oldest data file will limit you to say 3 files at whatever size they happen to be. Unless there are hundreds of thousands of transitions above and below your threshold this should keep you in good shape.
    I also eluded to the method you use to write to this file. I would ensure that you are appending data using the actual file functions and not first reading in the file, appending your data as a string then writing the entire file contents back to disk. In addition to causing the highest load on the file system this method also has the largest system RAM requirements.

  • How to determine memory usage?

    Is there something built into OSX that permits me to monitor and/or log memory usage?
    I use Logic Pro and FCP and would like to know if I reaching the limits of my memory (4GB) with the type of work I do.
    Thanks, Rob.

    How To Determine Your Memory Needs >>
    -Bmer
    Mac Owners Support Group
    Join Us @ MacOSG.com
    ITMS: MacOSG Podcast
     An Apple User Group 
    Disclaimer required by Apple Discussions Terms of Use: MacOSG - a non-profit Apple User Group - may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • How to check memory usage of a debug

    I am very new, sorry for any newbishness on my part.
    Is there a way to track how much memory your debug is using?  I am trying to make a game, and I have 2 ways of doing something.
    One with an array of square objects doing hitTest, and one only 1 object and an array of cords doing a nested if{}.
    I want to see what each of these are doing in terms of memory usage during runtime and which one would be better.
    (added)
    Specificly not just which one of these is better, but also as different things are applied, I want to test how each of these things responds and which one would slow down a computer less.  And later on as things progress I want a way to test it.

    Hi there
    What Adobe product are you using? What you need to do is click the link below and locate the forum that is specific to the product you are using. Then re-post your question there.
    What you have done is the equivalent of wandering into a hospital and saying you feel ill. Where exactly do you feel ill? You may need a foot specialist, a heart specialist, a brain specialist, etc.
    Click here to visit the main forums chooser page
    Cheers... Rick

  • How to reduce memory usage when loading bitmaps from the library?

    When I use BitmapData.loadBitmap() to load an image from the library and then attachBitmap() to add it to a MovieClip it takes a lot more memory as opposed to just having the same image inside a MovieClip statically in a frame on it's timeline.
    The function dispose() not only clears the BitmapData object but also destroys the previously attached bitmap inside the MovieClip, so it can not be used to free any memory.
    Is it how it is supposed to be or is there any other way to dynamically attach bitmaps with memory usage comparable to just having them on stage?

    no, you use attachMovie() to create instance from library movieclips that have a linkage id.
    you can then create a bitmapdata instance and use the draw() method to overlay as many as needed.

  • How to calculate memory usage base on graphic utilization

    Dear All ,
    We have t2000 server with solaris 10 and 15 zones inside , and install SMC server include module ,Harddware configuration is 16 Gb Memory , 4 x 72 gb Hardisk and Swap 4Gb .,from menu Manage container manager , we select host of the server then click utilization , but i see memory usage 19759 Mb , How to calculate memory from this graph ? cause maximum ream RAM only 16 Gb in our server.
    Regards
    Hadi

    PL/SQL collections are stored in the PGA. So you can monitor the PGA utilization of the session(s) to see how much PGA they use.
    SELECT sid, name, value
      FROM v$statname name
           JOIN v$sesstat using (statistic#)
    WHERE name.name in ('session pga memory', 'session pga memory max' )That will show you, for each session, the current PGA consumed by the session and the high water mark of PGA consumption by that session. You can join to V$SESSION and add additional predicates to narrow things down to the particular sessions you are interested in.
    Justin

  • How to reduce memory usage?

    OK - I've read through a ton of posts that discuss the "Out of memory" problem in Encore, but what can I do to reduce memory usage?
    I'm trying to produce a very simple Blu-Ray (h.264) project in Encore CS3 on Windows Vista. There are 8 or 9 timelines, a main menu, and 6 sub-menus. Each sub-menu has six static buttons. There are no transitons or motion menus. When I load the project, Task Manager says Encore is using about 1.3 GB RAM. I constantly get "out of memory" errors.
    I've loaded the same project on Vista 32-bit w/ 4GB RAM and Vista 64-bit w/ 8 GB RAM. Same behavior on both.
    Two questions:
    1. Why does Encore need 1.3 GB RAM for such a simple project?
    2. How do I reduce the memory usage?
    TIA for help on the PITA,
    rgames

    Please check with below link, if this can help.
    http://forums.creativecow.net/thread/145/863785#863796

  • Norton reports high memory usage with firefox and it crashes often

    Norton antivirus 2011 has pop up warnings reporting high memory usage from Firefox. I have been getting theem often and my computer is crashing often after those pop up warnings. Thanks

    Safe mode did not help.
    I have disabled ALL extensions and plug-ins, but the problem with "zig-zag" memory usage still remains (I've not tried to leave browser open for the night yet).
    I think I'll do clean reinstall with completely new empty profile (without sync'ed information) to try this out. If this works, I'll start adding stuff (configuration, sync, features, etc) to see what causes the problem.

  • Very high memory usage with Yahoo Mail

    After using Yahoo Mail for an hour or so my memory usage increases to a very high level.
    Just now, after reading and deleting about 50 e-mails (newsletters etc.) I noticed Firefox 17 running slowly and checked the memory usage in Windows Task Manager (I am using XP) and it was 1.2 Gb. My older laptop only has 2 Gb of RAM. Yahoo Mail was the only thing open at the time.
    I never notice this problem with Gmail which I mainly use. However I use Yahoo Mail for quite a few newsletters etc. that are less important and which I only check once a week or so.
    I found the following bug report about 3 years old which almost exactly describes my problem.
    https://bugzilla.mozilla.org/show_bug.cgi?id=506771
    But this report involves a much earlier Firefox version, and at the end it seems to say that the problem was fixed. However it well describes my current issue with Firefox 17, especially the continual increase in memory while using the up/down arrow keys to scroll through Yahoo e-mails.
    Is this normal to have to shut down and reopen Firefox every hour or so to clean out the memory? For some reason I only notice this when using Yahoo Mail. After using many other sites and having multiple tabs open for several hours I rarely reach that kind of memory usage. About the highest I've seen with other sites after a couple of hours is 600 Kb which is roughly when I start notice slower response times.

    See also:
    *https://support.mozilla.org/kb/firefox-uses-too-much-memory-ram
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Excessive memory usage with FireFox 3.6.8

    Is it normal for the total memory footprint of FireFox.exe and Plugin-Container.exe to be 1.14GB (488MB and 651MB respectively)?
    When first opening FireFox, it's footprint is approx 30MB, but inexorably creeps upward as I browse (typically YouTube/Hulu/4chan/GMail), consuming nearly 60% of total system memory before performance loss demands a browser restart.
    Is there any workaround or update/patch or command-line argument that will cap memory usage? Will rolling back to an earlier version of FF solve the problem, or is it a problem with Flash? Any advice would be appreciated.

    This is caused by the Flag Fox add-on, you can either disable or uninstall it.
    # Open the add-ons manager - in the menus select Tools, then Add-ons
    # In the add-ons manager go to the Extensions panel
    # In the list of add-ons click on Flag Fox to select it, then either click on the Disable or Uninstall button
    # Re-start Firefox to complete the process
    Do you have Personas Plus 1.6 installed? If you do try disabling that one instead, it has been causing problems with add-ons.

  • WinXP and Vista memory usage with Illustrator CS2 - is Vista winning?

    Dear forum.
    I have an AI-template file where I insert some very large PNG files into it, modifies the template a bit and then I print the the resulting document in PS-format. The PNG files may be as large as 100 MB (24-bits, approx. 100 mil. pixels in total). It appears that while a Vista-based machine has no problem loading one or even two copies of these huge files into memory, a WinXP-based machine can't even load a single file into memory. Instead, I a dialog box with the message: "Could not read the file because the plug-in could not understand this file". Is it really a faulty plug-in or is it just CS2's way of saying "not enough memory" in a quirky way?
    All in all, I would like to hear whether someone has the same experience with Vista, ie. it seems to be better at memory management or better at allocating memory for Illustrator CS2, enabling it to load large PNG files.
    The specifications of the WinXP-based machine:
    Pentium 4 2.6 GHz
    3 GB RAM
    Virtual memory 4095 MB in a physically separate drive from the OS disk
    All Visual Effects are turned off
    Has Illustrator CS2, Adobe Acrobat 7 and Distiller installed (and a few auxilliary programs)
    The specifications of the Vista-based machine:
    Dell OptiPlex 740SF
    AMD x2 5000 (2.6 GHHz)
    2 GB RAM (667 MHz, 2 x 1 GB)
    250 GB SATA disk
    Windows Vista
    Adobe Creative Suite 2 Standard + Adobe Creative Suite 3
    Thanks!

    Hi, everyone
         I got a new t440p 20ANA00UHH (8GB RAM, win8 64bits) about one week ago. It works really well, but its memory usage  confused me. In Task Manager, the "Performance" option shows memory is 68% (5.4G in use), but "Users" option shows memory usage 66% (1019.5M in use). Is that normal ? I just opened some websites and word files.

  • How to decrease memory usage in XE 11.2

    Yesterday I uninstalled Oracle XE 10 and installed OracleXE 11. Everything is going fine so far except for the memory usage - it's around 800 megs. I remember having this problem with the last XE instance, and there was some way to change this, but I don't recall what it was. I looked around on the XE web interface - which is very different from the last interface - but couldn't find anything.
    Does anybody know what I'm needing to change?
    Thanks in advance!

    Hi,
    This might help
    http://download.oracle.com/docs/cd/E17781_01/server.112/e18804/memory.htm#CACFBJED
    Regards,
    Jari

  • How to meter memory usage

    Hi,
    I want to meter the memory usage of some XML-Parsers. Thus I do something like
    long before = Runtime.getRuntime().freeMemory();
    //parse
    long after = Runtime.getRuntime().freeMemrory();but always the difference (after - before) returns a negative value, which means that the parsing creates memory ;-)
    First I guessed, that during parsing the GC gets active and collects more objects than created. So I called the GC right before the upper code, wait for 2000ms to ensure the GC does something, but the result is the same.
    I tried this with the kXML2.0, XParse-J and ASXMLP with different sizes but the same result.
    What goes wrong there?
    Kay

    Where are you trying it out?
    Some phones, specially high-end phones like Series 60, allocate more heap memory dynamically while the program is running, so the freeMemory() keeps getting bigger the more memory you allocate.
    Other than that, there really is no way to make sure the garbage collector runs after you call System.gc(). Implementations are free to completely ignore a call like this, even if you give them time to do it.
    shmoove

Maybe you are looking for

  • Help! I can't print or save.

    I am just installed the trial of iWork Numbers and can't print or save and get an error stating that I must buy it before i can save. It's extremely annoying as I can't put it to the test because everything I create in he trial must be lost. I also f

  • The Lightroom Manual is Not Clear on Options for the White-Balance Tool

    In the section "Working with image tone and color" the Lightroom manual states: Specify a neutral area in the photo 1. In the Basic panel of the Develop module, click the White Balance Selector tool to select it, or press the W key. 2. Move the White

  • Out ot memory

    I got this error: Java lang out of memory when i am saving audio in aByteArrayOutputStream,i can only record about 8 minutes. The initial size of memory is: 256m My code is: public void run(){        int frameSizeInBytes = frtoData.getFrameSize();   

  • Users unable to change their interactive reports

    What tables and fields control what user can change the report? a bit of history: Due to the terrible bug that plauges apex where user created interactive reports dont get promoted with code changes when promoting from dev to prod environments, we ha

  • Cxtra sendmail

    I am developing a simple program where visitors at our Museum can make stop-motion animation and have the option to e-mail a short avi clip to a friend of family member. I figured everything out thanks to your help on this form. The problem is using