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   mw...@iupui.edu
Asking whether markets are efficient is like asking whether people are smart.

Attachment: pgpIowkiM39ep.pgp
Description: PGP signature

Reply via email to