You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sebastien Koechlin <sk...@ivision.fr> on 2001/12/06 13:05:39 UTC

[PATCH] Re: Displaying status

Peter Royal wrote:
> > Same problem, where are classes about caching ? I want to display what
> > is in the cache and the number of hit for each one.
> 
> You want to be looking at the debug output from the CachingEventPipeline and
> the CachingStreamPipeline. Unfortunately it does not keep statistics on the
> cache hit rate, but if you look at the debug output you can see if it did
> pick up on the cached content or not.

Here is a patch against cocoon_20_branch, I don't know if you can apply
it
on HEAD (I did not test).

Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's 
working, but eat huge quantity of memory, and displayed data are raw. 
This is not for final administrators yet.

What is inside:
- New iterator() function on StoreJanitor.
- Function added in StatusGenerator to display data in each store.
- Changes on status2html stylesheet to display thoses data.

Request http://localhost:8080/cocoon/status to see the result.

Using a vanilia cocoon_20_branch, you have 3 different MRUMemoryStore
(they have a different hashCode), with about 440 objects in each.
Except for 2 object, all keys are presents in each Store.
I think there is something wrong here. Is it my code ?

-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

Re: [PATCH] Re: [PATCH] Re: Displaying status

Posted by Sebastien Koechlin <sk...@ivision.fr>.
I wrote:
> 
> Ok, this time, I have a better quality patch for both branchs.
> 
> The status page display every key in each store correponding to a
> not-null object and the class of this object.

Is there something wrong with thoses patchs ? Or can someone apply its ?

I'm looking into Avalon to do the same with Pools.

-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [PATCH] Re: [PATCH] Re: Displaying status

Posted by giacomo <gi...@apache.org>.
On Thu, 6 Dec 2001, Sebastien Koechlin wrote:

Seastien, please cross check your patch I've applied

Thanks

Giacomo

> I wrote:
>
> > Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
> > working, but eat huge quantity of memory, and displayed data are raw.
> > This is not for final administrators yet.
>
> Ok, this time, I have a better quality patch for both branchs.
>
> The status page display every key in each store correponding to a
> not-null object and the class of this object.
>
> Still to be done :
> 	- Use better names instead of keys.
> 	- Add a counter of cache-hit for each object.
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


[PATCH] Re: [PATCH] Re: Displaying status

Posted by Sebastien Koechlin <sk...@ivision.fr>.
I wrote:

> Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
> working, but eat huge quantity of memory, and displayed data are raw.
> This is not for final administrators yet.

Ok, this time, I have a better quality patch for both branchs.

The status page display every key in each store correponding to a
not-null object and the class of this object.

Still to be done :
	- Use better names instead of keys.
	- Add a counter of cache-hit for each object.

-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

RE: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Gerhard Froehlich <g-...@gmx.de>.
Hi Sebastien,
First, check-out a new HEAD version and you will see
your StatusPage working proper. Just klick
on "C2 Docs" to get some items in the cache.

Second, how about a distinction between cache items
in memory and those on the filesystem.
(Hint: filesystem items are starting with cache-dir\....)

Cheers
Gerhard

"Whose cruel idea was it for the word "lisp" to have an "s" in it?"

>Gerhard Froehlich wrote:
>>
>> >From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On
>
>[OT: your mailer is broken, it use wrong field]
>
>> >So I probably do not have the main StoreJanitor.
>>
>> There is only one impl, yet ;-).
>> On my machine the StoreJanitorImpl initialize proper.
>>
>> >I'm going to write a static (synchronized) StoreJanitor to
>> >record any in-memory Store created.
>> >Is it a good solution, or is there something better ?
>>
>> Why, the actual StoreJanitorImpl does this already. But maybe
>> I understood your question wrong.
>
>There is only one implementation, but I thought I got a new instance
>of it. I tested and it's ok, there is one and only one instance.
>
>
>> >Second:
>> >
>> >Everybody want to know what is inside, isn't it?
>> >Here is another patch to display classname of cached object...
>> >
>> >And surprise, there is nothing in our Stores!
>> >When I request an Object by his key, I have nothing most of the
>> >time!
>>
>> Yes because default we're using the NonCachingxxxPiplines (I don't
>> know the reason, really!).
>> Change in the cocoon.roles the roles for StreamPipline and EventPipeline
>> to CachingStreamPipeline and CachingEventPipeline. Then it should
>> work proper.
>>
>> >Why does we store null values in MRUMemoryStores ?
>>
>> Don't know.
>
>With all thoses null values, finding a key is probably slower.
>
>
>--
>Sébastien Koechlin - IVision - skoechlin@ivision.fr
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
>For additional commands, email: cocoon-dev-help@xml.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Gerhard Froehlich <g-...@gmx.de>.
Sebastien,
>Gerhard Froehlich wrote:
>> 
>> >From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On
>
>[OT: your mailer is broken, it use wrong field]
>
>> >So I probably do not have the main StoreJanitor.
>> 
>> There is only one impl, yet ;-).
>> On my machine the StoreJanitorImpl initialize proper.
>>
>> >I'm going to write a static (synchronized) StoreJanitor to
>> >record any in-memory Store created.
>> >Is it a good solution, or is there something better ?
>> 
>> Why, the actual StoreJanitorImpl does this already. But maybe
>> I understood your question wrong.
>
>There is only one implementation, but I thought I got a new instance
>of it. I tested and it's ok, there is one and only one instance.

Yes because the StoreJanitorImpl implements the ThreadSafe interface. 
"A Component that implements this interface will generally only have 
one instance available in the system, and other Components will use
that one instance." (Avalon Developer Guide)

>
>> >Second:
>> >
>> >Everybody want to know what is inside, isn't it?
>> >Here is another patch to display classname of cached object...
>> >
>> >And surprise, there is nothing in our Stores!
>> >When I request an Object by his key, I have nothing most of the
>> >time!
>> 
>> Yes because default we're using the NonCachingxxxPiplines (I don't
>> know the reason, really!).
>> Change in the cocoon.roles the roles for StreamPipline and EventPipeline
>> to CachingStreamPipeline and CachingEventPipeline. Then it should
>> work proper.
>>
>> >Why does we store null values in MRUMemoryStores ?
>> 
>> Don't know.
>
>With all thoses null values, finding a key is probably slower.

Sorry through some other business I'm little bit off topic with
the caching and storing issues in Cocoon. But I will take a look,
soon!

Cheers
Gerhard

"Sex... the pleasure is momentry, the position ridiculous,
and the expense damnable.
(Lord Chesterfield)"



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Sebastien Koechlin <sk...@ivision.fr>.
Gerhard Froehlich wrote:
> 
> >From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On

[OT: your mailer is broken, it use wrong field]

> >So I probably do not have the main StoreJanitor.
> 
> There is only one impl, yet ;-).
> On my machine the StoreJanitorImpl initialize proper.
>
> >I'm going to write a static (synchronized) StoreJanitor to
> >record any in-memory Store created.
> >Is it a good solution, or is there something better ?
> 
> Why, the actual StoreJanitorImpl does this already. But maybe
> I understood your question wrong.

There is only one implementation, but I thought I got a new instance
of it. I tested and it's ok, there is one and only one instance.


> >Second:
> >
> >Everybody want to know what is inside, isn't it?
> >Here is another patch to display classname of cached object...
> >
> >And surprise, there is nothing in our Stores!
> >When I request an Object by his key, I have nothing most of the
> >time!
> 
> Yes because default we're using the NonCachingxxxPiplines (I don't
> know the reason, really!).
> Change in the cocoon.roles the roles for StreamPipline and EventPipeline
> to CachingStreamPipeline and CachingEventPipeline. Then it should
> work proper.
>
> >Why does we store null values in MRUMemoryStores ?
> 
> Don't know.

With all thoses null values, finding a key is probably slower.


-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by giacomo <gi...@apache.org>.
On Thu, 6 Dec 2001, Gerhard Froehlich wrote:

> >From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On
> >
> >
> >Sylvain Wallez wrote:
> >>
> >> Sebastien Koechlin a écrit :
> >> >
> >> > Here is a patch against cocoon_20_branch, I don't know if you can apply
> >> > it on HEAD (I did not test).
> >> >
> >> > Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
> >> > working, but eat huge quantity of memory, and displayed data are raw.
> >> > This is not for final administrators yet.
> >>
> >> Applied to 2.1, thanks.
> >> I modified it a bit to output SAX events directly instead of building
> >> large lists.
> >
> >Ok, I was not really proud of thoses lists.
> >
> >
> >> HEY, TEAM, can a cache guru look at this ? Why are there 3 stores with
> >> the same keys in them ?
> >
> >First :
> >
> >There is something wrong in my code, I have in logs:
> >DEBUG ... DefaultComponentFactory: ComponentFactory creating new
> >instance of org.apache.cocoon.generation.StatusGenerator.
> >DEBUG ... DefaultComponentFactory: no logger attribute available, using
> >standard logger
> >WARN  ... ExcaliburComponentManager: Looking up component on an
> >uninitialized ComponentManager:
> >org.apache.cocoon.components.store.StoreJanitor
> >
> >So I probably do not have the main StoreJanitor.
>
> There is only one impl, yet ;-).
> On my machine the StoreJanitorImpl initialize proper.
>
> >I'm going to write a static (synchronized) StoreJanitor to
> >record any in-memory Store created.
> >Is it a good solution, or is there something better ?
>
> Why, the actual StoreJanitorImpl does this already. But maybe
> I understood your question wrong.
>
> >
> >Second:
> >
> >Everybody want to know what is inside, isn't it?
> >Here is another patch to display classname of cached object...
> >
> >And surprise, there is nothing in our Stores!
> >When I request an Object by his key, I have nothing most of the
> >time!
>
> Yes because default we're using the NonCachingxxxPiplines (I don't
> know the reason, really!).

It seems that the CM is not using the class mentioned in the
cocoon.xconf. Insted it sticks this the default-class in the
sitemap.roles file.

Why is this??

Does anybody know why the default-class is preferred over the class in
the config? Shouldn't it be the other way around?

> Change in the cocoon.roles the roles for StreamPipline and EventPipeline
> to CachingStreamPipeline and CachingEventPipeline. Then it should
> work proper.

In my oppinion we should have to do that. The 2.0 branch does
correctly select the expected classes. Is it the newer avalon jar?

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: [PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Gerhard Froehlich <g-...@gmx.de>.
>From: skc@mailrelay2.ornis.com [mailto:skc@mailrelay2.ornis.com]On
>
>
>Sylvain Wallez wrote:
>>
>> Sebastien Koechlin a écrit :
>> >
>> > Here is a patch against cocoon_20_branch, I don't know if you can apply
>> > it on HEAD (I did not test).
>> >
>> > Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
>> > working, but eat huge quantity of memory, and displayed data are raw.
>> > This is not for final administrators yet.
>>
>> Applied to 2.1, thanks.
>> I modified it a bit to output SAX events directly instead of building
>> large lists.
>
>Ok, I was not really proud of thoses lists.
>
>
>> HEY, TEAM, can a cache guru look at this ? Why are there 3 stores with
>> the same keys in them ?
>
>First :
>
>There is something wrong in my code, I have in logs:
>DEBUG ... DefaultComponentFactory: ComponentFactory creating new
>instance of org.apache.cocoon.generation.StatusGenerator.
>DEBUG ... DefaultComponentFactory: no logger attribute available, using
>standard logger
>WARN  ... ExcaliburComponentManager: Looking up component on an
>uninitialized ComponentManager:
>org.apache.cocoon.components.store.StoreJanitor
>
>So I probably do not have the main StoreJanitor.

There is only one impl, yet ;-).
On my machine the StoreJanitorImpl initialize proper.

>I'm going to write a static (synchronized) StoreJanitor to
>record any in-memory Store created.
>Is it a good solution, or is there something better ?

Why, the actual StoreJanitorImpl does this already. But maybe
I understood your question wrong.

>
>Second:
>
>Everybody want to know what is inside, isn't it?
>Here is another patch to display classname of cached object...
>
>And surprise, there is nothing in our Stores!
>When I request an Object by his key, I have nothing most of the
>time!

Yes because default we're using the NonCachingxxxPiplines (I don't
know the reason, really!).
Change in the cocoon.roles the roles for StreamPipline and EventPipeline
to CachingStreamPipeline and CachingEventPipeline. Then it should
work proper.

>Why does we store null values in MRUMemoryStores ?

Don't know.

>
>Here is the StatusGenerator patch against HEAD.
>And an HTML page with StatusGenerator result using
>this patch.
>

-----------------------------------------------------
That must be wonderful! I don't understand it at all.
-----------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


[PATCH] working on Stores (Re: [PATCH] Re: Displaying status)

Posted by Sebastien Koechlin <sk...@ivision.fr>.
Sylvain Wallez wrote:
> 
> Sebastien Koechlin a écrit :
> >
> > Here is a patch against cocoon_20_branch, I don't know if you can apply
> > it on HEAD (I did not test).
> >
> > Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
> > working, but eat huge quantity of memory, and displayed data are raw.
> > This is not for final administrators yet.
> 
> Applied to 2.1, thanks.
> I modified it a bit to output SAX events directly instead of building
> large lists.

Ok, I was not really proud of thoses lists.


> HEY, TEAM, can a cache guru look at this ? Why are there 3 stores with
> the same keys in them ?

First :

There is something wrong in my code, I have in logs:
DEBUG ... DefaultComponentFactory: ComponentFactory creating new
instance of org.apache.cocoon.generation.StatusGenerator.
DEBUG ... DefaultComponentFactory: no logger attribute available, using
standard logger
WARN  ... ExcaliburComponentManager: Looking up component on an
uninitialized ComponentManager:
org.apache.cocoon.components.store.StoreJanitor

So I probably do not have the main StoreJanitor.

I'm going to write a static (synchronized) StoreJanitor to 
record any in-memory Store created.
Is it a good solution, or is there something better ?


Second:

Everybody want to know what is inside, isn't it?
Here is another patch to display classname of cached object...

And surprise, there is nothing in our Stores!
When I request an Object by his key, I have nothing most of the
time!

Why does we store null values in MRUMemoryStores ?


Here is the StatusGenerator patch against HEAD.
And an HTML page with StatusGenerator result using
this patch.

-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

RE: [PATCH] Re: Displaying status

Posted by Gerhard Froehlich <g-...@gmx.de>.
>From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
>
>Sebastien Koechlin a écrit :
>>
>> Peter Royal wrote:
>> > > Same problem, where are classes about caching ? I want to display what
>> > > is in the cache and the number of hit for each one.
>> >
>> > You want to be looking at the debug output from the CachingEventPipeline and
>> > the CachingStreamPipeline. Unfortunately it does not keep statistics on the
>> > cache hit rate, but if you look at the debug output you can see if it did
>> > pick up on the cached content or not.
>>
>> Here is a patch against cocoon_20_branch, I don't know if you can apply
>> it
>> on HEAD (I did not test).
>>
>> Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
>> working, but eat huge quantity of memory, and displayed data are raw.
>> This is not for final administrators yet.
>
>Applied to 2.1, thanks.
>I modified it a bit to output SAX events directly instead of building
>large lists.
>
>> What is inside:
>> - New iterator() function on StoreJanitor.
>> - Function added in StatusGenerator to display data in each store.
>> - Changes on status2html stylesheet to display thoses data.
>>
>> Request http://localhost:8080/cocoon/status to see the result.
>>
>> Using a vanilia cocoon_20_branch, you have 3 different MRUMemoryStore
>> (they have a different hashCode), with about 440 objects in each.
>> Except for 2 object, all keys are presents in each Store.
>> I think there is something wrong here. Is it my code ?
>
>Your code looks good.
>
>HEY, TEAM, can a cache guru look at this ? Why are there 3 stores with
>the same keys in them ?

For each CachexxxPipline (StreamStore, EventStore) you have an own Store,
because of that the StoreJanitor was introduced!

Cheers
Gerhard

-----------------------------------
Boren's Law: When in doubt, mumble.
-----------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [PATCH] Re: Displaying status

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

Sebastien Koechlin a écrit :
> 
> Peter Royal wrote:
> > > Same problem, where are classes about caching ? I want to display what
> > > is in the cache and the number of hit for each one.
> >
> > You want to be looking at the debug output from the CachingEventPipeline and
> > the CachingStreamPipeline. Unfortunately it does not keep statistics on the
> > cache hit rate, but if you look at the debug output you can see if it did
> > pick up on the cached content or not.
> 
> Here is a patch against cocoon_20_branch, I don't know if you can apply
> it
> on HEAD (I did not test).
> 
> Please, do NOT include it into cocoon_20_branch CVS on apache.org, it's
> working, but eat huge quantity of memory, and displayed data are raw.
> This is not for final administrators yet.

Applied to 2.1, thanks.
I modified it a bit to output SAX events directly instead of building
large lists.

> What is inside:
> - New iterator() function on StoreJanitor.
> - Function added in StatusGenerator to display data in each store.
> - Changes on status2html stylesheet to display thoses data.
> 
> Request http://localhost:8080/cocoon/status to see the result.
> 
> Using a vanilia cocoon_20_branch, you have 3 different MRUMemoryStore
> (they have a different hashCode), with about 440 objects in each.
> Except for 2 object, all keys are presents in each Store.
> I think there is something wrong here. Is it my code ?

Your code looks good.

HEY, TEAM, can a cache guru look at this ? Why are there 3 stores with
the same keys in them ?

Sylvain

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org