You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by David Crossley <cr...@apache.org> on 2009/02/20 07:13:58 UTC

Re: [jira] Updated: (FOR-1031) Switch to EHCache for Locationmap Cache

Tim Williams wrote:
> Anyone had a chance to check this out?  I'll go ahead and apply it but
> since some of the earlier problems only occurred under stress
> conditions, I wanted to give an opportunity for others to test too.

I made some time to try it today. However i don't know what
is a good test nor what to look for. Anyway i tried building
the Forrest docs at "site-author" with the level for locationmap
logging set to DEBUG.

Before it took about 4 minutes to build.
After adding your LM patch it takes about 2.5 minutes.

Do you have a reference to the "stress conditions" that
you refer to above?

Do we need a default ehcache configuration file?
Where does it get placed?

Does that configuration file affect the main Cocoon
cache which has some configuartion via main/webapp/WEB-INF/cocoon.xconf
and main/webapp/WEB-INF/properties/core.properties ?

Sorry for more questions rather than much help.

-David

> >     [ https://issues.apache.org/jira/browse/FOR-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> >
> > Tim Williams updated FOR-1031:
> > ------------------------------
> >
> >    Attachment: lm_cache.diff
> >
> > Remove the simple all-or-nothing map cache for ehache.
> >
> >> Switch to EHCache for Locationmap Cache
> >> ---------------------------------------
> >>
> >>                 Key: FOR-1031
> >>                 URL: https://issues.apache.org/jira/browse/FOR-1031
> >>             Project: Forrest
> >>          Issue Type: Improvement
> >>          Components: Locationmap
> >>            Reporter: Tim Williams
> >>         Attachments: lm_cache.diff
> >>
> >>
> >> Should be an easy switch and get much better cache support/configuration options.  Expiry of cache can be per-element vs. the current implementation where it expires in its entirey.  It will make the LM stuff much cleaner too.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
> 

Re: [jira] Updated: (FOR-1031) Switch to EHCache for Locationmap Cache

Posted by David Crossley <cr...@apache.org>.
I am seeing some issues now.

Described it in a comment to FOR-1031.

-David

Re: [jira] Updated: (FOR-1031) Switch to EHCache for Locationmap Cache

Posted by David Crossley <cr...@apache.org>.
Tim Williams wrote:
> David Crossley wrote:
> > Tim Williams wrote:
> 
> >> Anyone had a chance to check this out?  I'll go ahead and apply it but
> >> since some of the earlier problems only occurred under stress
> >> conditions, I wanted to give an opportunity for others to test too.
> >
> > I made some time to try it today. However i don't know what
> > is a good test nor what to look for. Anyway i tried building
> > the Forrest docs at "site-author" with the level for locationmap
> > logging set to DEBUG.
> >
> > Before it took about 4 minutes to build.
> > After adding your LM patch it takes about 2.5 minutes.
> 
> I'm surprised the locationmap is being used on enough duplicate
> requests to make that much of a difference in static mode, that's
> pretty good.

I tested again, and confirmed the speed improvement.

The locationmap is very central to Forrest's operations now.

Perhaps this is an indicator that we should look deeper
at the locationmap requests. There is something in our
mail archives describing the last time when we used
the Cocoon Sitemap Profiler:
http://forrest.apache.org/howto-dev.html#debug

-David

Re: [jira] Updated: (FOR-1031) Switch to EHCache for Locationmap Cache

Posted by Tim Williams <wi...@gmail.com>.
On Fri, Feb 20, 2009 at 1:13 AM, David Crossley <cr...@apache.org> wrote:
> Tim Williams wrote:
>> Anyone had a chance to check this out?  I'll go ahead and apply it but
>> since some of the earlier problems only occurred under stress
>> conditions, I wanted to give an opportunity for others to test too.
>
> I made some time to try it today. However i don't know what
> is a good test nor what to look for. Anyway i tried building
> the Forrest docs at "site-author" with the level for locationmap
> logging set to DEBUG.
>
> Before it took about 4 minutes to build.
> After adding your LM patch it takes about 2.5 minutes.

I'm surprised the locationmap is being used on enough duplicate
requests to make that much of a difference in static mode, that's
pretty good.

> Do you have a reference to the "stress conditions" that
> you refer to above?

Yeah, I was specifically referring to Thorsten's synchronization
problems before.  Our old cache was a bit of a hack and Thorsten
patched it by synchronizing certain accesses.  We knew then that it
was a short-term solution. He's got tests that do run numerous threads
and cause the problem he was seeing, so I thought it'd be helpful to
use those tests for this.  It should be much more capable in a
multi-threaded environment.

> Do we need a default ehcache configuration file?
> Where does it get placed?

Yeah, we should.  I'll try to get to that too, likely in the source
directory but as long as it makes it on the classpath all is well.

> Does that configuration file affect the main Cocoon
> cache which has some configuartion via main/webapp/WEB-INF/cocoon.xconf
> and main/webapp/WEB-INF/properties/core.properties ?

No, it shouldn't. Cocoon, AFAIK has created a 'store' abstraction to
their cache, which happens to be backed by ehcache.  Those properties,
cocoon.xconf in particular, are used for programmatically creating
their store.  In other words, I *think* even if an ehcache file were
on the classpath, they'd effectively ignore it for anything but
default values - which effectively means it'd be totally ignored.  A
long way of saying, I think we're safe - but I'm going from memory on
much of this so maybe someone with deeper Cocoon knowledge could
confirm this though?

> Sorry for more questions rather than much help.

No, this was good, Thanks David
--tim

> -David
>
>> >     [ https://issues.apache.org/jira/browse/FOR-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>> >
>> > Tim Williams updated FOR-1031:
>> > ------------------------------
>> >
>> >    Attachment: lm_cache.diff
>> >
>> > Remove the simple all-or-nothing map cache for ehache.
>> >
>> >> Switch to EHCache for Locationmap Cache
>> >> ---------------------------------------
>> >>
>> >>                 Key: FOR-1031
>> >>                 URL: https://issues.apache.org/jira/browse/FOR-1031
>> >>             Project: Forrest
>> >>          Issue Type: Improvement
>> >>          Components: Locationmap
>> >>            Reporter: Tim Williams
>> >>         Attachments: lm_cache.diff
>> >>
>> >>
>> >> Should be an easy switch and get much better cache support/configuration options.  Expiry of cache can be per-element vs. the current implementation where it expires in its entirey.  It will make the LM stuff much cleaner too.
>> >
>> > --
>> > This message is automatically generated by JIRA.
>> > -
>> > You can reply to this email to add a comment to the issue online.
>> >
>> >
>>
>