java - Garbage Collector taking too much CPU Time -


i've developed web application process huge amount of data , takes lot of time complete?

so doing profiling of application , noticed 1 bad thing gc.
when full gc occurred stops process 30 - 40 secs.

i wonder if there way improve this. don't want waist cpu's time in gc. below details can useful:

  1. i using java 1.6.0.23
  2. my application takes 20 gb max memory.
  3. a full gc occur after every 14 minutes.
  4. memory before gc 20 gb , after gc 7.8 gb
  5. memory used in cpu (i.e. shown in task manager) 41 gb.
  6. after process completed(jvm still running) used memory 5 gb , free memory 15 gb.

the fewer things new, fewer things need collected.

suppose have class a. can include in reference instance of class a. way can make "free list" of instances of a. whenever need a, pop 1 off free list. if free list empty, new one.

when no longer need it, push on free list.

this can save lot of time.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -