cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Froehlich" <g-froehl...@gmx.de>
Subject RE: [C2] Performance Tuning - cache in memory or on disk
Date Mon, 11 Feb 2002 00:35:30 GMT
Vadim,

>> >> I'm like a blind man tuning a television!
>> >>
>> >> I understand from the documentation that I can tune the setting in
>> >> cocoon.xconf to control the cache, so that the most recently used 
>> >> objects are in
>> >> memory and less recently used objects are on disk. But a 
>> >> few points are unclear
>> >> to me could someone please expain?
>> >>
>> >>   <cache-transient
>> >>  class="org.apache.cocoon.components.store.MRUMemoryStore"
>> >> logger="core.store.transient">
>> >>    <parameter name="maxobjects"           value="100"/>
>> >>    <parameter name="use-persistent-cache" value="true"/>
>> >>   </cache-transient>
>> >>
>> >> 1) Does 'maxobject' just define the max number of objects in
>memory?
>> >> Or does it include the items on disk?
>> >
>> >Only in memory. When new object added and count increases over max,
>> >least recent used object is swapped to the persistent cache (read:
>hard
>> >drive)
>> 
>> Correct.
>> 
>> >> 2) When <parameter name="use-persistent-cache" value="true"/> do
>the
>> >> cached objects go onto disk only when maxobjects is exceeded?
>> >
>> >Yes, as of currect CVS. No for the 2.0.1.
>> 
>> Ahem yes of course for the 2.01 version too, or did I missed something
>> here. That's only a flag. You answered this question in #1...or did
>> I drunk to much beer tonight ;).
>
>In 2.0.1 (IIRC) they go to disk directly. Or this was in 2.0?
>(I had a Titanic Tea, and it had not only ice and tea in it)

Ah yes. Sometimes I have troubles with the wording. Now it's clear 
what you mean. Yes it goes only to disk directly!
(Hmm Titanic Tea is this same as Long Island Ice Tea?)

> 
>> >> 3) Is there any control over the number of objects on the disk?
>> >
>> >No. Persistent cache does not have such controls. You can extend its
>> >implementation if you like.
>> 
>> Correct, no control. Maybe we can implement something with the new
>> Jisp based Filesystem store. It's possible to control the size of the
>> dat file.
>
>That's interesting. Btw, how to enumerate through entries there? I think
>this method is not implemented yet in store.

Ahem you have to traverse the B-Tree somehow. Didn't looked in it yet. But
should be possible...

> 
>> >> 4) When the store-janitor decides to free memory, do the freed
>items
>> >> go to persistent-cache or are they lost?
>> >
>> >Depends on store implementation. MRU store in the CVS uses persistent
>> >cache to swap exceeding objects. Janitor does not care what store
>does
>> >with extra objects.
>> 
>> Again, I only see the main difference from 2.01 and CVS in the Jisp
>based
>> Filesystem Store component. Can you enlighten me, Vadim?
>
>Sure! MemoryStore just ignores commands from Janitor. I was hinting that
>MRUMemoryStore is not *the* store, other implementations are also
>possible.

Ahh yes I see, sorry for starting confusion...

  ~Gerhard

"God put me on this Earth to accomplish a certain number of things. 
Right now, I am so far behind I shall never die."


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message