It seems some of you haven't uderstood the purpose of the work of Azul engineers. They sell servers. I've just recently personally talked to one of them. They are trying to solve the problem of very large heaps not because you have to use 64 GB for Java applications *now*. Java's standard GC is perfectly ok with heaps of sizes 2-8 GB. But being able to use larger heaps, still without pauses, opens new possibilities. RAM is getting ridiculously cheap and making use of it is a *good thing*.
I watched the video and it's decided that 2~5 GB of memory for each application is alright. I can easily run a game server, a Mumble server, a mail server, a website, and MySQL database server on a 3 GB server |
Good joke. Say it to Google, Facebook, Amazon or Twitter. They would pay you $10000000 if you managed to keep their services up and running with a single 3 GB server. BTW: The latter three use full Java stack for their databases. :D And Google is using it for the main service it earns money from: AdWords and AdSense. Do you suggest they are doing it wrong?
You see, Azul is *not* targetting small companies that need to have a website to publish their blog. They are targetting companies, for which buying a $20k server is like buying a new set of paper-clips.
Now is Dalvik as a run-time garbage collector a bad thing? |
Dalvik is just a JVM. Sligtly different and less advanced than Oracle's, but still JVM.
Firefox, the web browser, can stay open for several hours |
Yes, and it eats about 10x more memory than it actually uses, if it stays open for enough long. Do a simple test: open Firefox. Measure its RAM consumption. Open additional 10 tabs and load some pages. Close that 10 tabs. Measure the RAM consumption once again. I'm sure it will be 2x or 3x higher than it was at the beginning. If Firefox was GCed, it could return all the unused RAM to the OS, after the next GC run. Firefox can eat more RAM than my whole Eclipse with a few projects eats after one week without restart. And Eclipse is a much larger and complicated than Firefox. Firefox is a perfect example that manual memory management is not the preferred way to go in a large and complex application.
If any one of those were made of Java, I would have trouble keep my server stable |
This claim is without backup and wrong. I've been running Linux + Tomcat + PostgreSQL + Spring + Hibernate stack on a 3 GB server in a company for several months without a restart. And it was running a small, 100k users MMORPG. We even switched to Tomcat only from Apache + Tomcat tandem because Tomcat was faster. So, you'd better change your admin.
<troll mode> BTW: "Stable and fast" and MySQL contradict themselves.</troll mode>
Of course now that C++ supports mark-sweep GC (not mark-compact, thankfully, which would be impossible anyway), things may get more interesting, once the compilers catch up. |
Mark-sweep is pretty lame. It is like Java 15 years ago. Slow and expect long pauses.
And sharedptr is a performance killer on multicore architectures. It is a nice addition, but if you use it too often, you'll get much worse performance even than some ancient mark-sweep GCs. It is funny there are so many C++ programmers that are trying to add features from some other modern languages to C++. But then, after some time thy usually realize it is better to just use some other modern language itself. It simply doesn't work. You can't program it C++ as it were Java. It was made for different tasks.