tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [Seriously OT] Help in diagnosing server unresponsiveness
Date Fri, 08 Feb 2013 20:40:06 GMT
Hash: SHA256


On 2/6/13 3:05 PM, André Warnier wrote:
> As maybe one more rant to add to this series, and as a reply to
> the "just throw more hardware at it, it's cheap" line.

In my defense, I was mostly talking about the trade-offs between
something that is relatively easy to implement (e.g. Hibernate, JPA,
etc.) taking more resources than something that was hand-coded, say
with straight JDBC calls. Since CPU cycles are cheap relative to
programmers, go with JPA or Hibernate unless there is a particular
reason to do straight JDBC. In our case, the O-R mappers were dogs and
we found ourselves hacking-around them all the time. I suspect things
have gotten better, now, but we do have that pesky thing called time
that is to valuable. So, it's cheaper to leave the (fast!) code along
than it is to "upgrade" to using Hibernate or JPA.

> So the additional 1 GB of Tomcat heap (just as an example) ends up 
> costing 850€, not 50€. Additionally, this bigger server could be
> 2U in height instead of 1U, and cost 75% more per month to host in
> a rack. And so it goes for other server resources (disk, network 
> bandwidth, etc.).

You must admit that your example is fairly contrived, but it is a good

> I am not even counting the time that will be needed to move the 
> applications from server 1 to server 2.

You aren't using some kind of cloning or scripted-setup? Yikes!

> (And "the cloud" turns out not to be much cheaper, once you
> seriously factor in the various cost elements).

Speaking of the prior statement and "the cloud": using AWS is really
pretty cool: you set up a server the way you want it and take a
snapshot. Then, cloning that server is as easy as saying "gimmie
another one of these" and it just happens. Need to upgrade an entire
fleet of app servers? No problem: upgrade one, snapshot, then launch
10 new ones just like it. Let the other ones shut down and disappear...

> That is also why I sometimes look in wonder as someone on this
> forum will tell someone else something like "4 GB of heap is really
> not very much to run your webapp; you should at least double that
> for any serious work".

Current heap allocations on a "real" webapp:

JVM 1: 384M
JVM 2: 256M
JVM 3: 256M
JVM 4: 64M

Lean and mean. And one of those (256M) does nothing but XSL
transformations which are pretty heavy on RAM usage.

Anyone who tells you anything about how much heap memory you need is
probably selling RAM.

> What about instead "Dude, 4 GB is four thousand million bytes (plus
> spares). Would you not have a quick look at your webapp, to see if 
> it really needs that much workspace to send back a single html page
> ?".


- -chris

Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message