Answer by Federico for Caching/preloading files on Linux into RAM
Not exactly what was asked, but I use find BASE_DIRECTORY -type f -exec cat {} >/dev/null \;to trigger initialization of files in an AWS volume created from a snapshot. It's more focused than the...
View ArticleAnswer by Highstaker for Caching/preloading files on Linux into RAM
Sometimes I may want to cache files in a certain folder and its subfolders. I just go to this folder and execute the following:find . -exec cp {} /dev/null \;And those files are cached
View ArticleAnswer by ewwhite for Caching/preloading files on Linux into RAM
This is also possible using the vmtouch Virtual Memory Toucher utility.The tool allows you to control the filesystem cache on a Linux system. You can force or lock a specific file or directory in the...
View ArticleAnswer by Petr for Caching/preloading files on Linux into RAM
There are two kernel settings that can help considerably even without using other tools:swappinesstells linux kernel how aggressively it should use swap. Quoting the Wikipedia article:Swappiness is a...
View ArticleAnswer by seeker for Caching/preloading files on Linux into RAM
vmtouch seems like a good tool for the job.Highlights:query how much of a directory is cachedquery how much of a file is cached (also which pages, graphical representation)load file into cacheremove...
View ArticleAnswer by user50472 for Caching/preloading files on Linux into RAM
i use find / -name stringofrandomcharacterit helps alot
View ArticleAnswer by Bogus Name for Caching/preloading files on Linux into RAM
i just tried dd if=/dev/yourrootpartition of=/dev/null \ bs=1Mcount=howmuchmemoryyouwanttofillit does not give me the control that you desire but it at least tries to use wasted memory
View ArticleAnswer by Justin for Caching/preloading files on Linux into RAM
http://www.coker.com.au/memlockd/ does thisthough you really don't need it, linux will do a pretty good job of caching the files you are using on its own.
View ArticleAnswer by osgx for Caching/preloading files on Linux into RAM
Desktop computers (eg. ubuntu) already uses preloading files (at least, popular shared libraries) to memory on boot. It is used to speed up booting and startup time of different bloarware like FF, OO,...
View ArticleAnswer by Brad Gilbert for Caching/preloading files on Linux into RAM
You may be able to have a program that just mmaps your files then stays running.
View ArticleAnswer by Kyle Brandt for Caching/preloading files on Linux into RAM
I think this might be better solved at the application level. For instance, there are probably specialized web servers for this, or you might consider mod_cache with Apache. If you have a specific...
View ArticleAnswer by Andrioid for Caching/preloading files on Linux into RAM
After some extensive reading on the 2.6 kernel swapping and page-caching features I found 'fcoretools'. Which consists of two tools;fincore: Will reveal how many pages the application has stored in...
View ArticleAnswer by Thorbjørn Ravn Andersen for Caching/preloading files on Linux into RAM
If you have plenty of memory you can simply read in the files you want to cache with cat or similar. Linux will then do a good job of keeping it around.
View ArticleAnswer by sybreon for Caching/preloading files on Linux into RAM
As for your latter question, ensure that your RAM is sitting on different memory channels so that the processor can fetch the data in parallel.
View ArticleAnswer by cagenut for Caching/preloading files on Linux into RAM
A poor man's trick for getting stuff into the filesystem cache is to simply cat it and redirect that to /dev/null.This is an example:-cat /path/myfile.db > /dev/null
View ArticleAnswer by David Pashley for Caching/preloading files on Linux into RAM
Linux will cache as much disk IO in memory as it can. This is what the cache and buffer memory stats are. It'll probably do a better job than you will at storing the right things.However, if you insist...
View ArticleAnswer by Daniel Lawson for Caching/preloading files on Linux into RAM
There are various ramfs systems you can use (eg, ramfs, tmpfs), but in general if files are actually being read that often, they sit in your filesystem cache. If your working set of files is larger...
View ArticleAnswer by Zan Lynx for Caching/preloading files on Linux into RAM
I very much doubt that it is actually serving files from the disk with 3 GB RAM free. Linux file caching is very good.If you are seeing disk IO, I would look into your logging configurations. Many logs...
View ArticleCaching/preloading files on Linux into RAM
I have a rather old server that has 4GB of RAM and it is pretty much serving the same files all day, but it is doing so from the hard drive while 3GBs of RAM are "free".Anyone who has ever tried...
View Article