[Opensim-dev] Memory cache

diva at metaverseink.com diva at metaverseink.com
Wed May 27 14:39:48 UTC 2009


My hunch is the same as yours, i.e. that a file system cache is the 
right thing to do here. There's no point in holding on to assets in 
memory after they have been sent to clients, given how fast they can be 
retrieved from the file system when the next client comes along. Since 
this is all modularized now, this would be a great little project for 
someone who wants to get acquainted with OpenSim to do.

In any case, from looking at these issues of memory management it has 
become apparent that the cache is not the only one holding on to assets. 
Therefore even if the cache module is disabled, there is no noticeable 
gain in memory usage. There are plenty of opportunities to improve things...

Dahlia Trimble wrote:
>  >From a quick glance at the code it looks like it's keeping seldom used 
> objects in memory and increasing memory usage. This may be causing 
> portions of memory to swap out where they may not have before. When 
> retrieving the asset, it would need to swap it back in and it may have 
> to do it in several steps in order to locate the asset. This may cause 
> further delay as it may have to swap other memory out to make space. It 
> would seem likely that a file based cache may perform better as the 
> filename might provide a more direct route to the actual cache data. I 
> suspect that the operating system may also allow searching directories 
> for a filename fairly quickly - modern file systems are quite efficient 
> these days.
> 
> This is really just a guess... I suspect some benchmarking and profiling 
> of several systems of different configurations may be necessary to 
> determine what the bottleneck really is.
> 
> On Tue, May 26, 2009 at 3:52 PM, <diva at metaverseink.com 
> <mailto:diva at metaverseink.com>> wrote:
> 
>     I noticed we have GlynnTucker.Cache.dll in the distribution, and this
>     wasn't being used. I have no idea what the story is, but since it's
>     there, I did one alternative cache module implementation using it, just
>     to see what happens. Since everything is modularized now, replacing the
>     asset cache implementation is as simple as editing your XXXCommon.ini
>     and changing the name:
> 
>     ;AssetCaching = "CoreAssetCache"
>     AssetCaching = "GlynnTuckerAssetCache"
> 
>     I would still urge that someone figures out what's wrong with
>     OpenSim/Framework/Cache.cs, which is the one used in CoreAssetCache.
> 
>     The GlynnTuckerAssetCache has been tried in the UCI Grid and in some
>     sims in OSGrid and at least it's not being an anti-cache. Let's wait a
>     few more days to see if it's being a real cache; if so we should see
>     declines on the traffic to the asset servers :-)
> 
>     Arthur Valadares wrote:
>      > If we ran a profiling with this cache maybe we could see where the
>      > bottle neck is, couldn't we?
>      >
>      > Mono has simple statistical profiler that shouldn't be too intruding:
>      >
>      > $ mono --profile=default:stat program.exe
>      >
>      > If anyone who saw this performance loss could test this, would be
>      > interesting to see where it's spending all this extra time.
>      >
>      > On Tue, 2009-05-26 at 10:57 -0700, diva at metaverseink.com
>     <mailto:diva at metaverseink.com> wrote:
>      >> Just a quick note to inform everyone that word from osgrid folks
>      >> indicates that the asset cache is still borked and still a
>     mystery. When
>      >> it is on, CPU usage spikes to unsustainable values (150% with 4
>     avies in
>      >> WP).
>      >>
>      >> If anyone cares to take a look at it / replace it with something
>     else,
>      >> please do.
>      >>
>      >> OpenSim/Framework/Cache.cs
>      >> _______________________________________________
>      >> Opensim-dev mailing list
>      >> Opensim-dev at lists.berlios.de
>     <mailto:Opensim-dev at lists.berlios.de>
>     <mailto:Opensim-dev at lists.berlios.de
>     <mailto:Opensim-dev at lists.berlios.de>>
>      >> https://lists.berlios.de/mailman/listinfo/opensim-dev
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Opensim-dev mailing list
>      > Opensim-dev at lists.berlios.de <mailto:Opensim-dev at lists.berlios.de>
>      > https://lists.berlios.de/mailman/listinfo/opensim-dev
>     _______________________________________________
>     Opensim-dev mailing list
>     Opensim-dev at lists.berlios.de <mailto:Opensim-dev at lists.berlios.de>
>     https://lists.berlios.de/mailman/listinfo/opensim-dev
> 
> 



More information about the Opensim-dev mailing list