You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Pier Fumagalli <pi...@betaversion.org> on 2004/07/07 18:31:34 UTC

Is there a way to revert to the old "store"?

Guys, I'm seeing some problems on 2.1.5 and 2.2 which don't happen on 
2.1.5-dev.
I am guessing that something is wrong with the new JCS-based store...

Is there a way to revert back without re-implementing the whole thing?

	Pier

Re: Is there a way to revert to the old "store"?

Posted by Vadim Gritsenko <va...@reverycodes.com>.
bernhard huber wrote:

>>>>Guys, I'm seeing some problems on 2.1.5 and 2.2 which don't happen on 
>>>>2.1.5-dev.
>>>>I am guessing that something is wrong with the new JCS-based store...
>>>>Is there a way to revert back without re-implementing the whole thing?
>>>>        
>>>>
>
>running some tests i had following experiences
>
>A       B
>100     71ms
>200    670ms
>500   4917ms
>1000 28221ms
>
>A .. number of string entries to be cached
>B .. measured time in ms
>
>Seems that caching time rises not linear using JCS.
>

Memory cache is implemented by org.apache.jcs.engine.LRUMemoryCache, and 
I think it is being used by Cocoon (as configured in default.ccf). 
Method of adding an entry looks like O(log(n)), with the exception of 
one statement:

    if ( map.size() != dumpCacheSize() )
    {
      log.error( "update: After spool, size mismatch: map.size() = "
                 + map.size() + ", linked list size = " +
                 dumpCacheSize() );
    }

Which forces linear scan of linked list. For large caches, this should 
be one of the reasons of slow performance. Another reason I can think of 
can be synchronization in the heavy-multithreaded environment.

Pier, you can also take a look at MRUMemoryStore / MRUBucketMap pair- it 
supposed to be faster replacement of excalibur's store.

Vadim


Re: Is there a way to revert to the old "store"?

Posted by Unico Hommes <un...@hippo.nl>.
Pier Fumagalli wrote:

> On 7 Jul 2004, at 23:42, bernhard huber wrote:
>
>>
>>>>> Guys, I'm seeing some problems on 2.1.5 and 2.2 which don't happen on
>>>>> 2.1.5-dev.
>>>>> I am guessing that something is wrong with the new JCS-based store...
>>>>> Is there a way to revert back without re-implementing the whole 
>>>>> thing?
>>>>
>>>>
>>
>> running some tests i had following experiences
>>
>> A       B
>> 100     71ms
>> 200    670ms
>> 500   4917ms
>> 1000 28221ms
>>
>> A .. number of string entries to be cached
>> B .. measured time in ms
>>
>> Seems that caching time rises not linear using JCS.
>
>
> FUDGE! That's exactly what I'm seeing. Under heavy loads, but with no 
> variation of URLs, 2.2 is twice as fast as 2.1.5-dev, when the URLs I 
> process in Cocoon start varying, then the request time grows 
> exponentially.
>
> For us 2.1.5 is unusable, and, ok, VNUNET is not your regular 
> moderately loaded, well designed web site (it's actually a miracle it 
> stays together :-P ) but this is kinda of a major problem, AFAICS!
>
> For now, just to make sure, I'll put live 2.1.5 with the old cache, 
> and give it a go. If that works, then we know we have some problems 
> with JCS under load.
>

Are you sure this is going to work for you though? My own experience 
with the old store is that after a while the cache gets corrupted and 
you start seeing cached content pop up at unexpected places as if the 
cache key all of a sudden is now pointing to a different cached object.

> If someone explains how to try out EHCache, I'll be delighted to test 
> it out as well.
>

It's in the scratchpad area. There is an xconf patch file that shows you 
the component configuration. Javadocs should be verbose enough to get 
you going.

EHCache just released 0.9 version. I am looking into upgrading today.

--
Unico

Re: Is there a way to revert to the old "store"?

Posted by Pier Fumagalli <pi...@betaversion.org>.
On 7 Jul 2004, at 23:42, bernhard huber wrote:
>
>>>> Guys, I'm seeing some problems on 2.1.5 and 2.2 which don't happen 
>>>> on
>>>> 2.1.5-dev.
>>>> I am guessing that something is wrong with the new JCS-based 
>>>> store...
>>>> Is there a way to revert back without re-implementing the whole 
>>>> thing?
>>>
>
> running some tests i had following experiences
>
> A       B
> 100     71ms
> 200    670ms
> 500   4917ms
> 1000 28221ms
>
> A .. number of string entries to be cached
> B .. measured time in ms
>
> Seems that caching time rises not linear using JCS.

FUDGE! That's exactly what I'm seeing. Under heavy loads, but with no 
variation of URLs, 2.2 is twice as fast as 2.1.5-dev, when the URLs I 
process in Cocoon start varying, then the request time grows 
exponentially.

For us 2.1.5 is unusable, and, ok, VNUNET is not your regular 
moderately loaded, well designed web site (it's actually a miracle it 
stays together :-P ) but this is kinda of a major problem, AFAICS!

For now, just to make sure, I'll put live 2.1.5 with the old cache, and 
give it a go. If that works, then we know we have some problems with 
JCS under load.

If someone explains how to try out EHCache, I'll be delighted to test 
it out as well.

	Pier

Re: Is there a way to revert to the old "store"?

Posted by bernhard huber <be...@gmx.at>.
> >> Guys, I'm seeing some problems on 2.1.5 and 2.2 which don't happen on 
> >> 2.1.5-dev.
> >> I am guessing that something is wrong with the new JCS-based store...
> >> Is there a way to revert back without re-implementing the whole thing?
> >

running some tests i had following experiences

A       B
100     71ms
200    670ms
500   4917ms
1000 28221ms

A .. number of string entries to be cached
B .. measured time in ms

Seems that caching time rises not linear using JCS.


-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info


Re: Is there a way to revert to the old store?

Posted by Pier Fumagalli <pi...@betaversion.org>.
On 8 Jul 2004, at 07:35, Carsten Ziegeler wrote:
> Pier Fumagalli wrote:
>>
>> Howto? :-P I had to backport the DefaultPersistentStore and
>> hack all the way through...
>>
>> It was definitely not nice not to have the
>> DefaultPersistentStore java source in the 2.1.5 source
>> tarball, :-( :-(
>>
>> In the future, can people be slightly more careful in
>> removing stuff? I don't care if you switch configurations
>> from 2.1.4 to 2.1.5, but at least leave the files in there,
>> given that we are still including JISP as a JAR...
>>
> The source is still there; it has just been moved into the deprecated
> directory.

You see why I always refer to myself as an idiot? :-P

$ find ../cocoon-2.1.5/src -name DefaultPersistentStore.java
../cocoon-2.1.5/src/deprecated/java/org/apache/cocoon/components/store/ 
impl/DefaultPersistentStore.java
$

Sorry! :-(

	Pier


RE: Is there a way to revert to the old store?

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
 
Pier Fumagalli wrote:
> 
> Howto? :-P I had to backport the DefaultPersistentStore and 
> hack all the way through...
> 
> It was definitely not nice not to have the 
> DefaultPersistentStore java source in the 2.1.5 source 
> tarball, :-( :-(
> 
> In the future, can people be slightly more careful in 
> removing stuff? I don't care if you switch configurations 
> from 2.1.4 to 2.1.5, but at least leave the files in there, 
> given that we are still including JISP as a JAR...
> 
The source is still there; it has just been moved into the deprecated
directory.

Carsten


Re: Is there a way to revert to the old "store"?

Posted by Pier Fumagalli <pi...@betaversion.org>.
On 7 Jul 2004, at 18:46, Torsten Curdt wrote:
> Pier Fumagalli wrote:
>
>> Guys, I'm seeing some problems on 2.1.5 and 2.2 which don't happen on 
>> 2.1.5-dev.
>> I am guessing that something is wrong with the new JCS-based store...
>> Is there a way to revert back without re-implementing the whole thing?
>
> We also had problems

Can you describe yours? I noticed weird lock-ups, like the machine was 
not loaded, but at the same time it was processing requests _seriously_ 
slowly...

> ...switching to EHCache solved them.
> Did you try that one?

Howto? :-P I had to backport the DefaultPersistentStore and hack all 
the way through...

It was definitely not nice not to have the DefaultPersistentStore java 
source in the 2.1.5 source tarball, :-( :-(

In the future, can people be slightly more careful in removing stuff? I 
don't care if you switch configurations from 2.1.4 to 2.1.5, but at 
least leave the files in there, given that we are still including JISP 
as a JAR...

(took me a day to get 2.1.5 working with the old cache)

	Pier

Re: Is there a way to revert to the old "store"?

Posted by Torsten Curdt <tc...@vafer.org>.
Pier Fumagalli wrote:

> Guys, I'm seeing some problems on 2.1.5 and 2.2 which don't happen on 
> 2.1.5-dev.
> I am guessing that something is wrong with the new JCS-based store...
> 
> Is there a way to revert back without re-implementing the whole thing?

We also had problems ...switching to EHCache solved them

Did you try that one?

cheers
--
Torsten