Thread View: news.software.nntp
1 messages
1 total messages
Started by Capt. Jim Van der Meet
Wed, 07 Mar 2007 04:03
Re: JVM/Java memory footprint
Author: Capt. Jim Van der Meet
Date: Wed, 07 Mar 2007 04:03
Date: Wed, 07 Mar 2007 04:03
1100 lines
45231 bytes
45231 bytes
In article <1170107776.767644.56740@s48g2000cws.googlegroups.com>, "Daniel Pitts" <googlegroupie@coloraura.com> wrote: > > >On Jan 29, 6:42 am, alex...@gmail.com wrote: >> Hi, >> Though I have some three four years experience in C++ ,I did not have >> that much oppurtunity to work in Java. Currenly I was doing some >> analysis for a very simple CLI and was surprised to come with a memory >> restriction. I found that if I use Java for developing the CLI >> application I will be exhausting the memory of our Application Server >> (AS). Just to mention the architecture ,users (telecom operators) use >> a metaframe server client ( =something like remote desktop) to login >> to the AS and then open a GUI to work on it. With Java I can service >> only about 15 clients with the available memory . I just checked the >> reason for this resource crunch and found that already many Java based >> GUI's are served by the AS and each is taking some 25 MB or more. I looked into this footprint issue as in my case, the amount of heap required could be very large and that is for each thread running under the same instance of an app. Just to run the simpliest application, JVM swallows tens of megabytes. And when you run the application that could be in a way similar to your situation, literally hundreds of megabytes are simply eaten up. I ended up inserting code to free up all the huge lists and buffers that are generated on the fly and not to preload large buffers with the data, say news article bodies, and postpone it to the very last moment, when this data is needed. Then, once it is used, I explicitly empty the buffers by removing the vector contents or equivalent thereof. Just to process a 25000 article archive, you could be loosing terabytes, and not even clear where, cause your entire archive is less than 50 megs. Where did all those terabytes go? I am still trying to figure it out. Seemed to help in that i see that the garbage collector is cleaning all this stuff and heap grows as lil as possible. But it places about major restriction on your code as you have to juggle things like a clown in circus, and have to let go of things that were already referenced and loaded, as you might want to do for some feature operations. I do not recall having ANY of these problems with all my C++ experience, and here, you have to be aware to the point that you have to make sure you declare your local variables in a very specific scope. Otherwise, you might be loosing huge amounts of memory if your main processing loop is not exited, and it might have to run till completion of some major operation that could be taking minutes if not hours to complete. I, personally, think that the footprint issue is one of MAJOR problems with Java's architecture and approach and have reasons to believe that it'll never be resolved, in principle. The whole idea of JVM is nothing different than the Pascal's P machine idea. People wanted to invest millions into the hardware chips that run the P machine code directly, and what happened at the end? Anybody heard of Pascal? Well, dead as it gets. And what is such a compelling need for the virtual machine? To make it MORE portable? But where did all this "portability" go, when you can't even build an app, working on the same platform and be assured that unless other co-developers, clients or customers, using your code, use the same exact compiler as you do, they won't be able to even reproduce your results unless they switch their entire development environment to that which YOU use. What kind of joke is this? WHO in his clear mind would even bother? Which customer, after double clicking on your executable and seeing the error message as to JVM, is even going to bother reading that error message? Who is going to go hunting for the JVM, being subject of megabux lawsuits? And Sun, Microsoft, Borland, and that is about 99 percent of the market share, do just about ANYTING and EVERYTHING imaginable on making Java as much incompatible as they can manage, and entrap you into their proprietary architectures to the point of unbelievable. And they hope to achieve what at the end? Java becoming more portable and more acceptable? How? Just look at the very development environment. Borland, for example, eats up over 400 megs, and you never know what is going to happen when you simply use your scroll bar ot look at one of the menus, without even ACTIVATING it. What I am seeing is they eat up gigabytes just when you select a different source file. So, you'd better have a few spair terabytes of RAM on your box. Otherwise, you'll be waiting for hours with all the swapping going on. And this is Borland, and not some shareware. Windows XP goes as far, as to require nothing less than XP SP2 to even INSTALL thei compiler and development environment. WHY? What for? Is it some kernel mode drivers that you need to run a compiler and editor? Why do you have to reboot the box after installing a compiled and development environment? Can you imagine what it means for some major operations? At least Borland installs. Thanks for that much. Then, on the top of it, once you upgrade to a new version, all of a sudden, your perfectly good code does not even compile. The same exact code that worked perfectly on their own previous version and that compiles on other compilers. Where is all that portabilty thing they are talking about? Not only that, but it is LITERALLY impossible to figure out why. Because you get an error message that says essentially: Error 2 + 2 is not equal to four. WHAT? And they give you an error, indicating that the package, declared in one of sorce file does not correspond to exactly the same source file in their own error message. Not only that, but even if it compiles after you remove some perfectly valid declarations, and try to run your app, it claims it can not find you MAIN class!!! What? But HOW did you compile it on the first place? WHERE do I find the thing I can change to make sure your own compiler and run time environment reconcile? Try to push the HELP button? Well, what I found out, that just about the LAST thing you'd want to do, is to push the help button, as, first of all, it'll eat about half of a terabyte of memory, and, after waiting for minutes, LITERALLY, you'll see the help screen, your eye brows may get covered with the snow, as you'd have to read about 50 pages of UTTERLY incomprehensible stuff, that has NOTHING to do with your situation, and even if you do so, you are not likely to get ANY answers at the end. Only more questions and more headache. Thanks to this group, at least in SOME cases, you can ask mere mortals if they know the answer to your simpliest problme of all, and, if you are lucky enough, and they are in the mood of doing so, they'll give you some scetchy answer, that is nothing more than a hint, and you'd have to go back to your puter and sweat it out to full extent. Kinda sadomasochistict trip. And what CAN you expect from those people? Not only that, but you will be insulted and rediculed, told that in Java, the names of routines MUST be in lower case, even though Sun itself has some things that start in upper case and some don't. Now, what WHAT specific REASON do you have to make all the method names in lower case? Does it make your code MORE readable? - Nope, just the other way around. Does it prevent your compiler to compile this thing? - Not even in the picture. Does it make MORE clear what are you trying to do? - Are you kidding? So... What IS that dictate good for? Just read this very group. You'd be amazed if you are new to java. Those poor "clueless", when they are in just about the biggest problem they can imagine at the moment, instead of getting assistance, get a brainwashing dictates on what you MUST do! You see? MUST! And unless you do so, you are considered of an "inferior race"! Nothing more. Nothing less... And they'll be laughing at you like you are some kind of idiot. And why? Can ANY of those "experts" explain WHY is it that you MUST use lower case letters in just about ANY situation imaginable? I, personally prefer to capitalize each part of a name and use long names that are self descriptive by simply looking at them. Because when you work on things and have to juggle about 10 screens if you are lucky, you have a breakpoint hit, and need some information from the help subusystem to see what and why, you have VERY little chance to follow some dictates on how YOU name things. You need to be able to VERY quickly go through very large amounts of source code and by just glancing at ANY name for few millisconds, you should be able to understand that is that thing, what it does and why is it there on the first place. By REQUIRING to use lower case letters in the INITIAL section of the name, you simply make them schitsophrenic, as the mind have to constantly switch form one thought template to another, in millisecond time frames! It has to be able to distinguish the first part of the word and use a different template to recognize it, from the REST of your name, which MUST be capitalized. What is this? A mad house? Are you, people, serious? What IS the REASON behind all this insanity? Well, somebody in the stone ages, at the very beginning of java trip, decided that this is the way to go. There was EXACTLY the same trip with Microsoft, when they invented a system of naming things, a system that allows you from the very name to see what kind of object or variable you are using, down to the variable type! Well, at least THAT made some sense, even though I am not sure what is the CURRENT hype on the most innoncent thing in the world imaginable. And here, you may not even get a reply on your question, just because you show these people some piece of code that does not fit THEY view on Universe and a life force as such. Wake up, people. WHAT are you doing here on the first place? Why do you even bother to answer questions? You see, if I am an expert, built according to YOUR templates, I don't need your help. I can teach YOU, and teach you using REASON, and not some dictates as to how the planet Earth is to turn and where is the Sun to rise in the morning. Is it clear enough? I spent DAYS and still can not figure out what is the problem on the first place. Just try to push the help button. First of all, it'll eat up a terabyte of memory and you'd be sitting there mezmerized, waithing for it to stop swapping like mad and load all the stuff, that is the simpliest thing in the world, just to display a single help screen, which shouldn't take more than a few milliseconds nowadays. I am sitting here with a perfectly good computer with the amount of memory enough to load the Universe, at least from the virtual memory standpoint, and about 90 percent of my time is spend on waiting for a stupid help screen to load or by merely switching some tab on development user interface, before I even DO some action! Just to switch to another source file, you need to swap the Universe? I wonder how many terabytes will it take just to start up the next version of their development environment. Not only that, but when you upgrade to a new version and start it up, you are like in a zombie land. There is just nothing left of what you know and what worked perfectly well in the last version of their own product. Now, just to create a hello project, displaying a blank screen, you'd have to get a PHD at nothing less than MIT or major universities of that grade. You'll have to spend a couple of years fully adjusting to their news version of the Universe, where they added another 5 levels of indirection and abstraction just to make it more "universal" and more "powerful". How many times do you have to reinvent the wheel before you realize that you are nothing more than a fool? Now, just as you eventually get used to their new environment, surely enough, it is outdated and you'd have to shelve out kilobux to upgdate to, and the whole story of the wheel of Karma as told by the Idiot, is to make its next turn. Do you, people, have time for all these "improvements"? Why is it that it considered nearly illegal, to use the AWT package, if you don't even want to have anything fancier than that? What I have done with AWT, is something I am not sure they can do with all their latest and gratest version of a super-sex machine. My user interface is designed in such a way, that the user does not even realize he is using it. It is so natural and so intuitive, that you must be UTTERLY clueless to get lost in the mazes of parameters giving you so much power that it'll take generations to fully appreciate it. You can have fields of 3 miles long if you want to, which is exactly the case with usenet articls and various headers. You can edit them, maximize or shrink the dialogs, resize just about anything you can imagine, and have just about ALL your diagogs and windows available SIMULTANEOUSLY. You want it? You use it. You don't want it, no problem, the dafaults make it perfectly comfortable. At ANY given junction, just hit F1 key, and you'll get the EXACT and detailed TO THE POINT help on just about ANYTHING under the Sun, and it does not have to swap a few terabytes to do so, and you don't have to wait for half an hour just because you pushed the "wrong" button. Why do I need all this super-sex? My code should compile on ANY half decent java system on ANY platform, going back to the beginning of Java time. Even after a generation, it will run like a champ, unless those software "kings" totally negate their own version of the Universe. Why do you think Bill Gates has become what he is? Well, because of that lil stupid bios thing that sits in your box, and the principles of backward compatibility. Anyone here ever heard of Zilog, which is one of the oldest CPU manufacturers, whose CPU was compatible with intel, and only was more powerful. What happened to them? Well, not even sure there is a trace of them left. Why? Because with every new version of their CPU, they would completely change the instruction set, which means that you'd have to throw away all your perfectly working copies if you want to get a marginal improvement on your performance. What happened to Motorola, another major major CPU manufacturer? The same thing. New version = new instruction set. Throw away all you have and shell out a few kilobux if you want a 10 percent improvement. I am simply amazed Mac is still in business. With every new version of a Motorola CPU, they'd have to fire all their programmers and hire the new ones, cause that version was utterly incompatible with a new one. You'd have to rewrite the KERNEL itself. Nothing less, nothing more. Oh, sure, some claim that it is only the compiler back and that has to be scrapped. But how many gazillions upon gazillons of resourses does it waste? It is like trying to run, and, at the same time, tying yourself with a rope to the wall. What kinda "progress" are you going to make, if you have to return to the exact same place in that Wheel Of Karma, just another resolution? Do you think you all have time for that? Sorry to tell you, but your rears is on fire. Haven't you noticed? WHY do I have to scrap the AWT, which is what Java was to a large extent on the first place? Why do they refuse to recognized their own old code, that is at the very core of their entire product line? See? Bill gates can run some programs that are sitting in my archive boxes that ran on 8088 CPU, more than a generation ago, and some of those programs, and even the news reader i am using thise very moment, are written so long ago, that Sun and all those pure blooded "experts", would consider the stone age technology. Well... May be. But you know what? THEY RUN. And I have seen just about ALL your fanciest gadgets, and just about ALL their versions, and STILL I am using this newsreader, and, after trying just about anything imaginable, still find it about the most comfortable thing to work with, even if it crashes on me once in a while, even after i have to resize some windows after bringing the program up because, for some strange reason, it forgets the last session settings in some instances. Because it is like a glove in my hand. About the easiest, the most unobtrusive, the most functional, the most intutivive, the most flexible gadget I've ever heard of in terms of newsreaders. And it will run for generations to come. THAT is real progress. THAT is technology that is even worth mentioning. THAT is the way to go. Now... I am being laughed at by all these "experts" around here because I told them: No javax stuff. AWT is fine for what I am doing. Not even interested. Because if you use Borland development environment, you have support of some things, but when you use the same perfectly working code, say for example with the biggest and baddest of them all, they do not even recognized ANYTHING beyond AWT, and that is not some old and outdated version. See? Now, my code compiles on just about the oldest bullock card and functionality and gui look probably more flexible and more powerful than all you fancy gadgets and supersex. THAT is what makes a difference between the master and a bio-robot, brainwashed to literal oblivion, and accepthing just about ANY template they are programmed with as the ultimate reality, of which they haven't a SLIGHTLEST clue. Good enough? Now... Back to original subject, and don't you please try to be "holier" than me, blaming me for all the fattest posts you can imagine. Because I am not writing for you alone, regadless of what kinda "big fish" you think you are. Seen fishes of ALL sizes. I am writing this for generations to come and they'll be able to find this information with a single mouse click, and it may save them years if not generations as they do not have to make the same mistakes again, as they will have even less time that you all have. They'll have nanoseconds to make major decistions affecting the life force as such, and the last thing they have time for is the lectures and dictates about name capitalization principles, senile aregument as it gets. Uttery rigid and inflexible. Utterly dictatorial, and a byproduct of constant and unending brainwashing to accept the LOWEST common denominator as a word of God. Nothing less. Nothing more... Enjoy. Now... And once you get to that help screen, your ear drums will be slightly popping as you'll be given 50 pages of UTTERLY incomprehensible material and explanations about those transcontinental, fully distributed, database supported, utterly abstract and super prototyped, globally distributed and 55 layers deep structures, architectures and designs, would be referring to yet anothor thing of the same maginitude. But, to get an answer on the simpliest things in the world, such as how do i get the keyboard events, you'd have to graduate from Java Academy and get youself a phd, wasting years of your life, trying to comprehend just about the simplies things imaginable. Just about the ONLY thing I have seen so far with java, is that unless you use a 100 percend C code syntax, you are in trouble and in a major way. And that goes to just about every single architectural element in Java. Just try to use ascync sockets in a dedicated socket thread. Maaaan, you'd be having a headache for monts, trying to figure out the simpliest things possible. Never even HEARD of such problems. If you push help button, they'll be telling you about abstract virtual, supercontinental, globally distributed, super prototyped things that you can't even comprehend as they seem to have NOTHING to do with what you are trying to do on the first place? Have you seen their latest super-sophisticate version of Sockets, that exist since the time of Unix? Well, just don't push that help button, as your hair may raise seeing all these "superstructures", containg about 5 levels deep of other superstructures, just to do abut the simpliest thing imaginable. But yes, they are fully and globally distributed and you could asses some file, that is sitting on your book shelf on the first place, from as far, as a planet Mars? And for what? What if i could care less about those globally distributed databases on the first place? Could I simply create a socket object in a single line of code and not worry about syper-transcontinental giga-sucking pipe to the Internet? Why do I have to use Boing 747 to go to the store and get myself some food? You, so called software architects, that I wouldn't even let CLOSE to, cause it is nothing more and nothing less than a PURE grade headeache at the end, and it would take you generations on how to explain to me how to push a tab on your super-sophisticated GUI, that, I, of an "inferior" race, kind and creed, can not simply even BEGIN to comprehend the power of. But you know what? My stuff is gonna work after you are long gone, unless Sun, Microsoft, Boralnd and other manufacturers SPECIFICALLY and EXPLICITLY sabotage things and force you to forever shell out kilobux just to get that marginal 10 percent improvement, and if you are lucky. Because their bloatware will crash your puter when you try to start a simple editor, just to find a few words and replace them with othe words. And bloatware is a compliment, as it is nothing less and nothing more than a monsterware, where these sadists torture you once you start their program. Has ANYBODY tried to install windows? Have you noticed what is going on? Well, from the time you push that setup button, your computer, that you paid the money for, is not yours any more. You won't be able to cancel anything if you see something funky going on. You won't be able to suspend the operation and let you have a chance to look at your file system. You won't be able to even get help or information, as your full screen is taken by their setup program. You can't even REBOOT, unless you hit the power off key, and if you do that, you may loose half of your disk and totally devastate your system. Just because you pushed the "wrong" button. Willy will be switching your screen on and off, rebooting the system several times, asking you the questions you might not even heard of, and forcing you to do things that do not have to be done in the middle of setup, when you ALRREADY lost your operating system and your file system is nothing more than a mess of various state snapshots. ANd there is NOTING you can do about it. What do you call this "advanced" software? I call it sadistm. LITERALLY. You have no power of your own computer, and for HOURS, and pray the lord that setup completes, as, if by ANY chance, there is the most minite and most insignificant and inappropriate error somewhere, he'll simply freeze your screen, and FORCE you to reboot. He won't even give you a chance too look at your own file system and, quite possibly, get some stupid and utterly insignificant driver from your old version, that hasn't been updated for about a generation on the first place. Nope. You can't do that. Why? Because microsucks considers it "wrong". Have any of you tried to recover from the situation of this kind? Maaan. just about the BEST approach, by FAR, is to completely forget about trying to recover. The best way is to simply try to boot from another copy of operating system, or even go as far, as to use the boot floppies. Then copy all the files of any significance to a fifferent partition, if you didn't make a backup on the first place, which is a MUST if you are dealing with microsux. Not even that, but I made a backup of the entire partition, and when things went utterly berserk, i tried to restore the previous version of the operationg system, just to realize that some key files and drivers were, for some magic reason, abscent in the backup, and that is TOTAL devastation. You'll have to spend days if not weeks just to recover your whole world. Is THIS the way to design and architect software and any ware imaginable? Why is it taking 10 times less and 100 times simplier on that completely free Linux, that is considered to be an "old technology". They don't even use C++ in most of their packages last time i looked at some. And the systems is 10 times more reliable, faster leaner and smaller. With all those terabux and tens of thousands of programmers, you couln't create anything better? Just wait till you get the new version of Windows. You'd better sell your house to purchase yourself a 4 terabyte memory, even if you use a 1k program. What I heard about it, is nothing less than virtual madness. Not sure if you can run that thing with the biggest and baddest of them all, mainframes, with a super cooled CPU and a special service room just to keep all that cooling equipment in. Is THAT the "progress" we are talking about here? Progress of WHAT? About the fastest one way road to hell? Is there ANY operation in Java, beyond declaration of the simpliest data types there are, that does not use at least 5 layers of abstraction? What IS it? Not only that, but you can not even rely on the standardest and oldest concepts such as arrays and vectors and be assured that you have a random access to the elements, as that is all "implementation dependent", which means that vector you think is nothing more than a simple array of objects, may be implemented as a linked list, and there is no guarrantee whatsoever on what implementation is going to implement it in the way it OUGHT to be implemented? I had to rewrite MAJOR sections of code because of this single thing and, doing it in the development environment, is nothing less than an equivalent of disaster, as you may indadvertently introduce bugs, you could have never imagined possible, even in principles. So... If you are working on complex enough application, you'd have to retest thousands if not tens of thousands of various cases, and some of that stuff isn't even a subject to automated testing. You'd have to spend a double amount of development time, trying to describe all possible error conditions, starting with completely wrong user entries in hundreds of different parameter fields, choices, etc., going down to network errors, disconnections, files not present, corrupt data and on and on and on. Where is that paradise they were promising to all? Where is that portability, declared left and right on just about every corner in your favorite downtown? Basically, the more I look at it, the more it seems that Java has no future, at least for a generation. With the amount of hassles, inter-continental law suits on just about the biggest level imaginable, and the very JVM architecture does not look like ANYTHING new under Sun, and, unless a generation of time passes, and JVM hardware chips are wired into your box right off the shelf, if people would even remember what that Java thing was on the first place, I just do not see it becoming a widely acceptable technology that has a stable enough foundation to survive the challanges forthcoming. It is about the most convoluted design I have ever seen with just about as many levels of abstraction one could imagine in his wildest dreams, even while doing the simpliest things in the world. Just out of curiocity, I wonder what would happen, if you managed to get a handle on the object and examine some method with a kernel level debugger. How many millions of references upon references to the structures, pointing to other structure does it take to add 2 and 2, which takes a single clock cycle of your CPU? How many terabytes have to be swapped in and out to do so? One day I'll do just that and report the results of it, just out of curiosity. Because what I am seeing from the day one of my Java "encounter", is that it is probably wasting 1000 times more resources in terms of memory footprints, performance and on and on and on. I just see it in the way the very development environment works. It crawls like a turtle where it shold be flying like a bird, or even sputnik, nowadays. After literally generations of development of all sorts of languages and architectures, THIS is what we ended up with? How many generations will it take for this thing to become as a glove, you put on your hand? Anybody has a guess? To me, this (footprint) is one of the major problems with Java and the whole idea of JVM. I have noticed looking at source published by various people that they explicitly import only those packages that are needed for their app. So, instead of saying "import java.awt", they'll explicitly call for some sub-package, and that is just about the LAST thing I would like to worry about. That seemed to be strange, but i am SURE there IS a reason why they are doing so. I am not even sure that if you have some unused code in your program, that eventually athrophied, that thing would not be compiled in and hang as a piece of dead wood in your app, eating resources for no reason whatsoever. I have seen people here asking help on trying to get a listing of all their unused code. For what? That stuff shouldn't even be compiled in on the first place. No need to even worry about. The reason you have some unused code is because you have switched to a new approach, and, having that unused code in your source files may have ten times more benefits than it creates problems, because it shows you in no uncertain terms, what was the previous design and allows you to tweak your new design and avoid all the pitfalls you might fall into, not realizing there are some tricky situations that there were handled by the old version. And i see it left and right. I have a special religious ceremony, where i go to all the source files and remove all the code that is commented out in BULK, the entire methods need be. Some of it is obviously outdated and after seeing the new version run stably for sufficient amount of time, you can painlessly remove all the code that is commented out, and that code, in most cases, is your golden treasure, as you can see the most minute permutation in your own thought process and you can see how things could be simplified even futher, making it clearer, more efficiend and more universal. And this kind of stuff you can expect with just about every single step in your development process, going down to expecting a reasonable behavior when user pushes some button, checkbox, or enters text in one of the fields. For example, in MY case, there is a need for a user to be able to save his current configuration at ANY moment, regardless of what frame is he working with at the moment. In fact, he can have ALL the frames open at the same time to see various parameters, such as files, complex filters, global parameters, etc. So... He can even go as far, as starting some major operation, and, in real time, open up as many parameter frames and even change those parameters on the fly, while current operation is in progress, which isn't the easiest thing to manage on the first place. He can change some parameters that in real time, the next object processed would have those parameters so there is no need to restart some major operation, which is probably the trickiest thing there is, especially considering that he can fire up multiple treads that do different jobs. Sure, some of it is not possible in principle, but quite a lot of it is doable, giving the user tremendous power, flexibility, ease of use and the most intuitive user interface imaginable. THAT is what I call architecture. THAT is what your stinky piece of software for on the first place. TO FACILITATE THE USER, and not raised the tripple armored walls around him and FORCE him to do it the Willy Da Gates way. THE USER IS THE MASTER, and not you, slaves, tied to your desks with the golden chains, not even able to sneeze without getting a "permission" from some nazi style sadists, whose mind is prototyped with the most primitive templates there are, not even knowing who he is. So lost is he in this biorobotic maze of NWO, cooking on your plate this very moment, eventually leading, according to official dictates, to a global totalitarian system, where there are only two classes left: The "elite", those blue blooded "Aryan" race, and the "slaves", aka the "filth of inferior race". THIS IS LITERAL MODEL and i have piles of specific reference and globally distributed archives that are guaranteed to survive for at least a generation unles the very life on the planet Earth ends, which is not that inconceivable, at least in the current state of affairs. Now... For that, he has to be able to hit a function key, from ANY window, and update his set of parameters or reload the news ones if he wishes, and it all has to be immediately reflected in ANY and all windows, open or closed. Realizing that some of those frames may be able to start a lenghty process of extracting huge amounts of information, filtering it, converting one data representation into others, such as generating perfectly valid web pages, with full support for style sheets, in line, if so desired, this thing could be swallowing hundreds of megabytes. With the original event model, that was a direct copy of original Unix based model, where you have the eventHandler that could process just about any event imaginable and report to the higher level wether it actually handled the event, so they could see if THEY need to handle it, everything was about the simpliest thing in the world. And now? Well, just about for every single GUI element on every single frame of yours, you'd have to hang the event handling code. I've spent DAYs on trying to figure out how to do it without hanging all the abstract fat on every single checkbox, button or a text field. Second major problm in MY case, is that the user, and I am dealing with ordinary users, not some huge corporations, if he would even bother to get your program on the first place, expects to simply double click on an executable (Windows environment), and see how program works, which is what nearly 100 percent of present software products do. But that is not possible with this JVM architecture. He would have to download 5 times as much code as the application itself needs, to get the JVM AND install it on his machine, and that is about the LAST thing he would want to bother about. In vast majority of cases, people do not even know what Java is, and could not even bother with installing all these "virtual machines", just because of security risks alone. People claim that Java is "safe", that you can't write files and on and on and on, but I don't believe a single word of it. I happened to work on one project at HP in the silicon valley doing some kernel level stuff, and there was one guy who worked in the kernel security department developing security related code. He told me of some security issues with some major programs on the market. He could totally take over your machine even though all you were doing on the net is web browsing, which seems to be one of the most innocent things there is. I also developed a related code for a firewall/monitor tool that allows customers and providers to visually monitor their traffic, create various rule sets for specific instances. And, what i have seen is that vast majority of people do not even suspect that they are literally open to all the hackers out there, just by simply using their web browser, I am not even talking about specific ports and protocols they have open on their systems. There isn't a single session when I login and use internet, when I am not attacked, and some of those attacks originate at the very ISP provider facilities from what I am seeing, and automatically probe your system for vulnerabiltis as soon as you log in. Things like that. I can hardly remember a SINGLE time when i logged in that there were not a MAJOR security probe performed on my machine. So, to claim "java is a safe as heaven" in terms of security, you need to be a 5 year old kid. I have personally seen some stuff, you couldn't have even IMAGINED in your WILDEST dreams. Nothin new to it. Yes, Java does have its attractive points and IS more abstract and platform independent than C++ can ever be, especially if you consider all the MS stuff. But, at the same time, what can be done to you and your machine, just by you enabling some java related features, is nothing less than circus miracles. But, what I find is that it is WAY less portable as people keep claiming. In fact, I am not sure there exists a development environment that even cares to bother about portability issues. Borland does it in its ways, and if you are not careful, you'll wire-in some of their proprietary things on the simpliest level, such as layouts, and, if you are not a fool, when you try to build your app, the other compilers would tell you they never heard of such layout or things of this nature. So, that claimed portability is vastly exagerrated. Borland is not compatible with MS stuff, and those, in their turn, do not even support the javax packages, and, instead, do just about all they can to trap you into their proprietary approach, and, in some cases, you might not even noticed that you have already used some of their stuff, until you try to rebuild that app under a different compiler. Simple things like toString() method, that has a proprietary microsoft's equivalent ToString(), which comes earlier in a collating sequence. So, when you use some object, and hit the dot key to expand it, the FIRST thing that is presented to you is Microsoft's version, and you might not even noticed it as it all happens in a semi-automatic way. I have fallen into this exact trap, and not once. The only thing that saved my skin is to try to rebuild it using a different development environment and I had to waste some time fixing some of those UTTERLY unnecessary screwups. So, all this looks like walking on a mine field and takes away so much energy on worrying about all these compatibility issues, it is simply hard to believe. In case of code I am working on right now, I spent at least 70 if not 90 percent of my time on all these issues. On every single hour I spend actually developing stuff, I spent sometimes DAYS to figure out the solutions to the simpliest problems imaginable. Just to do a GUI layout of a modern app, it ALREADY took me a week, and the stuff is so standard and I use so little of those "sophisticated" features, that all that I am wasting my time on, could be done in few hours, if not minutes, under any environment I am aware of. Quite often I wonder what kind of mud I've got myself into with this whole Java thing. I could do the same thing in C++ and be done with it monhs ago, without even bothering about screen resolutions, font sizes and on and on and on. The Java footprint is a footprint of a monster and its overhead is well beyond obscene. So... Hope that helps YOUR situation :---} Good luck. >> The >> first thing I thought is that adding more RAM will solve this ( though >> this is not an easy option) . Then I understood that a 32 bit system >> can have just about 3 gb ram for applciations and our AS had already 4 >> GB with 1.5 GB VM also configured. Then I thought there might be ways >> to make the JVM shareable. But no. Also tried to use the flags to fine >> tune JVM. No go there also. Irrespective of how much you limit the >> actual limit is in the heap size allocated to the application and not >> to the private bytes of JVM. >> >> ----------------------------------------- >> Data from Jconsole for the Java application >> >> Memory >> Current Heap Size 4.3 MB >> Max heap size 12. 2 MB ( set by flag) >> Committed memory 5 MB >> Operating System >> Committed VM - 26.7 MB >> >> Data from Perfmon (for java.exe) >> >> Private Bytes - 27.7 MB >> ---------------------------------------- >> >> I am part of a large team that developes and maintains a telecom >> network managment software system. Also this software is used all >> around the globe almost in around 190 countries usually by telecom >> service providers. So this is a very real problem that I am speaking >> about. I am getting to love the simplicty of Java and of the great IDE >> Eclipse as much as I love the power of STL; but I am comming face to >> face with the main constraint of Java, its memory footprint and I >> guess thousands of others like me must have faced similar problems. >> >> If so the next question is what is SUN doing about this. I could not >> find it in their top 25 RFE's or top 25 bugs. (http://bugs.sun.com/ >> bugdatabase/top25_bugs.dohttp://bugs.sun.com/bugdatabase/ >> top25_rfes.do ) >> >> 1) Is this really not a problem in the outside world then ? >> >> 2) Or is it that with the introduction of 64 bit HW and serveres this >> will be of no significance ? >> >> Anyway I doubt if companies like ours will adopt 64 bit HW and servers >> because of the costs involved in it ( note this is just a logical >> guess, I have no experience in such decisions) >> >> Anyway I am now forced to use C++ for the client and use Java on the >> server side. Fortunately most of the Java in the server side is done >> up as EJB's all conatined in the JBoss server thus consuming only one >> JVM there) >> ------- >> I would like to get some comments on questions 1 and 2. >> >> Thanks >> Alex.C.P > >Hmm, I'm not sure I understand your setup, but it appearch you have a >single server machine which runs both the Java server process and the >multiple client processes? > >Usually, Java clients are run on seperate client machines, so the >number of clients doesn't effect the footprint. > >Anyway, to answer your questions, I've never found this to be a >problem in any of our environments, so perhaps there is some problem >with your architecture/design/configuration. I think that this problem >doesn't have anything to do with the 32 vs 64bit platform, but perhaps >a misunderstanding somewhere. >Java does not have a tiny footprint, but last I checked, 2048M(2gig)/ >32Mb = 64. That means that you'd be able to run around 64 seperate JVM >processes on one machine. This isn't a typical situation, and it still >doesn't seem to fit your conclusions. > >Maybe it would help my understanding if I know what a "CLI" was. I >only know it as Clear Interrupt Flag :-) > >Hope this helps, >Daniel. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Our exit strategy in Iraq is success. It's that simple." --- Offense Secretary Donald Rumsfeld
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads