5 ms·
On the low end, I've always thought java has a significant disadvantage: memory footprint. In particular, this is compared to PHP/Perl/RoR/etc. When you start
by garyrichardson 16y ago
On the low end, I've always thought java has a significant disadvantage: memory footprint. In particular, this is compared to PHP/Perl/RoR/etc.
When you start your java app you pre-allocate all the memory you're going to need for the process' lifetime. This could be 512MB, this could be 2GB+, but it's never small. And this is unaffected by your initial traffic volume. It's the same for 0.001 hits/sec or 5 hits/sec.
On the other hand, if you drop a bunch of PHP scripts on a server, Apache only uses the memory it needs. Sure, you may have some pain scaling it later, but to get up and running you can get a cheap server and run your code.
Also, while I have your attention, have you ever tried installing an enterprise java webapp? It's not like you can pile a bunch of them into one JVM on a machine. I run confluence/jira/bamboo. Each has it's own requirements and basically need to run in their own tomcat servers tuned with their own settings. It's a huge PITA and eats up a ton of memory.
- Tichy 16y agoActually I am afraid to host a RoR app on my server, which runs several Java apps. I think the server has only 256MB of RAM (it is old, but cheap), or maybe 512 - not a lot, in any case. I am much more worried about memory consumption of RoR. Never really launched it in production, but wasn't it the case that you have to load balance between several Mongrels, each consuming > 100MB of RAM? Java is just unpleasant to use - other than that, it is very fast and memory consumption is ok.
- ptomato 16y agoRuby deployment has gotten at least an order of magnitude less painful in recent years, particularly with Passenger (http://www.modrails.com/ http://www.modrails.com/). On a couple servers I run the average memory footprint of a Rails app on Passenger (per instance) is 50-60MB.
- WALoeIII 16y agoheroku.com
- Tichy 16y agoThe "demo" version of heroku has only one process, I think, and 5MB storage. The first professional version is already quite expensive. I pay 10$/month for my server (split with a friend). I host several projects on that one server (incubation...).
- ww520 16y agoI have run websites done in Java running on Tomcat plus MySQL plus Wine/Win32 programs and a few other services with 128M Linux servers. Tomcat takes up about 30M to 40M. The 512MB or 2GB are simply misinformation.
- garyrichardson 16y agoOriginal poster asked about enterprise webapps. Those that I've used are quite huge.
- ww520 16y ago"It seems to me that lots of small to medium webapps..." from the OP doesn't sound like enterprise to me. If you load lots of data in your app, it will use lots of memory. Doesn't matter what language it's in. It's a poor measurement of Java's memory requirement.