Speeding up SL with a RAMDisk
If you’re running Windows, have more than 8GB of memory and a multi core CPU you can give SL a bit of a boost by placing the Cache into a ram drive. This can also extend the life of your hardware if your computer uses a SSD.
Just finished putting up a tutorial showing how to do this using the free persistent RAMDisk software from Dataram. There are a couple of caveats but on the whole it does seriously boost rezzing times in locations you have previously visited.
I plan to do something similar for Linux in the near future.


Thank you so much for heads-up and the very clear tutorial.
One question, though. After I’ve successfully set up my RAMDisk with Dataram, what to I do if I want to increase the amount of memory I want to allocate to it? I’m using Windows 7.
Delete the RAMDisk img file and create a bigger one from scratch.
The freewavre version supports up to 4GB.
Yes, please, I’d like to see how this is done in Linux.
In Linux, ramdisk is usually enabled by default and mounted on /dev/shm.
Just select a subdirectory of /dev/shm as your viewer cache.
However I am skeptical whether it is really useful (benchmarking needed).
Indeed:
- Linux automatically caches into RAM frequently used files, so only first reads would be slow (cache misses), provided your RAM size is big enough;
- and also the viewer might already cache its stuff into RAM (not sure how much though).
Another reason not to use /dev/shm is that there will be no persistence.
Note that my remarks would also be true for Windows. So, does that mean that Dataram has a more efficient/agressive caching algorithm than the default one of Windows kernel?
How would it compare to Linux’s one?
SL is exceptionally difficult to benchmark, there is a huge processing overhead attached to everything that is often over looked. As far as what it keeps in memory – only what the region you’re standing on tells it to. Don’t for one second imbue the SL client with any kind of smarts.
This is visually faster for repeat visits to locations or if you spend a lot of time on the same region (remember that part about the viewer being dumb .. yes .. if the region tells it for forget a texture it will, even if you’re sat on it).
Kernel file caches for frequently used files …. should be your clue right there – SL Cache files are not individually frequently used or accessed.
The dataram cache is persistent , contents are saved periodically and at shutdown. A Linux solution based purely on /dev/shm isn’t a really a solution.
How frequently used are files cached by Linux kernel is very relative.
No matter the caching policy, when you have 8GB of RAM, it is not uncommon to have several gigs of cached files. I would be surprised if they all were of very “frequent” use.
Also, any reasonable policy also takes into account how recently a block was used (extreme case being LRU policy). I don’t know what exact policy the linux kernel uses nowadays. Maybe you have references ? (citation needed
).
Coming back to /dev/shm, for persisency you can use a synchronization program (rsync?), run as a crontab job and at shutdown. So, everything is already there
.
Instaled and working flawless:)
1 question remains, i can only set 1 viewer pointing to it? I mean i use several diff viewers so only one can use the ram disk?
The caches of different viewers probably wont be compatible.