Preload Drastically Boosts Linux Performance 144
Nemilar writes "Preload is a Linux daemon that stores commonly-used libraries and binaries in memory to speed up access times, similar to the Windows Vista SuperFetch function. This article examines Preload and gives some insight into how much performance is gained for its total resource cost, and discusses basic installation and configuration to get you started."
LiveCDs do this... (Score:4, Informative)
Comment removed (Score:5, Informative)
Nice but... (Score:5, Informative)
Re:Nice but... (Score:5, Informative)
Re:But I thought Vista doing it = RAM hogging? (Score:1, Informative)
Re:But I thought Vista doing it = RAM hogging? (Score:5, Informative)
Linux handles having lots of RAM a lot better than Windows (XP) does, because of differences in the way the caching system was designed. Linux (and OS X) was intended to run entirely from RAM and use little swap. I've run, say, OpenOffice once, not used it for several weeks, and the next time I start it it loads almost instantly, because it was still sitting in the cache. My machines have 2GB of RAM, with much less than 500MB actually in use - the remaining 1.5GB is being used as disk cache. Swap usage is either zero, or very close. Of course, performance goes to hell if you do something that flushes the disk cache, or if you try using such a system on a machine with 256MB of RAM.
Windows, on the other hand, was designed to run almost entirely from swap, and tends to drop stuff from the disk cache when it's not been used in a while, as well as moving stuff out to swap rather aggressively. That works great if you barely have enough RAM to run the OS, but it's terribly wasteful if you have more than enough RAM. In this case, SuperFetch is actually useful, allowing it to catch up to and actually surpass Linux, by monitoring which files are actually used and making sure they're already in the disk cache.
That's great, although nothing new. Other OSes have had this for years (this Linux implementation dates back to 2005, Mac OS X has had it for ages, and neither implementation was original) - Microsoft were just the first to brand it.
TFA said nothing about Vista's implementation.
I think the primary problem people have with Microsoft's implementations is that they're typically very complicated, and have a tendency to degrade over time. XP is the typical whipping boy for this - none of the self-maintaining performance stuff (prefetching, or the prelinker) actually works for longer than about six months, meaning that an XP installation starts off fast, gradually gets faster, and then rapidly slows down as the system tries to speed itself up.
Blogspam (Score:5, Informative)
Re:But I thought Vista doing it = RAM hogging? (Score:1, Informative)
Re:What, what? (Score:5, Informative)
Re:LiveCDs do this... (Score:2, Informative)
It felt like I was running XP on a machine with the minimum specs and running bloated software. Even the mouse was jerky.
Something's not right there. Puppy's normally responsive on machines that'd be slow with 98SE.
Re:LiveCDs do this... (Score:3, Informative)
Re:ramdisk (Score:3, Informative)
Re:LiveCDs do this... (Score:4, Informative)
Re:What, what? (Score:4, Informative)
Not really. Caching policies like this have been around for longer than Windows has even existed. Most of the things that Linux "adopts" from Windows or Macintosh originally came from UNIX or mainframes. Even in 2008, there is hardly an original idea in any of those operating systems. And preload itself is, of course, older than Vista.
You can be mad at Vista for a number of reasons, but SuperFetch is not one of them - I have noticed a decent speed improvement because of it, and look forward to having something similar in Linux.
It's not clear to me why this should be a separate user process; what it's doing is simple enough that whatever is doing can be done directly by the kernel. In fact, I wouldn't be surprised if you could get the same speedups by simply tuning a couple of kernel parameters.
eeepc + preload = less waiting, more performance! (Score:3, Informative)
Re:LiveCDs do this... (Score:5, Informative)
The thing that eats all your RAM is nothing Linux specific at all, it is your applications asking for more RAM than they are currently going to use. Why should they do such a thing? Well, what do you think memory management would look like if hundreds of apps, daemons and kernel threads ask for two bytes at a time? It'd paint a pretty fragmented picture, so they ask for gobs of pages at a time. Pages seldom touched get swapped out, but still there's an awesome amount of overallocation - thus your memory seems to be 100% allocated 100% of the time.
So, preloading libs that are frequently used is probably going to use your RAM in a more meaningful way unless you already have a problem with constant swapping.
Re:is toram parameter really faster? (Score:3, Informative)
Even if your particular LiveCD is set to watch for and automatically use swap partitions, a HD is still significantly faster than an optical drive. If you install Linux permanently to your HD those particular kernel switches no longer do anything.
Re:LiveCDs do this... (Score:3, Informative)
Another benefit, and I'm not sure if Preload does this, is to arrange the files on the HD so they are not fragmented, and are in the same position on the disk, so that a single (or small number of) read can copy everything into RAM, instead of hitting the disk over and over.
Re:LiveCDs do this... (Score:3, Informative)
Re:LiveCDs do this... (Score:3, Informative)
Take a look at "Understanding the Linux Kernel" from ORA for 2 excellent chapters on how all this works.