users@grizzly.java.net

Re: Comet - growing CPU usage

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 09 Jun 2009 12:26:24 -0400

Salut,

FredrikJ wrote:
>
> Jeanfrancois Arcand-2 wrote:
>> Can you elaborate why the CPU is an issue for you? Comet use more
>> threads when executing a normal request. You don't need more thread but
>> of course there will be more activity, hence CPU.
>>
>>
>> This issue has been fixed in 1.9.x but nobody ever reported it using
>> 1.0.x. I suspect using GF v3 is no op for you, right?
>>
>> Thanks
>>
>> -- Jeanfrancois
>>
>
>
> Hello,
> Thank you for your quick replies! =)
>
> Higher CPU overall when using Comet is fine, I even expect that =). However,
> the issue is that the CPU usage goes up over time. The first minutes its 30%
> usage and then after maybe one hour (depending on load) we are seeing 100%.
> Since this does not happen with synchronous/no comet, I am inclined to
> believe that it is at least related to Comet/ARP in some way.

Can you share privately your code so I can take a look? The more
suspended connection you have the bigger the difference will be with the
synchronized approach. Ping me at jfarcand @ apache.org


>
> However, the ever-increasing CPU usage could be due to API misuse and I
> cannot conclusively say that the problem lies within or without the Comet
> implementation without further testing.
>
> I don't think GF v3 is an option right now. Do you think that the deadlock
> is coupled to have Comet enabled or that it is completely unrelated and
> might happen when running with Comet disabled as well?

It might happens without Comet but this is clearly a really hard
situation to reproduce. I can work on a port to 1.0.30 if you have the
cycle to test the fix I will produce as I never successfully reproduced
the issue.

Thanks

-- Jeanfrancois