Memory Usage:  Heap space vs System Monitor

Hi guys
I'm trying to wrap my head around something which seems pretty complicated. We have an enterprise app making use of Jasper Reports. When a report is generated, the app's memory usage in the Linux (Ubuntu 8.10) System Monitor shoots up by around 20MB (the more data on the report, the higher that number). After the report is closed, memory usage doesn't decrease. This is resulting in performance issues, and memory usage given by the System Monitor doesn't match up with the results given by the NetBeans profiler. There is a huge difference between the values indicated by the System Monitor, and the heap space given by the profiler. I've done some fairly detailed checking using the profiler, and according to that, there are 0 instances of our report generating classes in memory after closing a generated report. I've read a bunch of articles on the net, but I'm still stumped. My best guess is that something weird is happening somewhere in the Jasper code, but I can't really think of a way to confirm that. Does anyone have any idea what could be causing this and how to prevent it? Any help will be much appreciated; thanks.
P.S. I've posted on the Jasper forums are well, but to no avail. [http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=65335]
Edit: We're using Java 6 (we've recreated the issue on a few release of Java 6), and Jasper Reports 3.0.1. (Just in case that is important)

One thing about your test is that using Xms110m will cause the JVM to NEVER give back any memory, because it won't ever go below 110M. I altered your test a bit:
import java.util.LinkedList;
public class MemTest {
   private static LinkedList<byte[]> mem = new LinkedList<byte[]>();
   public static void main(String[] args) {
        try {
            System.out.println("Initial:");
            print();
            useMem();
            System.out.println("Allocated:");
            print();
            clearMem();
            System.out.println("Deallocated:");
            print();
            for (;;) {
               Thread.sleep(10000);
               System.out.println("After 10 seconds: ");
               print();
        } catch (Exception ex) {
            ex.printStackTrace();
   private static void useMem() {
      for (;;) {
         try {
            mem.add(new byte[1024*1024]);
         } catch (OutOfMemoryError e) {
            //free up a few MB to make sure we don't get an OOME while trying to print, etc
            mem.removeFirst();
            mem.removeFirst();
            mem.removeFirst();
            break;
   private static void clearMem() {
      mem = null;
      System.gc();
      System.gc();
      System.gc();
   private static void print() {
      long free = Runtime.getRuntime().freeMemory();
      long total = Runtime.getRuntime().totalMemory();
      double freeFraction = (((double)free) / (total)) * 100;
      System.out.printf("\tAvailable: %d\tTotal: %d\tFree: %4.2f%%%n", free, total,
            freeFraction);
}When I ran it with
-Xms16m -Xmx1024m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=30I got these results:
Initial:
     Available: 16518016     Total: 16711680     Free: 98.84%
Allocated:
     Available: 2070952     Total: 1065484288     Free: 0.19%
Deallocated:
     Available: 582957376     Total: 583073792     Free: 99.98%
After 10 seconds:
     Available: 582953224     Total: 583073792     Free: 99.98%As you can see, the JVM did return about half of the memory back. ProcExp shows ~592MB used, and peaked ~1000MB. But right now it's still running, and still holding at 583MB.
I've read bug reports like this, but honestly have no idea what the people at Sun are talking about. I don't see the footprint being reduced. I don't know, maybe if I wait a couple of days...

Similar Messages

  • How to analyse the main memory usage in SAP ERP systems?

    Dear expert,
    I'm doing a research work about analysing the main memory usage in SAP ERP systems.
    I would like to find out what is load in buffers and when. That means, which process have the control of these memories and which are always performing something, tables loaded, and so on. Becuase I tried to isolate the space needed by a simple webservice call (create one material) in my test system, but even after a $SYN there are something stored in the buffers. I use a BAPI to avoid the execution of the SAPGUI and its repercussion in the system (I know the BAPI called uses resources too, but when I run this BAPI to get the statistics, it's like ST02, I get different values). Could someone help me or recommend something specific to read? Thanks a lot in advance.

    Dear expert,
    Thanks a lot for your answer. The point is now that I want to isolate the memory used by a webservice that I call, I mean, I would like to know how many memory is this webservice using in each buffer. And could you tell me where could I read something about the order that things happen in SAP System when a webservice is called (always memory related), that's which steps are done to store data in buffers and so on. Thanks in advance.

  • Out of memory: Java heap space

    Hello,
    I am working on a project, that simulates large populations, with each individual being a separate Objecta(a couple of kilobytes in size each).
    Once i reach a bug enough number of those Objects (stored in a Vector), i get Out of memory: Java heap space exception.
    Am i having a memory leak in Java? Or am i really reaching the maximal JVM limit and i need to reconfigure it, to support larger heap size?
    :)

    Am i having a memory leak in Java?Because of garbage collection there, by far and large, aren't memory leaks in java. However, there certainly is memory waste.
    If each of these objects you make room for are unnecessarily laden with references to other large objects creating huge networks of objects that never free their memory, and then you allocate 1 million of them, then, while not a leak, you are wasting your memory space.
    Look through your class and inspect each field to see if any of them could be holding more data than you intend. If so, multiply the amount of that data by 1,000,000 or however many objects you are going to instantiate to determine if this produces and absurd amount of memory. You should be able to predict ~how much storage your data will need...each char is 2bytes, each int is 4 bytes, doubles are 8 etc

  • High RAM memory usage compared to other systems

    I'm suffering with memory usage problems, only in open 2 tabs of facebook(it's only for example, any 'heavy' page freeze also) in firefox*(for example also, but this occur in chromium also) freeze computer.
    I've 1GB of memory, it isn't big but also isn't very little.
    I'm using XFCE with compiz (yes, compiz, since use a very lightweight openbox-based session doesn't help, then compiz...) when system start (after login) system is consuming 130MB approximately of RAM.
    after 1 hour if close all open apps and see memory usage again consume is something about 350MB, "only solution" is reboot.
    all applications(htop,free -m,xfce's system monitor...) that I've tried to monitor memory usage show above scenario, except the 'ps_mem' script in AUR.
    in the 'ps_mem' script the result is following (with opera browser open, less memory offensive browser but I really prefer firefox):
    Private + Shared = RAM used Program
    88.0 KiB + 10.0 KiB = 98.0 KiB agetty
    380.0 KiB + 34.5 KiB = 414.5 KiB sshd
    408.0 KiB + 93.0 KiB = 501.0 KiB gpg-agent (2)
    372.0 KiB + 142.0 KiB = 514.0 KiB avahi-daemon (2)
    456.0 KiB + 60.0 KiB = 516.0 KiB systemd-logind
    280.0 KiB + 261.0 KiB = 541.0 KiB sh
    476.0 KiB + 103.5 KiB = 579.5 KiB xfconfd
    476.0 KiB + 153.5 KiB = 629.5 KiB gvfsd
    604.0 KiB + 34.5 KiB = 638.5 KiB systemd-udevd
    588.0 KiB + 102.5 KiB = 690.5 KiB dbus-launch (3)
    576.0 KiB + 119.5 KiB = 695.5 KiB sudo
    668.0 KiB + 77.5 KiB = 745.5 KiB cups-browsed
    620.0 KiB + 179.5 KiB = 799.5 KiB at-spi2-registryd
    804.0 KiB + 67.0 KiB = 871.0 KiB htop
    756.0 KiB + 131.0 KiB = 887.0 KiB gconfd-2
    800.0 KiB + 126.0 KiB = 926.0 KiB upowerd
    752.0 KiB + 183.5 KiB = 935.5 KiB xscreensaver
    920.0 KiB + 85.0 KiB = 1.0 MiB cupsd
    876.0 KiB + 241.0 KiB = 1.1 MiB gvfsd-fuse
    692.0 KiB + 429.0 KiB = 1.1 MiB systemd-journald
    880.0 KiB + 273.5 KiB = 1.1 MiB at-spi-bus-launcher
    1.2 MiB + 125.0 KiB = 1.3 MiB udisksd
    1.4 MiB + 486.5 KiB = 1.9 MiB dbus-daemon (5)
    1.4 MiB + 533.5 KiB = 1.9 MiB panel-6-systray
    1.5 MiB + 430.0 KiB = 2.0 MiB lightdm (2)
    1.6 MiB + 572.0 KiB = 2.1 MiB xfce4-session
    1.5 MiB + 683.0 KiB = 2.2 MiB panel-5-datetim
    1.5 MiB + 706.5 KiB = 2.2 MiB panel-2-actions
    1.6 MiB + 723.0 KiB = 2.3 MiB panel-4-systeml
    2.0 MiB + 543.5 KiB = 2.5 MiB xfsettingsd
    2.0 MiB + 579.5 KiB = 2.6 MiB systemd (3)
    2.3 MiB + 815.0 KiB = 3.1 MiB emerald
    2.8 MiB + 578.5 KiB = 3.3 MiB gnome-keyring-daemon (3)
    3.2 MiB + 946.5 KiB = 4.1 MiB zsh (2)
    16.1 MiB + -12144.0 KiB = 4.2 MiB polkitd
    4.1 MiB + 465.0 KiB = 4.6 MiB notify-osd
    4.5 MiB + 1.6 MiB = 6.2 MiB xfce4-panel
    5.1 MiB + 1.2 MiB = 6.3 MiB panel-7-mixer
    7.7 MiB + 1.4 MiB = 9.0 MiB xterm (2)
    12.0 MiB + 636.0 KiB = 12.6 MiB opera:libflashp
    24.3 MiB + -10774.5 KiB = 13.8 MiB Xorg
    18.6 MiB + 1.1 MiB = 19.7 MiB gnome-do (2)
    23.2 MiB + 2.4 MiB = 25.6 MiB compiz
    168.4 MiB + 3.2 MiB = 171.7 MiB opera
    320.1 MiB
    =================================
    as you can see in 'ps_mem' memory usage isn't nothing absurdly it's ok.
    another example, this problem stop me make certain things, for example is impossible browsing in web while programming in eclipse, this is very uncomfortable.
    other thing, this not occur in Windows XP, I can open more than 10 tabs in firefox, and eclipse open, etc...
    any needing information, tell-me!
    firefox*: with memory cache turned off in about:config
    Last edited by hotvic (2013-08-12 17:42:21)

    hotvic, could you please change the title to something more descriptive? 'memory problems' sounds like you have problems e.g. remembering / recalling things, which is not an Arch issue ;P
    kenny3794 wrote:
    I've had some limiting performance with browsers lately (Firefox and Chromium).  I found it had a considerable cache size utilizing lots of fragmented space on my home directory. I cleared the cache and have since set a limit to the cache size of 30 MB for Firefox.  Between multiple users across multiple browser sessions, I had at least 2 GB of cache data on my 10 GB home partition!  So far (1 day), this has been helpful.  Perhaps this could help you also?
    Ken
    OP is talking about RAM, not HDD space.

  • Is there a VI to monitor CPU and memory usage on wINDOWS 2000 system ?

    I want to monitor CPU usage and available memory for Windows 2000 computer. Is there a VI that can call the task mngr. via a DLL to provide this information in real time ?

    There was a nice example using .NET technology, but it seems the link has changed and I cannot find it anymore. See this older thread for some clues.
    Does anyone know what happened to the target of the original link in my old post?
    Edit: Found it here.Message Edited by altenbach on 04-29-2005 12:42 PM
    LabVIEW Champion . Do more with less code and in less time .

  • Activity Monitor Indicates 16+TB Memory Usage !

    Has anyone ever seen an application's memory usage displayed in the Activity Monitor as 'Terabytes?' I recently noticed that Photoshop CS3 was using [get this] '16,777,216.00TB' of Real Memory. I spoke with both Adobe & Apple, and neither has any reports of anything like this. Weird!

    Did restart, but haven't had a chance to run PS yet. I did repair permissions via Disk Utility and there were quite a few corrections. Whether that had anything to do with it remains to be seen. I did read once that incorrect permissions [set incorrectly by installers] can cause a host of application-related issues [such as app crashes and the inability to launch them]. Other app memory usage looks normal.

  • What are Microsoft- or other's-best practice or recommendation of Disk usage, CPU usage, memory usage monitoring to prevent system trouble ?

    We use win2003,win2008,win2012 servers.
    I heard somewhere that Microsoft recommendation threshold of disk usage monitoring is ( free disk space >= 15- 20 %) , if I remember correctly, but how about CPU usage and memory usage monitoring ? 
    What are  Microsoft- or other's-best practice or recommendation of Disk usage, CPU usage, memory usage monitoring to prevent system trouble and improve availability ?

    Hi,
    You can refer the following Performance Tuning Guidelines,
    Performance Tuning Guidelines for Windows Server 2003
    http://download.microsoft.com/download/2/8/0/2800a518-7ac6-4aac-bd85-74d2c52e1ec6/tuning.doc
    Performance Tuning Guidelines for Windows Server 2008 R2
    http://blogs.technet.com/b/josebda/archive/2010/08/27/performance-tuning-guidelines-for-windows-server-2008-r2.aspx
    WINDOWS SERVER 2012 - PERFORMANCE TUNING GUIDELINES
    http://blogs.technet.com/b/itprocol/archive/2012/11/27/windows-server-2012-performance-tuning-guidelines.aspx
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Massive memory hemorrhage; heap size to go from about 64mb, to 1.3gb usage

    **[SOLVED]**
    Note: I posted this on stackoverflow as well, but a solution was not found.
    Here's the problem:
    [1] http://i.stack.imgur.com/sqqtS.png
    As you can see, the memory usage balloons out of control! I've had to add arguments to the JVM to increase the heapsize just to avoid out of memory errors while I figure out what's going on. Not good!
    ##Basic Application Summary (for context)
    This application is (eventually) going to be used for basic on screen CV and template matching type things for automation purposes. I want to achieve as high of a frame rate as possible for watching the screen, and handle all of the processing via a series of separate consumer threads.
    I quickly found out that the stock Robot class is really terrible speed wise, so I opened up the source, took out all of the duplicated effort and wasted overhead, and rebuilt it as my own class called FastRobot.
    ##The Class' Code:
        public class FastRobot {
             private Rectangle screenRect;
             private GraphicsDevice screen;
             private final Toolkit toolkit;
             private final Robot elRoboto;
             private final RobotPeer peer;
             private final Point gdloc;
             private final DirectColorModel screenCapCM;
             private final int[] bandmasks;
             public FastRobot() throws HeadlessException, AWTException {
                  this.screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
                  this.screen = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
                  toolkit = Toolkit.getDefaultToolkit();
                  elRoboto = new Robot();
                  peer = ((ComponentFactory)toolkit).createRobot(elRoboto, screen);
                  gdloc = screen.getDefaultConfiguration().getBounds().getLocation();
                  this.screenRect.translate(gdloc.x, gdloc.y);
                  screenCapCM = new DirectColorModel(24,
                            /* red mask */    0x00FF0000,
                            /* green mask */  0x0000FF00,
                            /* blue mask */   0x000000FF);
                  bandmasks = new int[3];
                  bandmasks[0] = screenCapCM.getRedMask();
                  bandmasks[1] = screenCapCM.getGreenMask();
                  bandmasks[2] = screenCapCM.getBlueMask();
                  Toolkit.getDefaultToolkit().sync();
             public void autoResetGraphicsEnv() {
                  this.screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
                  this.screen = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
             public void manuallySetGraphicsEnv(Rectangle screenRect, GraphicsDevice screen) {
                  this.screenRect = screenRect;
                  this.screen = screen;
             public BufferedImage createBufferedScreenCapture(int pixels[]) throws HeadlessException, AWTException {
        //          BufferedImage image;
                DataBufferInt buffer;
                WritableRaster raster;
                  pixels = peer.getRGBPixels(screenRect);
                  buffer = new DataBufferInt(pixels, pixels.length);
                  raster = Raster.createPackedRaster(buffer, screenRect.width, screenRect.height, screenRect.width, bandmasks, null);
                  return new BufferedImage(screenCapCM, raster, false, null);
             public int[] createArrayScreenCapture() throws HeadlessException, AWTException {
                       return peer.getRGBPixels(screenRect);
             public WritableRaster createRasterScreenCapture(int pixels[]) throws HeadlessException, AWTException {
             //     BufferedImage image;
                 DataBufferInt buffer;
                 WritableRaster raster;
                  pixels = peer.getRGBPixels(screenRect);
                  buffer = new DataBufferInt(pixels, pixels.length);
                  raster = Raster.createPackedRaster(buffer, screenRect.width, screenRect.height, screenRect.width, bandmasks, null);
             //     SunWritableRaster.makeTrackable(buffer);
                  return raster;
        }In essence, all I've changed from the original is moving many of the allocations from function bodies, and set them as attributes of the class so they're not called every time. Doing this actually had a significant affect on frame rate. Even on my severely under powered laptop, it went from ~4 fps with the stock Robot class, to ~30fps with my FastRobot class.
    ##First Test:
    When I started outofmemory errors in my main program, I set up this very simple test to keep an eye on the FastRobot. Note: this is the code which produced the heap profile above.
        public class TestFBot {
             public static void main(String[] args) {
                  try {
                       FastRobot fbot = new FastRobot();
                       double startTime = System.currentTimeMillis();
                       for (int i=0; i < 1000; i++)
                            fbot.createArrayScreenCapture();
                       System.out.println("Time taken: " + (System.currentTimeMillis() - startTime)/1000.);
                  } catch (AWTException e) {
                       e.printStackTrace();
        }##Examined:
    It doesn't do this every time, which is really strange (and frustrating!). In fact, it rarely does it at all with the above code. However, the memory issue becomes easily reproducible if I have multiple for loops back to back.
    #Test 2
        public class TestFBot {
             public static void main(String[] args) {
                  try {
                       FastRobot fbot = new FastRobot();
                       double startTime = System.currentTimeMillis();
                       for (int i=0; i < 1000; i++)
                            fbot.createArrayScreenCapture();
                       System.out.println("Time taken: " + (System.currentTimeMillis() - startTime)/1000.);
                       startTime = System.currentTimeMillis();
                       for (int i=0; i < 500; i++)
                            fbot.createArrayScreenCapture();
                       System.out.println("Time taken: " + (System.currentTimeMillis() - startTime)/1000.);
                       startTime = System.currentTimeMillis();
                       for (int i=0; i < 200; i++)
                            fbot.createArrayScreenCapture();
                       System.out.println("Time taken: " + (System.currentTimeMillis() - startTime)/1000.);
                       startTime = System.currentTimeMillis();
                       for (int i=0; i < 1500; i++)
                            fbot.createArrayScreenCapture();
                       System.out.println("Time taken: " + (System.currentTimeMillis() - startTime)/1000.);
                  } catch (AWTException e) {
                       e.printStackTrace();
        }##Examined
    The out of control heap is now reproducible I'd say about 80% of the time. I've looked all though the profiler, and the thing of most note (I think) is that the garbage collector seemingly stops right as the fourth and final loop begins.
    The output form the above code gave the following times:
    Time taken: 24.282 //Loop1
    Time taken: 11.294 //Loop2
    Time taken: 7.1 //Loop3
    Time taken: 70.739 //Loop4
    Now, if you sum the first three loops, it adds up to 42.676, which suspiciously corresponds to the exact time that the garbage collector stops, and the memory spikes.
    [2] http://i.stack.imgur.com/fSTOs.png
    Now, this is my first rodeo with profiling, not to mention the first time I've ever even thought about garbage collection -- it was always something that just kind of worked magically in the background -- so, I'm unsure what, if anything, I've found out.
    ##Additional Profile Information
    [3] http://i.stack.imgur.com/ENocy.png
    Augusto suggested looking at the memory profile. There are 1500+ `int[]` that are listed as "unreachable, but not yet collected." These are surely the `int[]` arrays that the `peer.getRGBPixels()` creates, but for some reason they're not being destroyed. This additional info, unfortunately, only adds to my confusion, as I'm not sure why the GC wouldn't be collecting them
    ##Profile using small heap argument -Xmx256m:
    At irreputable and Hot Licks suggestion I set the max heap size to something significantly smaller. While this does prevent it from making the 1gb jump in memory usage, it still doesn't explain why the program is ballooning to its max heap size upon entering the 4th iteration.
    [4] http://i.stack.imgur.com/bR3NP.png
    As you can see, the exact issue still exists, it's just been made smaller. ;) The issue with this solution is that the program, for some reason, is still eating through all of the memory it can -- there is also a marked change in fps performance from the first the iterations, which consume very little memory, and the final iteration, which consumes as much memory as it can.
    The question remains why is it ballooning at all?
    ##Results after hitting "Force Garbage Collection" button:
    At jtahlborn's suggestion, I hit the Force Garbage Collection button. It worked beautifully. It goes from 1gb of memory usage, down to the basline of 60mb or so.
    [5] http://i.stack.imgur.com/x4282.png
    So, this seems to be the cure. The question now is, how do I pro grammatically force the GC to do this?
    ##Results after adding local Peer to function's scope:
    At David Waters suggestion, I modified the `createArrayCapture()` function so that it holds a local `Peer` object.
    Unfortunately no change in the memory usage pattern.
    [6] http://i.stack.imgur.com/Ky5vb.png
    Still gets huge on the 3rd or 4th iteration.
    #Memory Pool Analysis:
    ###ScreenShots from the different memory pools
    ##All pools:
    [7] http://i.stack.imgur.com/nXXeo.png
    ##Eden Pool:
    [8] http://i.stack.imgur.com/R4ZHG.png
    ##Old Gen:
    [9] http://i.stack.imgur.com/gmfe2.png
    Just about all of the memory usage seems to fall in this pool.
    Note: PS Survivor Space had (apparently) 0 usage
    ##I'm left with several questions:
    (a) does the Garbage Profiler graph mean what I think it means? Or am I confusing correlation with causation? As I said, I'm in an unknown area with these issues.
    (b) If it is the garbage collector... what do I do about it..? Why is it stopping altogether, and then running at a reduced rate for the remainder of the program?
    (c) How do I fix this?
    Does anyone have any idea what's going on here?
    [1]: http://i.stack.imgur.com/sqqtS.png
    [2]: http://i.stack.imgur.com/fSTOs.png
    [3]: http://i.stack.imgur.com/ENocy.png
    [4]: http://i.stack.imgur.com/bR3NP.png
    [5]: http://i.stack.imgur.com/x4282.png
    [6]: http://i.stack.imgur.com/Ky5vb.png
    [7]: http://i.stack.imgur.com/nXXeo.png
    [8]: http://i.stack.imgur.com/R4ZHG.png
    [9]: http://i.stack.imgur.com/gmfe2.png
    Edited by: 991051 on Feb 28, 2013 11:30 AM
    Edited by: 991051 on Feb 28, 2013 11:35 AM
    Edited by: 991051 on Feb 28, 2013 11:36 AM
    Edited by: 991051 on Mar 1, 2013 9:44 AM

    SO came through.
    Turns out this issue was directly related to the garbage collector. The default one, for whatever reason, would get behind on its collection at points, and thus the memory would balloon out of control, which then, once allocated, became the new normal for the GC to operate at.
    Manually setting the GC to ConcurrentMarkSweep solved this issue completely. After numerous tests, I have been unable to reproduce the memory issue. The garbage collector does an excellent job of keeping on top of these minor collections.

  • Memory Usage in WinTaskManger vs heap size

    hello,
    I have exactly the same problem as in the topic "Windows Task Manager vs. Heap", posted at Dec 10, 2004 5:17 AM, by jorgeHX.
    Here are the symptoms:
    1) My application starts at 20MB seen by windows task manager
    2) I use profiler to monitor the heap. Heap is always working very healthly - heap size in the profiler increases by a minimum until the gc comes around so that the used heap size drops down again.
    3) However, after doing a relatively memory-consuming operation (loop of String indexing, patterning ..etc.), the memory usage in windows task manager goes up couple of MBs but never drops down.
    4) Then I go manually free the heap (System.gc()), I can see GC is freeing heap. However, the memory in windows task manager remains no change, no matter how many times I force the garbabge collection.
    This is a bad thing - if my application keeps doing that memory-consuming operation again and again, the memory seen in the windows task manager will be growing and growing to hundreds of MBs until the windows alerts "low on virtual memory".
    I tried everything already. I set every instance = null at the end, I delete every reference but the memory just keeps increasing! WHY?????
    Anyone can help me charactorize the problem? I am so in dark!!
    Ryan-Chi

    I guess my problem can also be interpretated as
    "Why doesn't JVM return memory to OS?"
    It does, depending on the setting of the -XX:MaxHeapFreeRatio option. "Normal" operation using the default setting does not usually cause memory to be returned to the os.
    Search for this option term for explanations.

  • UCCX 7 Heap Memory Usage Exceeded Error

    UCCX 7.0.(1) SR5
    Getting the following error when updating or adding new script applications:
    "It is not recommended to update the application as Engine heap memory usage exceeded configured threshold. Click OK to continue and Cancel to exit."
    Apparently this is an alert that was built into SR4 and is configurable under the System Parameters.
    Does anyone have information on what processes use the heap memory in UCCX or how to monitor the usage?

    As Tom can attest to by now, this is something of an iceberg with big sharp edges below the surface.
    The Java heap is fixed at 256MB on CCX. The Java heap is used by Tomcat as execution memory. In addition to this, applications, scripts, and other repository data is loaded into the heap at runtime. Depending on your environment, you may be approaching the limits of the heap, which cannot be changed. If the heap size is reached, it will be dumped and impact calls.
    What have you been doing as of late on your CCX server? How many applications and scripts do you have? Are any of these using XML files extensively?
    Note there is also a possible bug where the MIVR engine does not properly release all objects loaded into the heap at the end of a script execution leading to a memory leak of sorts. The discussion [debate] over this behavior is continuing. As of this week, it may be represented under
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman","serif";}
    CSCte49231. If it is, this may qualify as the most poorly described defect ever.

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

  • System memory usage question

    I'm confused by the system memory usage as seen with the activity monitor. This is my first mac so i'm used to using windows. I see there is 5 categories: Wired, Active, inactive, used and free. Is inactive and free the same thing? I'm just trying to gauge how much ram I use and if it's worth it to upgrade to 1Gb from 512. Thanks.
    13.3" White Macbook (2.0 GHz, 512RAM)   Mac OS X (10.4.6)  

    Wired memory
    This information can't be cached to disk, so it must stay in RAM. The amount depends on what applications you are using.
    Active memory
    This information is currently in RAM and actively being used.
    Inactive memory
    This information is no longer being used and has been cached to disk, but it will remain in RAM until another application needs the space. Leaving this information in RAM is to your advantage if you (or a client of your computer) come back to it later.
    Free memory
    This memory is not being used.
    http://docs.info.apple.com/article.html?artnum=107918
    and i'd say that more memory is always useful in OS X

  • Free Disk Space vs Mac Memory Usage

    Hi,
    I'm wondering if you might be able to help me - I'm so confused with this issue.
    I have a MacBook 2008 with an upgraded 320GB HDD, with currently 203GB free disk space.
    My back up disk is 120GB - perfect for a time machine back up of 117 GB of data. However, the TM says theres not enough memory because the full size of the back is 150GB? How can this be?
    For some reason, the free disk space figure is different to the memory usage figures in About My Mac?
    Can anyone explain to me why this is?
    My other half uses this computer and has only pictures and files on it, no music or movies? So how can she have utilised 117GB of data? This was previously a shared Mac, but I've deleted my user acc since upgrading and wanted to make this Mac entirely hers.
    Any help regarding this will be truly appreciated.
    Sincerely,
    Tarmak

    CarbonCopyClone.  It is "donateware" ... pay if you want to.  Others use SuperDuper! (both a free and a paid version).  I prefer CCC, but do not let that stop you from paying for SuperDuper if others convince you as both are very competent.
    It makes a bootable copy of your system partition, and used repeatedly will make "incremental" backups that take far less time than the original backup.  I have a TimeMachine backup (I consider it "secondary") and a CCC backup whic I consider "primary" and will eventually save me when my system partition gets cranky and refuses to boot -- use the option key at startup to choose the external disk to boot from.
    When you boot from the external drive, which will have CCC running in it, you can then "clone back" to the new internal drive.

  • Xfce panel system monitor reading wrong RAM usage

    A picture is worth a thousand words:
    What's up with that ?
    I just booted up the computer, freshly running system
    EDIT: Oh, it seems to include cached memory in that display...but that's too much to be cached methinks
    Last edited by moljac024 (2009-02-24 09:49:29)

    William Boyd, Jr. wrote:
    Welcome to Apple's discussion groups.
    Thanks
    I believe that the most significant RAM value in Activity Monitor as far as performance problems is concerned is "Page outs". If this value is no more than a few hundred MB and isn't increasing over time, then your Mac isn't running out of RAM.
    I've just restarted and it is in a 2,5MB stable value. Also "Free" and "Active" values are now in normal values after 1 day of intesive use: 350 and 800 MB respectively.
    As for solving your slow down problem, I'd keep Activity Monitor open to the CPU pane to see if there are jumps in CPU use when the problem occurs.
    Nice. I've just opened the CPU Use mini-window and i'm also using the memory usage dock icon. Pretty cool to see CPU usage peaks.
    Thanks so much for the help

  • Game Heap Space - Out Of Memory Error

    Hi there,
    Ive completed my pacman/space invaders hybrid game- which has a main game and two playable videos. Its all fine, but when I go to run it it says;
    Exception in thread "Image Fetcher 1" java.lang.OutOfMemoryError: Java heap space
    Exception in thread "Image Fetcher 2" java.lang.OutOfMemoryError: Java heap space
    Ive come to realise that this error is from the amount of data used to make up the game/video with there being around 150 images for the videos. Ive temporarily corrected this problem by making each video 26 images long (2.6secs each) but to get the full experience the user need to see around 75images.
    After a bit of research I found that i needed to increase my 'heap space'- and I attempted to do this thru cmd, attemptin to increase it to 512mb.
    The problem is the game doesnt have a main, or at least not one that I nor the computer can locate. And to get the heap space to increase it needs a main?!
    I honestly dont know what I am doing here- but could anyone tell me how I can increase my heap space or locate a main? Im really confused!
    Any help appreciated
    Senor-Cojones

    Thanks for your help ArikArikArik, the problem with that method is.... 1. im not too sure how to use it :P and 2. In my original code the images are added to the tracker which waits from all the images to be loaded before it continues.
    import javax.swing.*;
    import java.applet.AudioClip;
    import java.awt.*;
    public class ICGGSApplet extends JApplet implements Runnable {
        // constants describing possible game states
        private static final int SHOW_MOVIE = 1;
        private static final int PLAY_GAME = 2;
        private static final int STOPPED = 3;
        private static final int SHOW_MOVIE2 = 4;
        private int gameState;   // the current game state
        private String name;     // the player's name
        private long frameStartTime;  // the time the last frame was displayed
        private Thread gameLoop;   // thread to run the game and movie
        // associated objects
        private Movie theMovie;      // Panel to display the movie
        private MonsterGame theGame;  // Panel to display the game
        private ICGGSPanel currentPanel;  // the currently displayed Panel (can be null)
        private Movie2 theMovie2; // Panel to display the second movie
         * Called when applet is first loaded
         *  sets up the attributes, load media, creates game objects
         *  and sets up interface
        public void init() {
            // neither the movie nor the game is currently playing
            currentPanel = null;
            gameState = STOPPED;
            name = "";
            // load up the audio files
            AudioClip theAudio = getAudioClip(getDocumentBase(), "../media/shock.wav");
            AudioClip theAudio2 = getAudioClip(getDocumentBase(), "../media/applause.wav");
            AudioClip theAudio3 = getAudioClip(getDocumentBase(), "../media/bomb.wav");
            AudioClip theAudio4 = getAudioClip(getDocumentBase(), "../media/cashtill.wav");
            AudioClip theAudio5 = getAudioClip(getDocumentBase(), "../media/pacman.wav");
            // create a media tracker to monitor the loading of the images
            MediaTracker theTracker = new MediaTracker(this);
            // load up the images for the movie
            Image movieImages[] = new Image[25];
            for (int i=0; i<movieImages.length; i++) {
                movieImages[i] = getImage(getDocumentBase(), "../media/movie" + (i+1) + ".jpg");
                theTracker.addImage(movieImages, i);
    // load up the images for the second movie
    Image movieImages2[] = new Image[25];
    for (int i=0; i<movieImages2.length; i++) {
    movieImages2[i] = getImage(getDocumentBase(), "../media/firingGun" + (i+1) + ".jpg");
    theTracker.addImage(movieImages2[i], i);
    // load up the images for the munchies
    Image image1 = getImage(getDocumentBase(), "../media/munchie1.gif");
    theTracker.addImage(image1, 4);
    Image image2 = getImage(getDocumentBase(), "../media/munchie2.gif");
    theTracker.addImage(image2, 5);
    Image image3 = getImage(getDocumentBase(), "../media/munchie3.gif");
    theTracker.addImage(image3, 6);
    // wait for all the images to be loaded
    try {
    theTracker.waitForAll();
    } catch (InterruptedException e) {
    // create the movie object
    theMovie = new Movie(movieImages);
    theMovie2 = new Movie2(movieImages2);
    // create the game object
    theGame = new MonsterGame(image1, image2, image3, theAudio, theAudio2, theAudio3, theAudio4, theAudio5);
    this.getContentPane().setBackground(Color.WHITE);
    // Initialise key-input functionality
    addKeyListener(new Input()); // add keyboard listener to applet
    * Called when the Applet is ready to start executing
    public void start() {
    // ask the user for their name
    name = JOptionPane.showInputDialog(this, "What is your name?");
    // start running the movie/game animation
    if (gameLoop == null) {
    gameLoop = new Thread(this);
    gameLoop.start();
    * Called when the gameLoop thread is started
    * loops continuously until user quits
    public void run() {
    int input = Input.NONE;
    // game loop
    while (input != Input.QUIT) {
    // what is the current time?
    frameStartTime = System.currentTimeMillis();
    input = checkInput();
    if (gameState != STOPPED) // only necessary if the movie or game is showing
    currentPanel.processInput(input);
    currentPanel.update();
    currentPanel.repaint();
    } else
    showStatus("Press 'G' to start game, 'M' to show movie or 'F' to show the second movie");
    frameDelay(100);
    * called when the Applet is stopped
    * stops the gameLoop thread
    public void stop() {
    if (gameLoop != null) {
    gameLoop.interrupt(); // stops the animation thread
    gameLoop = null;
    * called from the gameLoop
    * checks for the last key stroke input by the user
    * @return int - Input class constant representing user input
    public int checkInput() {
    int input = Input.checkUserInput();
    switch (input) // how the input is handled depends on the current game state
    case Input.GAME:
    // the user wants to play the game
    if (gameState == STOPPED) // not currently playing a game or movie
    // display the panel showing the game
    currentPanel = theGame;
    this.getContentPane().add(BorderLayout.CENTER, currentPanel);
    this.validate();
    // set up a new game
    theGame.resetGame();
    gameState = PLAY_GAME;
    showStatus("Use arrow keys to move Monster, S key to stop");
    } // otherwise ignore
    break;
    case Input.MOVIE:
    // the user wants to see the movie
    if (gameState == STOPPED) // not currently playing a game or movie
    // display the panel showing the movie
    currentPanel = theMovie;
    this.getContentPane().add(BorderLayout.CENTER, currentPanel);
    this.validate();
    gameState = SHOW_MOVIE;
    showStatus("Press S key to stop");
    } // otherwise ignore
    break;
    case Input.MOVIE2:
    // the user wants to see the second movie
    if (gameState == STOPPED) // not currently playing a game or movie
    // display the panel showing the movie
    currentPanel = theMovie2;
    this.getContentPane().add(BorderLayout.CENTER, currentPanel);
    this.validate();
    gameState = SHOW_MOVIE2;
    showStatus("Press S key to stop");
    } // otherwise ignore
    break;
    case Input.STOP:
    // the user wants to stop the movie or game being shown
    if (gameState == SHOW_MOVIE ) {
    this.getContentPane().remove(currentPanel);
    currentPanel = null;
    JOptionPane.showMessageDialog(this,
    "OK " + name + " I've stopped the movie");
    } else if (gameState == PLAY_GAME) {
    this.getContentPane().remove(currentPanel);
    currentPanel = null;
    JOptionPane.showMessageDialog(this,
    "OK " + name + " I've stopped the game");
    } else if (gameState == SHOW_MOVIE2 ) {
    this.getContentPane().remove(currentPanel);
    currentPanel = null;
    JOptionPane.showMessageDialog(this,
    "OK " + name + " I've stopped the movie"); }
    gameState = STOPPED;
    showStatus("Press 'G' to start game, 'M' to show movie");
    break;
    Input.reset(); // reset the input module
    requestFocus();
    this.repaint(); // redisplay the applet
    return input; // return for further processing (eg to control movement of Monster)
    * called from the gameLoop
    * pauses between frames
    * @param millis long - minimum frame time
    public void frameDelay(long millis) {
    long currentTime = System.currentTimeMillis(); // what time is it now?
    long elapsedTime = frameStartTime - currentTime; // how long has it been since the start of the frame?
    if (elapsedTime < millis) // is it time to showing the new frame yet?
    try {
    Thread.sleep(millis - elapsedTime); // pause for the remaining time
    } catch(Exception e) {
    Thats the whole code for the applet- preloadin the image (and also everything that doesnt relate to this problem lol). Ive asked around and the answer I was given I wasnt satisfied with- make the files smaller/delete some- the files are already at their smallest about 10kb each. And also apparently (I didnt know this...) but due to security restirictions I wouldnt be able to increase the heap size anyway (this is to run the applet on my own... and others computers).
    So Im really too sure what to do at the minute. Anymore help would be appreciated though.
    Thank you!
    Senor-Cojones

Maybe you are looking for

  • What is difference in FP1DEF.SIS and FP1.SIS theme...

    Brand new to Nokia and S60 smartphones, and I just loaded down and activated my first THEME. However, the theme has two SIS files for Feature Pack 1, F1DEF.SIS and F1.SIS. I installed both, and the only difference I can tell is some of the icons are

  • I deleted some videos from camera roll but they still appear in the videos folder

    I removed some videos from my 4s to my computer but they still appear in a file called videos on my phone.  The file Videos doesn't show up on my computer when I plug my phone in to the USB.  How can I see this file on my computer when my phone is pl

  • InDesign CS5.5 will not launch on new MacBook Pro

    I have a new MacBook Pro and a new install of CS 5.5. All apps launch and run with the exception of InDesign. Trying to open a new or existing InDesign filr results in the spinning beach ball of death that can only be exited by a force quit; InDesign

  • After JSR-168 processAction there is no re-Render?

    In the Edit/Config mode of my JSR-168 portlet I want to have a rather complex form. It's a table that the user would be able to edit, add, and remove rows from. I have a form that submits to the actionURL, and sucessfully calls the processAction meth

  • Podcast update button gone?

    Just upgraded to iTunes 7 and I don't see the update button that I used to see when I selected Library | Podcasts. How do I tell iTunes to manually update my podcasts en masse (rather than wait for the scheduled download)? Bill Pfeiffer HP Notebook N