cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: StoreJanitor new calculation [was: Re: Store Janitor Hangs System]
Date Tue, 05 Feb 2002 01:09:10 GMT
> From: Peter Hargreaves [mailto:pdhargr@netscape.net]
> 
> Hi Vadim,
> 
> vadim.gritsenko@verizon.net wrote:
> 
> >>From: Peter Hargreaves [mailto:pdhargr@netscape.net]
> >>
> >>*) If the percent to reduce storage is set to 10%, it fails to
remove
> >>any when the number of items are below 10. The number of items to be
> >>removed needs rounding upwards. Why not remove a fixed number of
items
> >>instead of a percentage? (My idea and now I think it was wrong!!)
> >>
> >
> > +1 on rounding up,
> > -1 on removing percentage. Applications highly differ on number of
> > objects and average size of the object. Percentage gives the
advantage
> > to have generic configuration. If this is not over-configuration,
number
> > of objects to remove may be configured with or without percent sign:
> >
> >   <parameter name="reduceby" value="10%"/>
> >   <parameter name="reduceby" value="100"/>
> 
> 
> My thinking is this. Ideally you want to remove a defined number of
> bytes from the stores. If you can guess the average size of an item
then
> by removing a defined number of items you are removing an approximate
> number of bytes.

That's when you tune for one particular application - then yes. If you
try to put something that works well when you have 200 huge objects, and
when you have 20000 tiny one - I think defined number won't work. What
can you suggest here? I hoped that percentage may work for these
situations.

 
> When I tried removing a percentage, I found that successive attempts
> freed up less and less storage 

This makes sence, I did not thought of it this way...

> then my system ran out of memory before the store was empty.

...but on the other hand: it means that you have leaks in some other
place! May be you will want to find them first before blaming memory
store ;)
It may be not leaks, but uncontrolled memory consumption by some
business logic of your site. Then why not just increase free-memory
parameter to factor in these requirements?


> The trouble with convincing people is that you have to unconvince them
> if you change you mind ;-)

:)


> >>Ideally - low memory should be detected by some sort of interrupt or
> >>exception rather than by polling.
> >>
> >
> > AFAIK, when you get an exception it's already late to take any
action.
> 
> Ah, but what about the undo command. Or the retrospective exception
> handler. You know the one I mean - "It was left at that previous
junction".
> 
> Seriously though. Are there any plans for java to include a mechanism
> that tells folks when memory is getting low. Surely lots of people
have
> this problem.

Don't know. Search bug database - may be there is already couple of
requests in there.

Regards,
Vadim


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


Mime
View raw message