commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Froehlich" <>
Subject RE: [simplestore] enhancements (was: [simplestore] inital check in)
Date Thu, 17 Jan 2002 10:32:58 GMT

>>When the number of items reaches a set maximum, I'd like to remove the
>>reference to them from the hashtable and spool them to disk.  Reaching
>>the set item number limit, the cache should overflow onto disk.  It is a
>>rough swap that's all.
>>This technique doesn't endlessly leak memory.

>I believe your OS does this job "Virtual Memory Management", no JVM no
>application must do this.
>It is impossible for OS to do this if JVM  allocates not moveable memory,
>believe it don't.
>I think it is not very meaningful to dublicate OS functionality in JAVA
>application, It can be meaningful
>if single application with single thread runs on your machine.

Maybe I understand you wrong, but look at this:
In the Cocoon project we have 2 stores a) MRUMemoryStore for quick access
and b) JispFilesystemStore for -well- swapping. Why? Because we store/cache
generated data (xml -> xslt -> html or fop or ...) in the cache. Generating
this data is very expensive.

For i.e you have a limit in the MRUMemoryStore for about 200 objects. When
limit is reached we swap out the oldest object down to the Filesystem. The
key word here is generated data. When we don't do this, then we have
to generate this object new, which is very CPU and Memory expensive! So we
introduced this swapping. But it is more application depend!


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message