tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark H. Wood" <mw...@IUPUI.Edu>
Subject Re: [OT]RE: Maximum memory that can be assigned to Tomcat on windows platform
Date Thu, 01 Dec 2011 14:50:34 GMT
On Thu, Dec 01, 2011 at 12:38:01PM +0100, Mikolaj Rydzewski wrote:
>  On the other hand, increasing java heap size is not always the best 
>  option. It heavily depends on memory usage pattern in your application. 
>  In general: the bigger heap, the longer GC will run.

I was thinking that someone should bring this up.  When a program uses
unexpectedly huge amounts of memory in practice, the *first* thing to
consider is:

1.  does it actually need that much?
2.  ...or is it leaking dynamically created objects?
3.  ...or has cheap allocation and garbage collection lured me into
    doing something suboptimal, like sucking down an entire database
    table into an array or list and then walking it sequentially, when
    I could have used an iterator and let the DBMS code work out
    near-optimal buffering?

IOW "is my problem fundamentally this big, or is something else going on?"

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Asking whether markets are efficient is like asking whether people are smart.

Mime
View raw message