Re: StoreJanitor (was: Re: Moving reduced version of CachingSource to core | Configuration issues)

2007-04-05 Thread Vadim Gritsenko
Ard Schrijvers wrote: 1) How it works and its intention (I think :-) ): The StoreJanitor is originally invented to monitor cocoon's memory useage and does this by checking some memory values every X (default 10) seconds. Beside the fact that I doubt users know that it is quite important to

Re: StoreJanitor

2007-04-05 Thread Vadim Gritsenko
Reinhard Poetz wrote: I wonder what StoreJanitor is good for at all. EHCache takes care that the number of items in the memory cache doesn't grow indefinitly and starts its own cleanup threads for the disc store (http://ehcache.sourceforge.net/documentation/storage_options.html#DiskStore).

Re: StoreJanitor

2007-04-05 Thread Vadim Gritsenko
Ard Schrijvers wrote: Yes, this is exactly my point. The extra problem is that the StoreJanitor never has access to the eviction policy of the cache, and just starts throwing out entries at random. That's incorrect statement. I'd say that StoreJanitor always has access to the eviction policy,

RE: StoreJanitor

2007-04-05 Thread Ard Schrijvers
Ard Schrijvers wrote: Yes, this is exactly my point. The extra problem is that the StoreJanitor never has access to the eviction policy of the cache, and just starts throwing out entries at random. That's incorrect statement. I'd say that StoreJanitor always has access to the

RE: StoreJanitor

2007-04-05 Thread Ard Schrijvers
IIUC, EHCache allows you to set only the number of items in cache, and not the maximum amount of memory to use, or minimum amount of free memory to leave. true (but the cache can't know the size of objects it gets stuffed with (you say it is possible with java 1.5? ) ) In other

Re: StoreJanitor

2007-04-05 Thread Vadim Gritsenko
Ard Schrijvers wrote: Ard Schrijvers wrote: Yes, this is exactly my point. The extra problem is that the StoreJanitor never has access to the eviction policy of the cache, and just starts throwing out entries at random. That's incorrect statement. I'd say that StoreJanitor always has

RE: StoreJanitor (was: Re: Moving reduced version of CachingSource to core | Configuration issues)

2007-04-05 Thread Ard Schrijvers
Vadim, I think you are reasoning from a POV of the cocoon cache, but I think you are in the minority compared to the number of users which are using EHCache. I tried to explain the inevitable OOM of the StoreJanitor in combination of EHCache and the event registry in a high volume site.

RE: StoreJanitor

2007-04-05 Thread Ard Schrijvers
Strictly speaking, you don't need access to the eviction policy itself - but only some exposed method on Store, something like purgeLastElementAccordingToEvictionPolicy -- can't they add something like that? I of course did ask this, because this is obviously the way to go:

Re: StoreJanitor

2007-04-05 Thread Vadim Gritsenko
Ard Schrijvers wrote: IIUC, EHCache allows you to set only the number of items in cache, and not the maximum amount of memory to use, or minimum amount of free memory to leave. true (but the cache can't know the size of objects it gets stuffed with (you say it is possible with java 1.5? ) )

Re: StoreJanitor (was: Re: Moving reduced version of CachingSource to core | Configuration issues)

2007-04-05 Thread Vadim Gritsenko
Ard Schrijvers wrote: Vadim, I think you are reasoning from a POV of the cocoon cache, but I think you are in the minority compared to the number of users which are using EHCache. Yes because it is stable and works better and at the time I last looked into it JCS was really not an option

RE: StoreJanitor (was: Re: Moving reduced version of CachingSource to core | Configuration issues)

2007-04-05 Thread Ard Schrijvers
Configurable Store registration with StoreJanitor alleviates somewhat that problem, but not solves completely as you still have to properly configure all your cache sizes correctly to avoid OOM. I think you can try combining Cocoon's MRU cache and EHCache to get best of both

Re: StoreJanitor

2007-04-05 Thread Vadim Gritsenko
Ard Schrijvers wrote: Strictly speaking, you don't need access to the eviction policy itself - but only some exposed method on Store, something like purgeLastElementAccordingToEvictionPolicy -- can't they add something like that? I of course did ask this, because this is obviously the way

RE: StoreJanitor

2007-04-04 Thread Ard Schrijvers
Reinhard Poetz wrote: P.S. Ard, answering to your mails is very difficult because there are no I am very sorry...I hardly dare saying i am using outlook :-) I'll try to find a way in the stupid program for linebreaks or make the switch to Thunderbird. Ard line breaks. Is

RE: StoreJanitor

2007-04-04 Thread Ard Schrijvers
AFAICS there are two freeing algorithms in trunk: round-robin and all-stores. I already thought it would be something like this /snip and this is IMO one of the major weakenesses of ehcache (or I missed it completely), I did not find any way to limit the number of disk store

Re: StoreJanitor

2007-04-04 Thread Reinhard Poetz
Ard Schrijvers wrote: snip/ - introduce a maxPersistentObjects parameter and use it in EHDefaultCache to set maxElementsOnDisk +1 that's easy - make the registration of stores at StoreJanitor configureable (Though I wonder what the default value should be, true or false?) 0 : I

RE: StoreJanitor

2007-04-04 Thread Ard Schrijvers
I suggest that we don't register them at StoreJanitor by default anymore but make it configureable for users who rely on it in their custom Store implementations/configurations. +1 AFAIU, StoreJanitor only runs if at least one store is registered so we don't have to remove it.

Re: StoreJanitor

2007-04-04 Thread Reinhard Poetz
Ard Schrijvers wrote: yes please, I would be interested in more comments too! Are more comments like in wiki or in the cocoon.xconf more comment for different configurations? I can try to write extended documentation on what IMO is best for configuration, and tricks to avoid the

Re: StoreJanitor

2007-04-04 Thread Peter Hunsberger
On 4/4/07, Reinhard Poetz [EMAIL PROTECTED] wrote: Ard Schrijvers wrote: yes please, I would be interested in more comments too! Are more comments like in wiki or in the cocoon.xconf more comment for different configurations? I can try to write extended documentation on what IMO is best

RE: StoreJanitor

2007-04-04 Thread Ard Schrijvers
On 4/4/07, Reinhard Poetz [EMAIL PROTECTED] wrote: Ard Schrijvers wrote: yes please, I would be interested in more comments too! Are more comments like in wiki or in the cocoon.xconf more comment for different configurations? I can try to write extended documentation on what

Re: StoreJanitor

2007-04-04 Thread Peter Hunsberger
On 4/4/07, Ard Schrijvers [EMAIL PROTECTED] wrote: On 4/4/07, Reinhard Poetz [EMAIL PROTECTED] wrote: Ard Schrijvers wrote: yes please, I would be interested in more comments too! Are more comments like in wiki or in the cocoon.xconf more comment for different configurations?

RE: StoreJanitor (was: Re: Moving reduced version of CachingSource to core | Configuration issues)

2007-04-03 Thread Ard Schrijvers
Hello, Ard Schrijvers wrote: i would be glad to share the code and my ideas, for example about this whole StoreJanitor idea :-) ) Just curious, what did you mean by this whole StoreJanitor idea? Before I say things that are wrong, please consider that the StoreJanitor was invented

RE: StoreJanitor (was: Re: Moving reduced version of CachingSource to core | Configuration issues)

2007-04-03 Thread Ard Schrijvers
/snip ?? my mail got sended by accident :Sfinishing it now be implemented quite easily, but might take long start up times) 6) JCSCache has a complex configuration IMO. Therefor, I added default configurations to choose from, for example: store logger=core.store parameter

Re: StoreJanitor

2007-04-03 Thread Reinhard Poetz
Ard Schrijvers wrote: Before I say things that are wrong, please consider that the StoreJanitor was invented long before I looked into the cocoon code, so probably a lot of discussion and good ideas has been around which I am not aware of. But still, my ideas about the StoreJanitor (and sorry

Re: StoreJanitor

2007-04-03 Thread Reinhard Poetz
Reinhard Poetz wrote: P.S. Ard, answering to your mails is very difficult because there are no line breaks. Is anybody else experiencing the same problem or is it only me? Jörg pointed me to the rewrap function of Thunderbird. Using it fixes all my problems with never ending lines. Thanks