Why make process size so huge on WindowsXP?

It seems like no matter how much memory my application uses. For example I can make a very simple app that just shows a JFrame. Runtime.getRuntime.totalMemory() claims that I am using 4MB, which seems like a lot for a simple frame window. TaskManager says that the application (JRE) is using 18MB. The JVM process size is over 4X larger. Is there anything that the developer can do to reduce the process size?
I realize that the JRE is loading classes, spawning its own threads which require heap space and stack space, but the perception that most people get when looking at TaskManager is "Wow there must be a memory leak in that application it using 80MB." I know because my manager has said some close to that with a few expletives thrown in. This makes it hard for me to convince him that Java is a great choice for developing desktop applications.
I think that instead of implementing new language features like auto-boxing and spending time developing Timbuktu language support, this needs to be addressed. Otherwise I think many desktop application developers will have the same difficulty and may forced to look at using C++ with GTK or Mono.

Remember that a computer has much more memory at it's disposal than
just RAM as modern operating system use swap memory to give greater memory. Have you tried
running with the -client command line option.hm, my machine is 512MB and since I've started running eclipse there has been a definite improvement in disk thrashing (sporadically) when switching between applications..
as a corporate user, i get to request a machine upgrade sometime next year (yay!) but someone pointed out to me that this isn't the typical scenario - but guess its just a few years away when this really doesn't matter so much
I tried the -Xmx and -mx options. The process size is not affected, only Runtime.getRuntime().getMaxMemory() is affectedah, ok - must have been confused there..
i found this bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4864304
which seems to have become an umbrella bug for various swing memory issues - it does look like that have been real improvements in 1.5
eg my own quick test - running SwingSet2 (java1.4 version) with both 1.4.2_04 and an early beta of 1.5 gives around a 10 - 15MB difference which does seem a real good result (its also faster..) but the absolute measurement is still around 60MB - i think maybe its something to do with font cacheing - not being able to rely on the underlying OS's font rendering capabilities
another relevent thing could be jvm sharing:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4416624
which i think the point about is that it mitigates the per-jvm memory costs - so you only take that hit once..

Similar Messages

  • PS CS6-Why are file sizes so huge?

    My psd's are almost double the size as compared to similar files created from CS5. There are no vector objects, no huge amount of layers as compared to my older files and not a lot of visual information. It seems that a text layer consisting of 6 letters is about 3MB. I've turned of Autosave and Background saving in preferences. It doesn't seem to matter.

    Maximize PSD and PSB Compatibility >> Never
    (from Adobe Help)
    Maximize compatibility for PSD and PSB files
    If you work with PSD and PSB files in older versions of Photoshop or applications that don’t support layers, you can add a flattened version of the image to the saved file.
    Note: If you save an image in an earlier version of Photoshop, features that version doesn’t support are discarded. 
    Choose Edit > Preferences > File Handling (Windows) or Photoshop > Preferences > File Handling (Mac OS).
    From the Maximize PSD and PSB File Compatibility menu, choose any of the following:
    Always
    Saves a composite (flattened) image along with the layers of your document.
    Ask
    Asks whether to maximize compatibility when you save.
    Never
    Saves only a layered image.

  • Process size

    Hi all,
    I ran java program on HP-UX. I set maximum heap size to 128MB.
    The point is I used top command to see process size.
    Why the process size can grow up to 700MB?
    How come? Where is the memory come from?
    Thank you

    this sounds strange, i think i've seen the java.exe process size use much more memory than the -mx limit would suggest when memory mapping files using the nio libraries - does your code use the nio libraries?
    asjf

  • When I narrate my keynote presentation, why is the file size so huge?

    When I narrate my keynote presentation, why is the file size so huge?

    Here are the steps so you can see all the files that make up your Keynote…
    Go to the Finder and find your Keynote file and make sure that it has the .key extension on it. If it doesn't, click it and command i to view info and uncheck the box that says Hide Extension.
    Delete the .key and change to .zip and then click the use .zip in the dialog box that comes up
    Double click the new .zip file and it will change it to a folder
    Open the folder there are the files
    Close the folder and add .key to the end of the name and click Add in the dialog box (this will change it back to a Keynote file)
    You might be able to do this and convert the voice narration to a smaller format.

  • How to increase JVM Process size for WebLogic running SOA Applications.

    Hi,
    I believe 32 Bit OS can address up to 4GB memory so theoretically 32 Bit JVM can use 4GB but practical convention is 2GB as other 2GB is used by OS itself and also this default JVM Process size is set somewhere and I also believe that if JVM is 32 bit on 64Bit OS even though JVM will run on 32Bit Virtual Machine so JVM does not know that it is 64Bit OS in that case again it can use max Process default size up to 2GB.
    And for 64Bit JVM, I can allocate more than 4GB depend on my available RAM size to Xmx, MaxPermSize parameters in java.exe file and after that I can set the same value in “setSOADomainEnv.cmd” or to “setDomainEnv.cmd” file.
    But I am 99% sure by just assigning more memory value to Xmx, MaxPermSize in “setSOADomainEnv.cmd” file only won’t work (not setting Xmx in java.exe), if it would have worked then in my case when I was assigning 1536 to Xmx in “setSOADomainEnv.cmd” file then why it was showing out of memory error. I think that is because it was only taking default 2GB for my 32 Bit JVM not considering 3GB or 4GB. So i think i have to change default memory size what JVM can use (<http://www.wikihow.com/Increase-Java-Memory-in-Windows-7> but i am using windows 8 so for that I don’t know the option to change this default Process Size)
    I also believe that first JVM start and before start it check how much memory it can use from it’s own –Xmx parameter in some ware configuration or java.exe file and after that it allocate that much size of JVM Process Memory in RAM then after it loads Weblogic or Java Applications in its (Heap + Non-heap + Native Area) which are parts of JVM Process memory
    I read post on :< http://stackoverflow.com/questions/3143579/how-can-jvm-use-more-than-4gb-of-memory > and < http://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control >
    All used  : 
    java -Xmx64m -classpath ".:${THE_CLASSPATH}" ${PROGRAM_NAME}
    java –Xmx6g     //command which will call java/JVM interpreter which will hold –Xmx parameter to set Heap size for JVM
                                    before JVM comes in memory (JVM process memory)
    now my question is can I manually open any configuration file or java.exe same like “setSOADomainEnv.cmd” or “setDomainEnv.cmd” (I know since java.exe is exe I can’t open simply but I want similar work around)
    so that I don’t need to type java –Xmx6g every time when I run weblogic (and then later I can change weblogic “setDomainEnv.cmd” Xmx and PermSize to more than default size 4GB to 5GB or 6GB in the case of 64Bit OS)
    Please correct me if I am wrong in my understanding.
    Thanks.

    These days the VM will detect a "server" machine and set up the memory appropriate for that.
    You can create a simple java console application and have it print the memory settings (find the appropriate java class fort that.)
    There is of course the possibility that your application is running out of memory because it is doing something wrong and not because the VM doesn't have enough memory.  You can force that in a test setup by LOWERING the maximum amount of memory and thus making it more likely that an out of memory exception will occur.

  • Ctrl+= "make font size larger" keyboard shortcut is not working, maybe related to Windows 7?

    I changed recently from Windows XP to Windows 7 64bit, and since then the keyboard shortcut Ctrl+= to make "font size larger" is not working anymore. Ctrl+- to make "font size smaller" is working like always. I tried this with LV8.5 and LV2011 and the missing functionality is on both LV-versions. So I wonder if this is related to Windows 7... Or am I missing something?
    Any ideas?
    I tried to switch keyboard input language without success. Then searched for menu shortcuts in the LV options, where Ctrl+= is not listed as it is only a keyboard shortcut and not in the menu. I wonder also why the whole font setting is so nestled in LV, why not just having a toolbar...
    Looking forward for any help.

    It works for me. I'm using Windows 7 64-bit, but I'm running LabVIEW 8.2, so I can't test this on other versions. Are you sure you don't have some extension installed that's using that keyboard shortcut?
    I tried to switch keyboard input language without success. Then searched for menu shortcuts in the LV options, where Ctrl+= is not listed as it is only a keyboard shortcut and not in the menu. I wonder also why the whole font setting is so nestled in LV, why not just having a toolbar...
    http://forums.ni.com/t5/LabVIEW-Idea-Exchange/A-text-toolbar/idi-p/953534

  • [SOLVED] sonata-svn fails during make process

    I tried to compile sonata-svn yesterday but got this message during the make process...
    mmkeys.override:6:23: error: pygobject.h: No such file or directory
    In file included from mmkeys.override:7:
    mmkeys/mmkeys.h:23:21: error: gdk/gdk.h: No such file or directory
    mmkeys/mmkeys.h:24:22: error: gdk/gdkx.h: No such file or directory
    mmkeys/mmkeys.h:26:33: error: gtk/gtktogglebutton.h: No such file or directory
    In file included from mmkeys.override:7:
    mmkeys/mmkeys.h:43: error: expected specifier-qualifier-list before 'GObject'
    mmkeys/mmkeys.h:48: error: expected specifier-qualifier-list before 'GObjectClass'
    mmkeys/mmkeys.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mmkeys_get_type'
    mmkeys.c:30: error: expected ')' before '*' token
    mmkeys.c:52: error: 'PyGObject' undeclared here (not in a function)
    mmkeys.c:75: error: expected specifier-qualifier-list before 'PyGObject'
    mmkeys.c:75: error: expected ',' or ';' before ')' token
    error: command 'gcc' failed with exit status 1
    ==> ERROR: Build Failed.
    Aborting...
    Error: Makepkg was unable to build sonata-svn package
    Can anyone help me to figure out why I'm getting this error? I have pygobject installed as well as gdk libs. Let me know if there is any other information needed to help me out here.
    Thanks
    Last edited by daedalusman (2009-09-13 19:16:44)

    isour wrote:same problem on ubuntu 9.04
    upd. ma hint was http://ubuntuforums.org/showthread.php?t=283572
    upd2. but now this problem: No lyrics plug-in enabled.
    upd3. https://bugs.launchpad.net/ubuntu/+sour … bug/208855 thx
    That didn't help me out at all, archlinux doesn't have -dev packages and I already had the corresponding arch packages installed.
    Man, this is frustrating, I would really like to get this figured out.

  • Process Size Increase

    Hi,
    While stress testing our application we found increase in the process size. When we run our application for 5 hrs+ the size increases by 1MB+. We used the pmap -x , and it shows the increase in the heap.
    We used purify and sun workshop for finding the memory leak . Both of them show no memory leak. They do show increase in the MIU/Live memory. The way we do our test is in continous cycles. We do same set of operations in every cycle. When we started the application it was 30MB and when we did first cycle it increased to 68 MB. The heap increases by 1MB every 5hrs. After 250 cycles it has increased 10MB.
    Any idea why the heap keep on increasing? Is there any way to reclaim the memory?
    Thanks,
    Meena

    Hello,
    It seems that your program has some "memory overuse" problems.
    Memory overuse occurs when the program always allocates some new memory blocks on the heap (new, malloc) but never deletes them. Most of the time, these blocks are not "memory leaks" because the pointers on these blocks still exist, so that a garbage collector does not solve the issue.
    The classical example is a linked list that always grows...
    The only way to solve this, IMHO, is to track the memory in-use before and after processing.
    Using Rational purify, you can call purify_all_inuse() to see all blocks inuse or purify_new_inuse() to see the new allocated blocks. Do this before and after processing, then check what is different.
    Then you will have to understand why these blocks have been allocated, and then correct the problem.
    Good luck,

  • Process size growing

    Hi,
    We are running our application throught weblogic 5.1. If you observe the process size through top command one of the application process size is keep on growing and after some point of time it's reaching up to the memory max limit nad we need to restart the machine.
    So what we are thinking is there is a posibility of memory leaks in our source code. Before going to that i wanted to make sure that i can do any thing with weblogic configuration ..? can anybody help me in this regard ..? Please consider this issues as very urgent.
    Regards,
    Ganesh

    Consider forcing garbage collection within weblogic. You can see if
    you turn on verbosegc in your start script in weblogic. Monitor when
    garbage collection occurs.
    hope this helps
    abdul rahman
    Ganesh <[email protected]> wrote in message news:<3ea817b8$[email protected]>...
    Hi,
    We are running our application throught weblogic 5.1. If you observe the process size through top command one of the application process size is keep on growing and after some point of time it's reaching up to the memory max limit nad we need to restart the machine.
    So what we are thinking is there is a posibility of memory leaks in our source code. Before going to that i wanted to make sure that i can do any thing with weblogic configuration ..? can anybody help me in this regard ..? Please consider this issues as very urgent.
    Regards,
    Ganesh

  • Align and "make same size" tools

    When I make a fillable forms, why do the text boxes copy themselves when I use the "align" or "make same size" tool? Adobe Acrobat 9 standard.

    Moved to Forms

  • HT4489 this is ridiculous! how do you keep the size of the picture for a contact that small? it is usually a piece of  a lager picture... any way to make the size of the pictures the 224 KB they want? I always thought the application cropped the picture t

    this is ridiculous! how do you keep the size of the picture for a contact in the address book that small? it is usually a piece of  a lager picture... any way to make the size of the pictures the 224 KB they want? I always thought the application cropped the picture to fit their requirements...
    Help
    Leo

    Gem
    Events are organised strictly on date and time, as read by iPhoto from the Exif data in the Photo. You cannot manually sort.
    Create Albums. You can do much more organising with Albums, use Photos from different events, place them as you will. Best of all, Albums use no disk space at all. They simply reference the file on the Hard Disk. So a pic can be 1, 10 or 100 Albums with no wasted disk space whatever.
    Regards
    TD

  • Is there any way to make Object size permanent in Pages?

    Hi. Does anyone know how to make the size of an object permanent? I use a lot of clip art and after resizing it, I would like it to stay that size but each time I select an object, the size selection box always appears. This is mainly a problem for Pages for the iPad.
    Appreciate any help

    Only if you have used a character style to italicise the words. If you have that you can change one of the word to a chosen colour and all words with that style will get the new colour

  • In CS6, why the file size remains same after croping? And how do I reduce the size after each cropin

    In CS6, why the file size remains same after croping? And how do I reduce the size after each croping? Thx

    Select the Crop Tool and check the box [  ] Delete Cropped Pixels and you should see a reduction in file size.  With the box unchecked, the data is still maintained in the document, you just can't see it.
    -Noel

  • WHY make a PDF portfolio?

    WHY make a PDF portfolio? There is a lot of information on how but I don't understand why. What is the point, why not make something else? Does someone have an example of a situation in which makeing a portfolio really benefitted them in ways that other solutions would not have addressed.

    Hi Leslie - Behance doesn't do PDF portfolios, but we support image, video, and audio uploads.
    As for how Behance and an online portfolio can benefit you, check out some testimonials from our community! http://www.behance.net/testimonials

  • Adobe Illustrator CS5 File sizes are huge!

    Try this:
    open a new Illustrator document
    create a simple box, black stroke, white fill
    save the file
    you're looking at something like 1 Mb for these 4 anchor points and the fill and stroke definition!
    now, back in Illustrator, downsave to Illustrator 3 format
    file size is in around 6Kb - much better!
    Okay, I know we can disable ICC profile embedding, PDF compatibility etc, but none of that even comes remotely close to the "correct" file size of < 10Kb.
    C'mon Adobe, what are you putting in that CS5 file that's so darned important? This isn't a complex illustration with gradient masks, 3D transforms and thousands of points.
    I get it, everyone has terrabyte drives and high-speed internet. Is that an excuse to make really inefficient file formats?

    hmmmm......
    As Monika pointed out... deleting the defualt library items will make files sizes drastically smaller.
    I'd guess that version 3, since it lacked the ability to work in preview mode, didn't save file previews with the file either... that could easily account for 50kb.

Maybe you are looking for