You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Koller Krisztian <kr...@gmail.com> on 2006/06/07 09:19:41 UTC

hssf -> long running Garbage Collector

Hi

We are using the POI-HSSF to generate ms excel files. It works fine if the
excel sheet contains only a few rows. In our production environment the
excel files have more then 5000 rows. (20-30 columns / row)
Some times during the generation of the excel sheet the jvm executes the
garbage collector. Unfortunately the garbage collector runs more then two
minutes long.
Something - maybe the POI objects in the memory? - blocks the gc (and the
whole application)...
(without the poi objects the gc runs very fast (only a few millisec))

Any idea please?

Regards,
Krisztian

Re: hssf -> long running Garbage Collector

Posted by Koller Krisztian <kr...@gmail.com>.
Hi,

Thanks.

We had the following jvm parameters:

-Xms50m -Xmx512m

I have logged the free memory size after every new row creation in the excel
sheet.
It runs very fast until we have enough free memory (and the whole
application is ok too).
But after we run out of the free memory something is happening (i think the
jvm runs the gc)
and the whole application is unavailable for 2-3 minutes.

The excel file is about 3-4 Mb.

Regards,
Krisztian

On 6/7/06, Danny Angus <da...@gmail.com> wrote:
>
> nothing will "block" the garbage collector, but you may want to modify
> certain settings to make it more efficient for your circumstances.
>
> I'd suggest you increase the sizes of the new space (-Xmn) if you are
> running through a lot of loops, increase the starting size of the heap
> (-Xms) and the size of the permanent space too. There is a problem
> whereby failure to allocate into the permanent space results in a loop
> of compating collections, the symptom of which is 100% cpu use an no
> work done.
>
> The parallel collectors can also use a lot of CPU if initial sizes
> aren't big enough.
>
> If you want to know more why not attend my talk on the subject at
> ApacheconEU ... it'll be great :-)
>
> d.
>
> On 07/06/06, Koller Krisztian <kr...@gmail.com> wrote:
> > Hi
> >
> > We are using the POI-HSSF to generate ms excel files. It works fine if
> the
> > excel sheet contains only a few rows. In our production environment the
> > excel files have more then 5000 rows. (20-30 columns / row)
> > Some times during the generation of the excel sheet the jvm executes the
> > garbage collector. Unfortunately the garbage collector runs more then
> two
> > minutes long.
> > Something - maybe the POI objects in the memory? - blocks the gc (and
> the
> > whole application)...
> > (without the poi objects the gc runs very fast (only a few millisec))
> >
> > Any idea please?
> >
> > Regards,
> > Krisztian
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
>

Re: hssf -> long running Garbage Collector

Posted by Danny Angus <da...@gmail.com>.
nothing will "block" the garbage collector, but you may want to modify
certain settings to make it more efficient for your circumstances.

I'd suggest you increase the sizes of the new space (-Xmn) if you are
running through a lot of loops, increase the starting size of the heap
(-Xms) and the size of the permanent space too. There is a problem
whereby failure to allocate into the permanent space results in a loop
of compating collections, the symptom of which is 100% cpu use an no
work done.

The parallel collectors can also use a lot of CPU if initial sizes
aren't big enough.

If you want to know more why not attend my talk on the subject at
ApacheconEU ... it'll be great :-)

d.

On 07/06/06, Koller Krisztian <kr...@gmail.com> wrote:
> Hi
>
> We are using the POI-HSSF to generate ms excel files. It works fine if the
> excel sheet contains only a few rows. In our production environment the
> excel files have more then 5000 rows. (20-30 columns / row)
> Some times during the generation of the excel sheet the jvm executes the
> garbage collector. Unfortunately the garbage collector runs more then two
> minutes long.
> Something - maybe the POI objects in the memory? - blocks the gc (and the
> whole application)...
> (without the poi objects the gc runs very fast (only a few millisec))
>
> Any idea please?
>
> Regards,
> Krisztian
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/