Why does Java have such a large footprint?

I've been curious about this topic for a while, but I haven't ever looked into this to any depth. I also posted this to stackoverflow but haven't gotten any solid responses so far:
http://stackoverflow.com/questions/1107991/why-does-java-have-such-a-large-footprint
Java - or at least Sun's Hotspot JVM - has long had a reputation for having a very large memory footprint. What exactly is it about the JVM that gives it this reputation? I'd be interested in a detailed breakdown: how much memory goes to the runtime? (The JIT? The GC/memory management? The classloader?) Anything related to "auxiliary" APIs like JNI/JVMTI? The standard libraries? (Which parts get how much?) Any other major components?
I realize that this may not be straightforward to answer without a concrete application plus VM configuration, so just to narrow things down at least somewhat: I'm primarily interested in default/typical VM configurations, and in a baseline console "Hello world" app as well as any real-world desktop or server app. (I'm suspecting that a substantial part of the JVM's footprint is largely independent of the app itself, and it is in this part that I'd like to zoom in, ideally.)
I have a couple of other closely related questions:
Other similar technology, such as .NET/mono, don't exhibit nearly the same footprint. Why is this the case?
I've read somewhere on the intarwebs that a large portion of the footprint is due simply to the size of the standard libraries. If this is the case, then why is so much of the standard libraries being loaded up front?
Are there any efforts (JSRs, whatever) to tame the memory footprint? The closest thing I've come across is a project to reduce the on-disk footprint of the JVM [1] and to modularize the standard library [2].
I'm sure that the footprint has varied over the past decade or so with every new version of Java. Are there any specific numbers/charts chronicling precisely how the JVM's footprint has changed?
[1] http://blogs.sun.com/jtc/entry/reduced_footprint_java_se_bringing
[2] http://blogs.sun.com/theplanetarium/entry/project_jigsaw_modularizing_jdk_7

yangzhang wrote:
I've been curious about this topic for a while, but I haven't ever looked into this to any depth. I also posted this to stackoverflow but haven't gotten any solid responses so far:
http://stackoverflow.com/questions/1107991/why-does-java-have-such-a-large-footprint
Java - or at least Sun's Hotspot JVM - has long had a reputation for having a very large memory footprint. What exactly is it about the JVM that gives it this reputation? I'd be interested in a detailed breakdown: how much memory goes to the runtime? (The JIT? The GC/memory management? The classloader?) Anything related to "auxiliary" APIs like JNI/JVMTI? The standard libraries? (Which parts get how much?) Any other major components?
Presumably versus some other VM. I would suppose the fact that much of the VM is written in java has something to do with it.
I realize that this may not be straightforward to answer without a concrete application plus VM configuration, so just to narrow things down at least somewhat: I'm primarily interested in default/typical VM configurations, and in a baseline console "Hello world" app as well as any real-world desktop or server app. (I'm suspecting that a substantial part of the JVM's footprint is largely independent of the app itself, and it is in this part that I'd like to zoom in, ideally.)
I have a couple of other closely related questions:
Other similar technology, such as .NET/mono, don't exhibit nearly the same footprint. Why is this the case?
Not sure I agree with that. What size do you see with a .Net app that uses 3.0/3.5?
I've read somewhere on the intarwebs that a large portion of the footprint is due simply to the size of the standard libraries. If this is the case, then why is so much of the standard libraries being loaded up front?
Good question. There is a feature that allows multiple VMs to use the same memory footprint version of the loaded libraries. That is a new feature and it isn't clear to me if it covers the entire API. I do not know if that is dynamically built.

Similar Messages

  • What is ANT HAL Service and why does it have such insanely many permissions?

    What the subject says. What does it do? Why is it there?

    Had this happen myself.
    It does have something to do with Spotlight/searching. Should go away after a while, or so I have heard from other users, 'cause it hasn't stopped driving me and my fan mad yet.
    Am going to have my MacBook index and follow-up on indexing and whatever else it feels is necessary to finally allow me to search in peace over the weekend while locking it away where I can't hear it.
    Hopefully that does the trick.
    If it wasn't for things working better/faster and most things looking better I might actually consider taking Leopard off again ...

  • Why does Java have so much trouble with deleting files

    So, I've been doing alot more code on the file-level and have been noticing that Java is really terrible at deleting files. This should be rather straightforward, but the delete method can fail in so many ways, it's unbelievable. Even with taking special care to close all streams, it will sometimes just not do it, or even return a "Yes I've deleted it" result and the file is still there! (deleteOnExit() suffers the same affliction)
    This problem is even scuttling the otherwise trusty Ant, which is really annoying. Ever seen this? "BUILD FAILED: Could not delete 'myproject.jar'" So any Ant-driven automated build-and-test process can fail because of this super-avoidable error. (We have to code a pre-build-jar-deletion shell script, which is annoying when jars are added/deleted/renamed for whatever reason.)
    Does anyone know the reason for this? I'm really curious.
    Maybe, in 1.5, they will come out with "File.crushAndDestroyWithMercilessPrejudice()". I'd use it all of the time! :)

    I had the same problem when I was working with JAI. I had about a half million images that I made a viewer for, which would allow our users to do away with microfiche. Project worked great, but the files wouldn't delete off the user box (Win2K). I checked everything and they just would not delete--windows would not acknowlege the resources had been released by Java.
    I finally took a lesson from MS developers and said: "It's not a bug, it's a feature!" I wrote it into the manual that it was a cache feature and would speed-up access to the images, yet delete the old ones (which it did, any images that were not accessed during the session would delete just fine, while any that were accessed would still be there next time for local access rather than hitting the network for them. The cache turned out to be one of the great features of the application.
    On the other hand, I've not had any problems deleting files from Linux.

  • Why do I have such a hard time when I connect to facebook games it doesn't want to start the game it sending me a message about apps...what does that mean?

    why do I have such a hard time when I connect to facebook games... firefox doesn't want to open the game the message is sending that their something with the apps..what does that mean?....what is plugin...what do I do for that?

    The usual explanation is that it is a licensing issue. It's not Apple refusing to support an MS product (they support loads of others, like QuickLook for Office docs). MS won't let Apple have it. (The Linux-based solutions are third-party reverse engineered.)
    That having been said, I've never had a problem plugging an NTFS drive and reading files from it. Why does it take you an hour?
    I've never had a problem with a Mac-formatted USB thumb drive not writing either. It's possible that the hardware/software that Apple uses is more sensitive to cheaper thumb drives, but I'm guessing here.

  • Why does AVCHD have to be converted to AIC 1st?

    Couple of questions...
    Why does AVCHD have to be converted to AIC 1st? Is it because the hardware isn't up to AVCHD or something? I only have a Core 2 Duo 2GHz 4Gb RAM so is this enough?
    Won't converting from AVCHD to AIC and then to an output format (which would be best for quality once editing is complete?) decrease overall quality?
    On a side note, currently my Panasonic TZ7 does AVCHD lite 720P. I'm thinking of upgrading to a Panasonic TZ20 with AVCHD full HD 1080i. However I've heard that although 1080i is full HD its not as good as 1080p progressive. Now I'm wondering if I should buy the Sony Hx9v which has 1080p or wait till next year for a newer TZ camera which has 1080p. Is there a massive difference between 1080i and 1080p, and for that matter over my current 720p?
    Reason I'm thinking of upgrading is I'm off to Disney Florida this year for 1st time and want best I can, so was wondering if my current TZ7 would be enough or to upgrade to a TZ20 for the video
    Cheers 

    Why does AVCHD have to be converted to AIC 1st?
    Basically AVCHD doesn't record all the frames of a video as full frames (i-frames), it records a full frame every so often and the frames in between are made of information about the areas of the frame that have changed and a calculation so that a full frame can be recreated by comparing it with the previous frame (p-frames), this gets a little more complicated as they can also be compared with next frame too (b-frames).
    Since the in between frames aren't full frames they can't be edited, which is where AIC comes in. When the file is converted to AIC all the frames are recreated (as full frames) from the various types of frames in the AVCHD file, they can then be edited.
    Won't converting from AVCHD to AIC and then to an output format (which would be best for quality once editing is complete?) decrease overall quality?
    Yes and no, think of the conversion more of an expansion whereby all of the quality of the original file is maintained, hence no loss of quality. This isn't entirely true since AIC does contain compression, but the files are already large enough as AIC files to expand them to an uncompressed format would be rather ridiculous for amateur video, and the loss of quality is probably immeasurable in most cases.
    Is there a massive difference between 1080i and 1080p, and for that matter over my current 720p?
    That very much depends on what you are going to do with it, the difference between these resolutions can be noticeable if the videos are encoded at appropriate data rates, but if you are going to use a similar data rate to compress a 1080p file that you use for a 720p file then you won't achieve any additional quality, indeed you may actually lose some.

  • HT1911 Why does Itunes have me logging in multiple times to buy a song? Somehow, my account got disabled now. It also shows that I am logged in....?

    Why does itunes have me logging in multiple times to buy a song? I can access everything else fine, but now my account is disabled for some reason although my password was entered correctly... help

    I've seen a couple of other threads over the last 10 minutes posting similar problems, so it appears to have affected other people as well - the poster on the first thread has now posted again saying that it's now working for him, so you could give it another try.
    Edit : your reply appeared as I was attempting to post this

  • I have an iphone 4s why does it have a black screen instead of my background picture when I get a text message?

    I have an iphone 4S why does it have a black screen instead of my background picture when I get a text message?

    When you see the old number come up in the suggested choices look for a blue arrow to the right of the Contact. Tap the blue arrow and then tap Remove from Recents.

  • Why does Firefox have to make it so difficult to get answers--I am not going to be able to check the website to see what anyone might reply to my question on crashing?

    I have no way of checking to see if anyone answers this. Why does Firefox have to make it so difficult?
    What does this means: DLL C:\Program Files\Mozilla Firefox\MOZCRT19.dll is not a valid Windows image. Please check this against your installation diskette.
    Suddenly all my tabs closed. Then Windows told me I had a gazillion infections. Then a tiny strip appeared saying it was Firefox and these little blocks started to fill up the little strip as if it were downloading something--there was no way to cancel this so I cut the power. Now when I try to use the Firefox icon, I get the message above.
    Am I supposed to remove the old Firefox stuff and start from scratch? I am stuck using Internet Explorer.
    I went to the Firefox website and tried to download it again, but McAffee jumped in and said there is something wrong with Firefox and I should register with them that I am downloading Firefox (I do not have McAffee). Then I got a security warning saying Firefox is not safe.
    I am completely at a loss as to what to do next, since I don't understand any of this mumbojumbo.

    Here's the story on one of your infections, namely JS:Redirector-EH[Trj]: http://www.microsoft.com/security/portal/Threat/Encyclopedia/Entry.aspx?Name=Trojan%3aJS%2fRedirector.H
    The main problem with malware is that it uses the installation to proliferate by contacting hostile servers to download more of the same rogue code.
    Firefox doesn't have the option to "Run" a file. You can only "Save File" or "Cancel". If you downloaded it with IE8, then yes, you can run it, but that's not what I wanted you to do.
    What you should do now is to disable System Restore. You can open System Properties by hitting the Windows logo key and Pause/Break key together. Then click the "System Restore" tab. Then checkmark the box which says "''Turn off System Restore on all drives''". Reboot to clear its contents. System Restore unfortunately makes a backup of all executables which includes viruses so that when you reboot without deleting them first, System Restore reinstates them again.
    After you complete that step, run Avast and Malwarebytes again to make sure the system is clean.
    Then go to the Windows Update site (link on your start menu) and install the missing patches which enabled your machine to become infected in the first place.
    Once the system is clean, repeat step one to download Firefox again, but please do not run the file. If you don't see the option to "Save File", cancel the download, but it should be there. You can use this direct download link to download FF4.0.1 [http://www.mozilla.com/products/download.html?product=firefox-4.0.1&os=win&lang=en-US Download Firefox 4.0.1]
    Run the file after you download it to the desktop.

  • Why does Java Application not working with Macromedia Flash 5 or MX?

    Why does Java Application not working with Macromedia Flash 5 or MX?

    Who says they don't?
    Although I don't know much about those I'd think they should be able to talk to Java Aps using Sockets or request Servlets ...
    Spieler

  • Why can't I download the Mac OS I just purchased?  Why does it have to be shipped to me?

    I just purchased Lion OS.  Why can't I download it from the website?  Why does it have to be shipped to me?

    Are you doing a Software Update or downloading directly from Apple?
    If Software Update, instead download the combo 10.6.8 update from here. Use Disk Utility (on your hard drive in application/utilities)  to repair permissions, then apply the combo update, and when done, repair permissions again. You'll be at 10.6.8 at that point.

  • Why does it have to be tethered???

    Hi, So I'm just about ready to buy the ipad. But I am having a big problem understanding WHY this thing cannot be used in my household, because my 2 apples run Tiger. If its a matter of an occasional update, I could take it to work to do that. I phoned the apple store, the rep said It can't work or sync without Leopard within my home wireless network. I also have within my wireless network 2.5 terabit of hard-drive and the rep was unsure if the ipad could see that either...
    Both of my computers are pre Intel processor, so I read that leopard & snow leopard are out of the question on my computers.
    If this is suppose the be the next big thing, Why does it have to be tethered to ANY computer. This IS sold as a wireless device, NOT an extension to another computer. Am I getting bad info or what.
    Please advise.

    Hi,
    All is not lost, I think. It's true that you'll need either Leopard or a Windows machine with the latest iTunes in order to get the iPad going. But you're right, you can just do that at work. The iPad will work perfectly after that without ever synching it again. You can do everything from the iTunes store from the iPad itself.
    However, if you want to synch your music not bought at iTunes, as well as iPhone apps and contacts then you're going to have to find a compatible computer to do it on. It needs the latest iTunes which doesn't run on Tiger. But once you've synched you don't really need to do it again unless you want to add a lot of music from another source than iTunes. Of course, synching also backs up the iPad, don't forget.
    As far as the gigundo drive, if the iPad doesn't recognize it, all you have to do is copy what you want synched to a smaller drive (or even a DVD) and use that instead.
    Hope that helps. The iPad is most definitely an independent device but it does need a compatible computer if you want to synch stuff to it from elsewhere.
    SP

  • When I use the trial version of adobe elements why does it have adobe trial across my work?

    When I use the trial version of adobe elements why does it have adobe trial across my work?

    That is because you are using a trial... buy the program and you do not have a "watermark" on your output
    http://forums.adobe.com/thread/433730

  • What can I do in Adobe that I can't in FCPX? + Why does FCPX have a bad reputation

    Somewhere else, I was told that disgruntled Apple users where going to Adobe and leaving FCPX
    Why is this?
    What can be done in the Adobe suite of programs that isn't handled well in FCPX?
    Is FCPX an all in one solution?
    Does it allow me to do everything that can be done in After Effects for example? (I ask without actually knowing what After Effects is for - I've just heard it mentioned looadds)
    Why does FCPX have a bad reputation?
    I've read that it's not backwards compatible with previous version
    That *****! But... doesn't effect me as I'm coming in as a new user
    Thanks
    Omar

    omar.m wrote:
    Somewhere else, I was told that disgruntled Apple users where going to Adobe and leaving FCPX
    Why is this?
    What can be done in the Adobe suite of programs that isn't handled well in FCPX?
    Different editors have different needs, and while FCP X offers some really innovative features it lacks other things that some editors need in order to be competitive/get work in their environment. It is not just what you can actually edit (read: tell a story) with a piece of software but also about format support, workflows, collaboration to name just a few.
    FCP X is an editor with a few effects built in, in addition to which you can get Compressor for output and Motion for VFX. Adobe actually offers a whole suite of products that range from editing to VFX, from color grading to Blu-Ray authoring.
    omar.m wrote:
    Is FCPX an all in one solution?
    Does it allow me to do everything that can be done in After Effects for example? (I ask without actually knowing what After Effects is for - I've just heard it mentioned looadds)
    FCP X is not an all-in-one solution. As I said above it is an editor with a few built-in effects and titles.
    After Effects is for visual effects, green screen .... stuff like that. It is quite powerful but does not actually have anything to do with editing itself (that is Premiere)
    omar.m wrote:
    Why does FCPX have a bad reputation?
    I've read that it's not backwards compatible with previous version
    That *****! But... doesn't effect me as I'm coming in as a new user
    Because when it was released many features that editors were relying on/accustomed to were missing (XML support to name only one at random) which caused many to switch to Adobe or Avid. That fact that some of these features were added back in subsequent updates didn't really seem to repair the damage.
    Since you are a new user get the trial version and give it a go. You will need a fast machine with lots of RAM and fast external storage.

  • Why does mac have to download adobe flash player to view videos

    why does mac have to download adobe flash player to view video clips?

    If you have a new-ish Mac or one you just upgraded to Mac OS X Lion, Adobe Flash Player is not installed by default. Since some web content is created specifically to be seen only with Adobe Flash Player, if you want to see that content, you need to install it.
    It's trivial to do so. Start here:
    http://get.adobe.com/flashplayer/

  • My sister has an iPad with iOS 6.1.3 and I have an iPod with iOS 6.1.3 why does she have Siri and I don't?

    My sister has an iPad with iOS 6.1.3 and I have an iPod with iOS 6.1.3 also why does she have Siri and I don't?

    Siri requires a 5th generation iPod Touch. Yours appears to be a 4th generation.

Maybe you are looking for

  • Report to find out SC awaiting Approver

    Hi, We have a requirement from our users to have a BI report to find the Approver for who Shopping carts are waiting. Is there any standard reports in SRM to get the Awaiitng Approver of the SC's. I appreciate any solution or any kind of ideas . Than

  • Error occured in number assignment for object RESB

    Hello all, While creating the production order, I am getting error as "Error occured in number assignment for object RESB" , How to solve this error? Regards, Sagar

  • Performance of state machine with enum vs string?

    I am laying out the groundwork for a very large state machine. It will have about 60 to 100 states. I kind of want to use an enum for selecting the states for convenience. But then if I use a string I can use Jim Carmody's case select tool so that wi

  • Error When Running Maintenance Script

    When I try to execute the Maintenance Task script that was generated by AWM, I get the following error: Successoracle.AWXML.AWException: Action BUILDDATABASE failed on object SCHEMA.AW_NAMEThe weird thing here is that there is no actual ORA error, an

  • Transfering Iphone photos to computer from Adobe Photoshop app

    I cannot get the Adobe Photoshop app to show up in the apps I can transfer files from to my computer