Slashdot Mirror


Preload Drastically Boosts Linux Performance

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."

144 comments

  1. LiveCDs do this... by SaidinUnleashed · · Score: 4, Informative

    This is exactly why live CDs like Damn Small Linux (and Knoppix, if you have a ton of ram) run so fast if you load the CD image to ram. Ram is fast!

    --
    Shiny. Let's be bad guys.
    1. Re:LiveCDs do this... by calebt3 · · Score: 1

      I haven't tried DSL or Knoppix lately, but Puppy was terrible. It felt like I was running XP on a machine with the minimum specs and running bloated software. Even the mouse was jerky.

    2. Re:LiveCDs do this... by ozmanjusri · · 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.

      --
      "I've got more toys than Teruhisa Kitahara."
    3. Re:LiveCDs do this... by calebt3 · · Score: 1

      Maybe it's because it was on a new machine? I know that DBAN has (had) some issues with speed on Intel Core 2 Duo machines. Maybe Puppy suffers from the same problem?

    4. Re:LiveCDs do this... by ozmanjusri · · Score: 2, Informative

      Puppy's like lightning on my Core 2 laptop. If the mouse is lagging, I'd suspect the graphics card/driver. Try selecting a different Vesa mode next time you boot and see what happens.

      --
      "I've got more toys than Teruhisa Kitahara."
    5. Re:LiveCDs do this... by ILuvRamen · · Score: 1

      Hey I ran Knoppix on my PC when it temporarily had 3 GB of ram and it still lagged on menu loads and stuff. I couldn't figure out how to get it to keep loading stuff into memory and leave it there longer. Then again I don't know linux very well. If you know of a way, please share.
      Anyway, back to the article. This is an expecially good idea because these days you can put in 4 GB of PC5300 on up for around $100 from newegg and probably never use half of it. I ran oblivion while burning a DVD and a lot of background stuff running and only used about 1.5 GB of ram. But that was on XP and its memory management is retarded. If you've got 3 GB of open ram, it will still keep right on caching stuff to the hard drive. It's about time someone developed a way to use all the ram we've got!

      --
      Google's Super Secret Search Algorithm: SELECT @search_results FROM internet WHERE @search_results = 'good'
    6. Re:LiveCDs do this... by Anonymous Coward · · Score: 4, Informative

      Make sure you pass the "toram" parameter when you boot the livecd at the kernel load prompt. You can press the various function keys at boot time to find the correct method.

    7. Re:LiveCDs do this... by tacocat · · Score: 3, Insightful

      Several things come to mind when I read the post.

      I thought Linux cached used libraries in RAM already, resulting in the appearance that Linux was always using up all my memory but wasn't really. If true, then this basically does what? Guesses what you want to use and loads them for me? Decides what I use a lot and makes certain they never fall out of memory? In both cases, someone is not using my resources in an optimum manner.

      If I use the price of my first desktop computer and use that to purchase a new computer at Dell I am moving up 40 times in speed, 2x in architecture buss, 4x in cores, blah blah blah. Compared to the last computer (2006) I purchased I can still get something easily double in performance from that.

      So, Not sure what you need in performance, but between the stupid amount of computing power and Linux already doing a lot of in-memory caching there might be a pretty small margin for improvement. But I guess what I really struggle with is the idea of someone/something trying to proactively determine what I'm going to use and then force my computer into a certain behavioural pattern that is making assumptions about my use. Sure, it screams marketing demographics, but even without a PR department for Linux I still don't think there is sufficient need for something like this.

      Can someone elaborate on practical reasons where this is something I would really need

    8. Re:LiveCDs do this... by Ibn+al-Hazardous · · Score: 5, Informative

      You start with a false presumption. I do not know what distro you use, and can't tell you if that does anything nifty - but "Linux" sure as hell does not do this already. If another app has already loaded as shared library, it may well be in RAM but it can just as well be swapped out. For all other cases, the answer is probably that your shared libraries are not cached or preloaded - and so this will give you quite a speed up.

      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.

      --
      Yes, I am a biological organism. All rumors to the contrary are just that, rumors.
    9. Re:LiveCDs do this... by joto · · Score: 3, Insightful

      I disagree with both of you. There should not be a need for this. Linux memory management should be closer to optimal for desktop users, but unfortunately the current strategy just doesn't work. It's optimized for servers, paging out interactive apps whenever there's something going on in the background.

      In particular, the locatedb daemon makes everything unresponsive because linux caches every file on your file-system it touches, even though it's pretty much guaranteed nobody else needs those files anytime soon. This may be theoretically "optimal" in the general case, but it certainly doesn't feel that way for desktop users. Most desktop users would be more than happy to have background jobs run slower if it didn't impact responsitivity. Also, I believe many people would prefer predictive response-times; it's better for the disk to churn while loading a huge file, instead of it churning everywhere else to page in libraries that have been paged out because the huge file is in memory.

      Adding a daemon to predict shared library usage is a step in the wrong direction. Not because it doesn't fix the problem, unfortunately I haven't tried it, but sure, it might even work fantastic. It's a step in the wrong direction because it's a kludge, and not a proper fix for having memory management strategies in the kernel that the users actually want. Unfortunately, fixes to this problem are hard to do, and every time someone tries to do a proper fix, it is debated to death on the kernel mailing list, and then dies slowly as it ages out of tree. For all I know, it's also the right decision, if it should be in-kernel, it should also be *right*. A daemon might be a better place to experiment, and hell, if it solves the problem for 99% of the users, we might not even need to change the current strategy, which is certainly right for servers. After all, we live with kludges other places, such as the X Window System needing to be root and accessing raw kernel memory.

      But yeah, memory management is complicated. I doubt you can solve this on a piece of paper. If it works, I'm all for it! Maybe this is a proper kludge?

    10. Re:LiveCDs do this... by complete+loony · · Score: 1

      The moment you start running something, preload all libraries this process is known to reference? That way it doesn't matter if the application blocks on each library being loaded.

      Though I am pulling this out of my ass.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
    11. Re:LiveCDs do this... by mhall119 · · Score: 2, Informative

      I thought Linux cached used libraries in RAM already, resulting in the appearance that Linux was always using up all my memory but wasn't really Linux uses a disk cache in RAM to keep from re-hitting the HD for often-accessed files. It actually is using up all your memory that hasn't been allocated to an application (which is good, because unused memory is wasted memory), but it will drop some disk cache space when other applications need more memory.

      If true, then this basically does what? Guesses what you want to use and loads them for me? Essentially, yes. On of the bigger bottlenecks to application startup is disk seek/read times. By performing this action in the background before it is requested, you won't hit that lag time. The new versions of Java are doing something similar to speed up the cold-start time for Java apps.

      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.
      --
      http://www.mhall119.com
    12. Re:LiveCDs do this... by EvilRyry · · Score: 2, Informative

      The kernel already supports hinting like this. Indexing programs should throw the kernel the hint that the files it reads should not be cached. Whether the programs actually do this or not is another matter.

    13. Re:LiveCDs do this... by sxeraverx · · Score: 1

      Dude...It's called a fork. Make one already. It's not that hard. Who knows, maybe someone else will actually use it.

    14. Re:LiveCDs do this... by The+Mighty+Buzzard · · Score: 3, Interesting

      Unless you're still coming from the Windows mindset where you're used to closing an application after every use of it, preload isn't of much use at all. If you never close an application, startup time is not an issue. The firefox window I'm posting this response from now has an uptime longer than any windows box with automatic updates turned on and is only clocking in at 118M/22M resident/shared. I could possibly see it being of some use if you actually open and close OO.o regularly (it's a slow, bloated beast even by Microsoft standards) but that's an argument against OO.o not an argument in favor of preload.

      This is linux, people. We like tiny apps that require almost zero load time that you can chain together with pipes. Catering to bloated, poorly coded, Microsoftesque apps shouldn't be an issue for us.

      --
      Violence is like duct tape. If it doesn't solve the problem, you didn't use enough.
    15. Re:LiveCDs do this... by Anonymous Coward · · Score: 0

      bullshit

    16. Re:LiveCDs do this... by billnapier · · Score: 2, Informative

      Sigh. The reason Linux always reports all your memory as being used in the page cache where it caches pages that are read from block devices (like you hard disk). Physical pages in memory that are unused (as opposed to virtual pages that your application just hasn't accessed yet) are used to store data read from disk in case you need to access it again. If you application starts to actually use pages that it allocated (like accessing things in shared libraries), linux will dump those disk cache pages from physical memory and start using those pages for the data your app needs. It can easily do this because it knows it is just a copy of what is on the disk and could easily be recovered.

      Take a look at "Understanding the Linux Kernel" from ORA for 2 excellent chapters on how all this works.

    17. Re:LiveCDs do this... by Junta · · Score: 1

      updatedb is a little different. Yes, I suppose on some amounts of memory, it will dislodge cached pages here and there, but updatedb doesn't do *much* with the files. My desktop has 12GB of ram, and has been up through a number of updatedb cycles and heavy heavy usage. It currently has 8.6 GB of ram it cannot possibly figure out a use for, that is left free, and 1.9GB of disk blocks held in cache. The actual memory used is 1.4GB, and there are 217MB of bufferspace allocated. With 4GB of ram, I would be in equally good shape with my usage pattern after a week of uptime.

      updatedb when running has historically been sluggish due to poor IO scheduling. That has had a lot of attention as of late, but I haven't run a recent kernel on anything not ludicrously overpowered, so I can't comment how that has been working out.

      Now the full content indexers (like beagle or whatever it is nowadays), those would hypothetically induce the behavior you describe, but another post hints at how the kernel provides the facility to address that.

      In relatively recent history, IO scheduling has been painful on the desktop, but the kernel developers have been aware and working to make sure the right facilities are in place for programs to make use of the system without provoking the kernel into making wrong guesses about caching and such.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    18. Re:LiveCDs do this... by oakgrove · · Score: 1

      I run Puppy 3.0.1 on a laptop with a 600 MHz Celeron and 128MB of RAM. It flies. It is literally probably the fastest computer I have ever seen in front of my face. The laptop I'm typing this on right now has a Core 2 Duo and 2 Gigs of RAM with Ubuntu Feisty Fawn and the Celeron smokes it.

      --
      The soylentnews experiment has been a dismal failure.
    19. Re:LiveCDs do this... by Elrond,+Duke+of+URL · · Score: 1

      At the risk of sounding stupid, I'll have to disagree with both you and the parent.

      In particular, Linux has long had an over commit memory system. An app can ask for vast quantities of memory and the kernel will happily give it. But that doesn't change the amount of memory being used nor does it kick things out of the cache. Only when that memory is actually used will the kernel *really* allocate it and make room in RAM.

      Also, Linux does not cache every file on the system that it touches. locatedb scans only the contents of the filesystem, not the contents of the files themselves. Depending on your system and how many files and directories you have, locatedb can still make a system grind, but this is from excess I/O and not from emptying the cache. On the other hand, some of the desktop indexing daemons, like Tracker, do scan the contents of files and those will end up, at least temporarily, in the cache.

      --
      Elrond, Duke of URL
      "This is the most fun I've had without being drenched in the blood of my enemies!"-Sam&Max
    20. Re:LiveCDs do this... by Lapzilla · · Score: 1

      This is not true. The Linux kernel will in fact use RAM that is not in use by other applications for filesystem buffers and cache. You can see how much memory is used for this with free.

    21. Re:LiveCDs do this... by tacocat · · Score: 1

      Good point. I generally just keep applications up and move to a new desktop when I need the real estate.

      This is a Microsoft solution for Microsoft software design.

      Please don't put it in my distro. If I use something large, like OO, I don't mind the start up time because once it's up, I can just leave it up all day long.

    22. Re:LiveCDs do this... by bgat · · Score: 1

      "In relatively recent history, IO scheduling has been painful on the desktop..."

      It doesn't help that a lot of desktop I/O hardware is really, really crappy, and bogs the CPU down doing nothing more than disk platter baby-sitting and checksum calculations. But not until after literally starving for memory and disk bandwidth.

      The minute you invest in decent hardware, a lot of the I/O scheduling problems go away.

      --
      b.g.
  2. Security Implications? by Anonymous Coward · · Score: 0

    What are the security implications of this?

    1. Re:Security Implications? by Anonymous Coward · · Score: 0

      The normal ramdisk vulnerabilities. Nothing of note.

    2. Re:Security Implications? by Skapare · · Score: 5, Funny

      The normal ramdisk vulnerabilities.

      You mean like losing the data after a few hours of no power?

      --
      now we need to go OSS in diesel cars
    3. Re:Security Implications? by janzen · · Score: 4, Funny

      Only if you run out of cold spray.

    4. Re:Security Implications? by neumayr · · Score: 1

      Hours? Where'd you get that figure?
      Last I heard it was a big deal when someone published that RAM keeps its data for a few minutes of no power..

      --
      Truth arises more readily from error than from confusion. -Francis Bacon
    5. Re:Security Implications? by The_Wilschon · · Score: 1

      Well then you'd certainly have lost the data after a couple of hours, wouldn't you?

      --
      SIGSEGV caught, terminating

      wait... not that kind of sig.
  3. ramdisk by wcpalmer · · Score: 2, Insightful

    I read a guide on the Gentoo forums a while ago about copying different directories into ram to "preload" them.

    http://forums.gentoo.org/viewtopic-t-296892.html

    I never actually tried it, but I might now that I have 4gb ram! A daemon to help automate this process would be welcome, though.

    1. Re:ramdisk by arivanov · · Score: 2, Informative

      I do this on a couple of systems that see only "occasional" use so I can spin down the disks. Works quite well actually.

      --
      Baker's Law: Misery no longer loves company. Nowadays it insists on it
      http://www.sigsegv.cx/
    2. Re:ramdisk by Anonymous Coward · · Score: 0

      You only have 4GB? I have 8GB just in my regular workstation. The servers run way more than that.

      It kind of sucks though because you must run a 64-bit OS to use the RAM. The problem is some important stuff doesn't work very well in 64-bit mode (for me this is mainly just general USB problems in Linux and USB interaction with VMware barely works at all).

  4. What, what? by PhrostyMcByte · · Score: 0, Redundant

    You mean Linux adapted something from Windows instead of the other way around? What's next, a sane proactor i/o api?

    Joking aside, this is cool. 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. Glad to see people aren't above taking the good ideas from Windows (or wherever Microsoft stole it from, if that's the case).

    1. Re:What, what? by guruevi · · Score: 5, Informative

      I don't know what rock you were under, but preload has been available for a while:

      preload 0.2 release: 2005-09-01

      And it was there before as it was packaged in Gentoo (back when it was still popular) and Suse 9.3

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    2. Re:What, what? by bersl2 · · Score: 4, Insightful

      (or wherever Microsoft stole it from, if that's the case). OS X had prebinding before Vista had SuperFetch. And they got the idea from somewhere else.

      Just let it go. This pissing match over innovation serves no useful purpose.
    3. Re:What, what? by andy314159pi · · Score: 1

      And it was there before as it was packaged in Gentoo (back when it was still popular) and Suse 9.3
      Do you have to recompile the kernel or anything like that to implement it in SuSE9.3?
    4. Re:What, what? by PhrostyMcByte · · Score: 1

      I had no idea, I had never even heard of it :/ Does it come by default with any distros?

    5. Re:What, what? by markov_chain · · Score: 5, Insightful

      innovation = first time to do something from your point of view

      invention = first time to do something ever

      Note how MS is always careful to point out they innovate.

      *flush*

      --
      Tsunami -- You can't bring a good wave down!
    6. Re:What, what? by sqrammi · · Score: 5, Informative

      It's actually a little different than the preload that's been in Gentoo for years. The core functionality is of course the same, but now a daemon runs that caches libraries and updates the linkage periodically. So, it can possibly give much more performance, since everything is always up-to-date. It will be standard in Hardy Heron when it comes out.

    7. Re:What, what? by calebt3 · · Score: 1, Insightful

      In Linux, most things never reach the x.0 stage, no matter how mature they are.

    8. Re:What, what? by gwait · · Score: 1

      The idea of using a ramdisk (and then storing commonly used binaries, including loadable libraries) was around back in the 1980's on Sun Solaris,
      it's an old, but good idea.

      The first thing that went in though was usually /tmp..

      --
      Bavarian Purity Law of Rice Krispie Squares: Rice Krispies, Marshmallows, Butter, Vanilla.
    9. Re:What, what? by Anonymous Coward · · Score: 5, Interesting

      SuperFetch was one of the first things that I had to disable in Vista. I had downloaded a linux distro (a large .iso file) using Firefox, and for the next two weeks, everytime I rebooted my computer I would have to listen to my hard drive chug away for the next 10 minutes while it loaded the file into memory. (The new resource monitor in Visa is nice -- that is what helped me track down the problem).

      My computer is MUCH faster now that SuperFetch is disabled. Like night and day.

    10. Re:What, what? by ozmanjusri · · Score: 2, Interesting
      it's an old, but good idea.

      The Amiga one of the same era was very good. You had a recoverable RAM disk, which functioned the same as a standard RAM disk, but would maintain its contents on restart. That meant reboots were lightning quick, and any data you stored in the RRAM disk was still there.

      Shame we haven't got back to that level of functionality.

      --
      "I've got more toys than Teruhisa Kitahara."
    11. Re:What, what? by Assembler · · Score: 2, Insightful

      OS X had prebinding before Vista had SuperFetch. FYI: Prebinding != Preloading
    12. Re:What, what? by Anonymous Coward · · Score: 0
      I'm not quite sure why the summary compares this feature to Vista's SuperFetch when the description...

      Preload is an "adaptive readahead daemon" that runs in the background of your system, and observes what programs you use most often, caching them in order to speed up application load time. By using Preload, you can put unused RAM to good work, and improve the overall performance of your desktop system. ...sounds more like XP's prefetch. That would be from 2001.
    13. Re:What, what? by hedwards · · Score: 1

      innovation = first time to do something from your point of view

      invention = first time to do something ever And what do you call the first time it works properly and reliably?
    14. Re:What, what? by EvilIdler · · Score: 5, Funny

      And what do you call the first time it works properly and reliably? Fantasy.
    15. Re:What, what? by metalhed77 · · Score: 4, Funny

      I'm envisioning a sensible sort of preload program in gentoo right now:

      *Preloading commonly used data, libraries, and binaries...
      gcc OK
      make OK
      libc-dev OK ... *snip* ...
      emerge OK
      kernel-src OK
      *Preload done, 3827K of USE Flags, 2TB of source code, and one compiler, and firefox to surf forums.gentoo.org for better use flags while you compile loaded into main memory

      --
      Photos.
    16. Re:What, what? by Spy+der+Mann · · Score: 4, Funny

      In Linux, most things never reach the x.0 stage, no matter how mature they are.

      This reminds me of a geek girlfriend I had... she told me she was 29.9.9.12.1 years old. But when I met her in real life, i was suprised she had a daughter... 17.1.25 years old!

    17. Re:What, what? by Jah-Wren+Ryel · · Score: 4, Insightful

      You mean Linux adapted something from Windows instead of the other way around? Fundamentally, preload and superfetch are just gussied up versions of the sticky bit which I am sure wasn't unique to unix back in the 70s either.
      --
      When information is power, privacy is freedom.
    18. Re:What, what? by nguy · · Score: 3, Informative

      You mean Linux adapted something from Windows instead of the other way around? What's next, a sane proactor i/o api?

      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.

    19. Re:What, what? by Anonymous Coward · · Score: 0

      s/firefox/lynx

      I don't know what sort of Gentoo-guru you are, but frankly those bloated numbers are starting to look less and less like a joke.

    20. Re:What, what? by pipatron · · Score: 2, Interesting

      Except when you were coding something that ran away in memory, corrupted the RAD (the name of the recoverable RAM disk), destroying everything you hadn't saved for an hour or so. :)

      (The Amiga didn't have an MMU originally, and even when they got it, the OS didn't support memory protection due to the shared message passing)

      --
      c++; /* this makes c bigger but returns the old value */
    21. Re:What, what? by BeanThere · · Score: 1

      I don't know what Vista you're using, but my Vista is noticably slower than XP for everything I do (on the same computer I had XP on before) even after turning off all fancy graphics and many unused services and background apps. Maybe SuperFetch is helping and it would be even slower without it, I can't really say, all I know as a user is that the system is much slower, and it's beefy hardware I'm talking about too.

      Anyway, I would rather OS developers focus on making the system faster, optimising existing code etc., than introducing bloat, and then adding layers upon layer of additional bloat on top of that to meagerly try mitigate the effects of the original bloat.

      It would seem to me things like SuperFetch/preload would have an interesting "side effect" in terms of how people evaluate new software. For example, if I use Word every day, and then install something like OpenOffice and try compare the two, Word will in effect gain an "unfair advantage" - I'm going to perceive OpenOffice as being much slower than Word. (OK, that's a bad example, since OpenOffice really is pretty slow to load, but this would distort the situation to be even worse.) Same story for Internet Explorer for example (most of which loads with Windows, so it'll always be 'super-prefetched') and, say, FireFox or Opera. Most people have little patience, so they'll try the new software for a day or two, get annoyed because it takes so long to load, and go back to whatever they were using.

      Regardless, preloading always has a resource cost, and that cost must at some point be carried by other applications. It's a case of trying to make the system 'faster most of the time but slower some of the time'.

      What I think you'll find with systems like this is that some application developers will realise that as such a system inherently does not "fairly" allocate resources, some will start trying to "game the system" - e.g. for no other reason than this their application will install resident (e.g. via a tray icon or even some kind of service), thereby ensuring the application is "used" "every day" and prioritised.

      I also suspect MS give their own apps priority in SuperFetch, but can't prove that (that's the nature of proprietary software). Hard to say though, since Word and Excel 2007 often do take ages to load on Vista, so maybe not.

    22. Re:What, what? by Phisbut · · Score: 1

      I don't know what rock you were under, but preload has been available for a while:

      preload 0.2 release: 2005-09-01

      Wake me up when it reaches 1.0, it's just a pre-beta release for now.

      --
      After 3 days without programming, life becomes meaningless
      - The Tao of Programming
    23. Re:What, what? by Phisbut · · Score: 1

      And what do you call the first time it works properly and reliably?

      I call that version 1.0, and preload isn't there yet.

      --
      After 3 days without programming, life becomes meaningless
      - The Tao of Programming
    24. Re:What, what? by Anonymous Coward · · Score: 0

      was her daughter hot?

    25. Re:What, what? by T-Bone-T · · Score: 1

      Looks like I hit a nerve! Overrated and offtopic do not mean disagree!

      "Offtopic -- A comment which has nothing to do with the story it's linked to (song lyrics, obscene ascii art, comments about another topic entirely) is Offtopic."

      "Overrated -- Sometimes you'll run into a comment which for whatever reason has been moderated out of proportion -- this probably means several moderators saw it at nearly the same time, thought it was Funny, Insightful etc, and their scores added together exaggerate its relative merit. (A knock-knock joke at +5, Funny) Such a comment is Overrated. It's not knocking the original poster to say so, but it's probably better to spend your mod points on comments which are deserving of being moderated up."

      Does any of that look familiar?

    26. Re:What, what? by abigor · · Score: 1

      And anyway, I believe prebinding has been deprecated for Leopard as it didn't speed things up much.

    27. Re:What, what? by Anonymous Coward · · Score: 0

      Maybe she was counting in hex.

    28. Re:What, what? by Spy+der+Mann · · Score: 1

      was her daughter hot?

      Now that you mention it, she asked me to fork, but her mother was monitoring all processes - I was rebooted, her daughter had her privileges revoked, and ~/ was made readonly.

  5. But I thought Vista doing it = RAM hogging? by Anonymous Coward · · Score: 1, Insightful

    I find it odd that the article "highly recommends" (RTFA before replying) installing this on a desktop Linux machine, but Vista's implementation is seen as "RAM hogging" and considered "bloat." I'm curious what sort of logical argument underlies this, as the "goodness" of preloading seems to change based upon which operating system it is implemented in. It is *almost* as if there is no logical basis, but, surely that can't be the case with the erudite, level-headed Slashdot crowd, right?

    1. Re:But I thought Vista doing it = RAM hogging? by bersl2 · · Score: 2, Interesting

      You have the option not to run this sort of program. If it sucks, turn it off.

      Also, Windows' VM system (IMNSHO) has always sucked and will continue to suck; predictive loading of entire bits of software has nothing to do with it.

    2. Re:But I thought Vista doing it = RAM hogging? by Anonymous Coward · · Score: 1, Interesting

      Presumably the linux implementation is better. Heck, just look at how disabling swap (or using a ramdisk for swap) dramatically improves performance in windows because of it's sucky virtual memory system if you don't believe me.

    3. Re:But I thought Vista doing it = RAM hogging? by Bondolon · · Score: 1, Informative

      Vista is typically seen as being pretty memory-hogging to begin with, whereas I've successfully run gutsy with compiz on my EeePC, and it doesn't, even then, have a problem with memory. The article pretty directly says that at the very most, the machine in question was set up to use no more than 87MiB, and out of that it wasn't even using a third.

    4. Re:But I thought Vista doing it = RAM hogging? by Daemonax · · Score: 1

      Does vista dynamically turn this on or off depending on the available amount of ram? I'm guessing not. This preload thing is something that you can turn on if your machine can deal with the extra memory requirements. Currently, Vista wants to do too much on crappy hardware, even on good machines it's painfully slow at times. So yes, both features it would seem are ram hogging, but this one can be turned on or off, where-as I'm guessing the vista one can't be, or at least is on by default even when the machine doesn't have the ram for it.

    5. Re:But I thought Vista doing it = RAM hogging? by Anonymous Coward · · Score: 5, Informative

      Vista's implementation is marketed as being useful for older, slower machines with less RAM, where it actually may be unwanted, and could cause performance issues (unless it's disabled below a certain threshold - it might be). It's only really useful if you have lots of RAM (around 2GB or so). Yes, SuperFetch has an extra mode where it uses a USB-2 stick as a secondary disk cache, but that's not what we're talking about here. That mode is generally perceived as a gimmick.

      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.

    6. Re:But I thought Vista doing it = RAM hogging? by Anonymous Coward · · Score: 1, Informative

      SuperFetch is easy to turn off, and Microsoft made pretty effective improvements to the VM system in Server 2003, which Vista is built upon. It's the System Restore, Shadow Copies, and Indexing services that strangle Vista with continous disk I/O. Power those services off, provide a healthy quantity of RAM, and Vista will be a much more adept multitasking system than XP ever was.

    7. Re:But I thought Vista doing it = RAM hogging? by dbIII · · Score: 0, Troll

      Linux handles having lots of RAM a lot better than Windows (XP) does, because of differences in the way the caching system was designed

      It's also due to linux (and just about everything else including MS Server 2003) correctly supporting the Pentium Pro and later processors. With the 64 bit versions the 2GB ceiling vanishes - but with 32 bit Vista the ceiling is far too close to the floor in my opinion.

    8. Re:But I thought Vista doing it = RAM hogging? by Yfrwlf · · Score: 1

      With the logical responses to this, I have to make my own emotional one and say that even if your statement were true and Microsoft really did "come up with it first", even if Steve himself actually got the idea before anyone else thought of it to load things into RAM to make things faster (hold the laughter til I'm done), it'd still be acceptable IMO to make fun of them, in principal.

      To use some old cliches, if a soccer-sewing sweatshop company donates some money to orphans, would you be all praise? If a charitable company did the same, would you not praise them more than the sweatshop company? For the more here-and-now crowd, if President Bush somehow started selling Bush Pops that had a nice flavor, and Brand X came out and did the same, which would you buy?

      OK so the first example perhaps has more moral objections to you, or perhaps maybe the second one does, but while you're right in that you should look past the political reasons to the thing itself and praise what it is if it deserves it, you can't belittle the other factors involved, including the moral ones, which many others may find much more important than you do.

      I agree with you that Microsoft gets rubber-stamped a lot and the knee-jerk reaction is to poke fun and that some/many of these may not have merit, but things have gotten this bad for several reasons, many of which are no joking matter. To rehash the old /. sayings, Microsoft IS like a gold-digging, backstabbing, manipulative betch, so it's no wonder many treat them as STD-infested.

      --
      Promote true freedom - support standards and interoperability.
    9. Re:But I thought Vista doing it = RAM hogging? by MrNemesis · · Score: 1

      As the AC pointed out in his excellent post, not all methods of prefetch/preload are created equal. It's not just whether the OS caches certain bits of certain things into RAM, it's also about what it does with them later. Disclaimer: I've not used Vista, but in previous versions of NT (including XP which also used prefetch), the OS has a terrible habit of dropping apps (especially ones that are minimised) into swap to make room in memory for more file cache (try minimising a reasonably chunky FF, copying a few 100MB files about and then watch in horror as the machine grinds to a halt when you try to bring FF into focus again) - classic mis-allocation of resources.

      As far as I'm aware, Vista gets its RAM-hogging moniker from populating the RAM with potentially useful stuff, but then not letting it go when something more useful (i.e. something that's actually being used) comes along. It's not so much a propblem with the idea itself (not using all your RAM = inefficient, using all RAM at maximum efficiency = good, using all RAM at low efficiency = utterly rubbish, worse than not using all your RAM), it's more a problem with the implementation. I've used Linux a helluva lot more than even XP, and from my limited understanding of the matter it just handles file caching and memory resources *so* much better - I can't remember the last time I've had to wait for an app to be pulled out of swap, because Linux doesn't use swap unless it's absolutely needed, whereas XP on the same 2GB RAM machine will happily swap out a ~250MB process to swap even if nothing else is being used. In Linux there are even tweaks you can do to enable the following:
      Write the dirty pages to swap when the disc is idle but keep them in memory as well - that way, if the pages do need to be swapped, it's effectively already been done so there's no lag as pages are written to disc so large mallocs can be done in a tenth of the time
      Read things that have been swapped back into memory when there are enough free pages - this is incredibly handy if, say, your machine runs a big, fat I/O or memory intensive task whilst you're not there (e.g. a nightly rsync of lots of files) - some or all your currently running apps may be written to swap. Once the job has finished, they're read back into memory so when you unlock your screen in the morning it's as if nothing happened. Sadly missed with the demise of the ck patchset.

      I know Russinovich was quite positive about alot of the new I/O and VM improvements in Vista, but my (biased) outlook on the anecdata out there tells me MS weren't entirely successful and that there still seem to be an awful lot of niche cases out there.

      Not to say Linux is perfect though - I've had the GUI freeze for seconds at a time under very heavy I/O loads, especially with ext3 filesystems IMHO. Get that damned scheduler or whatever it is fixed please...!

      --
      Moderation Total: -1 Troll, +3 Goat
  6. Old tech by mokeyboy · · Score: 1, Insightful

    This seems an odd article given preload made it into distros as a standard component for Fedora Core 1 (RHEL3). Its been around since the late 2.4 kernel series was still mainstream. What was the significance of the article? It didn't even update the numbers to a modern hardware config.

  7. Hope... by deadmongrel · · Score: 4, Funny

    it doesn't make GNU/Linux as *fast* Microsoft Vista.

    1. Re:Hope... by Anonymous Coward · · Score: 0

      Please. While I wait for Vista to load I have time to open a can of pop and take a sip. While I wait for KDE, to say nothing of Gnome, to load I can finish that can of pop, bake a cake, eat it, convert it to a giant dump, and father a child, then come back to the computer with a new can of pop just in time to enter my password. Linux is fast in the server space, and perhaps in the CLI, sometimes, but for anything else, there's a reason the linux on the desktop enthusiasts are refered to as hobbists.

    2. Re:Hope... by Anonymous Coward · · Score: 0

      Try comparing their load times on *the same computer* next time.

    3. Re:Hope... by sumdumass · · Score: 1

      I don't know. I dual boot and find that linux load faster then both XP and Vista. Of course I don't have every service under the sun running on either. I shut down everything on boot that I don't need in all OSes. Well, at least as far as the OS will let me. I did however install the propratary drivers for my video card which seems to help it run smoother and quicker when it is up.

      I'm not sure what your seeing unless your running one an a modern computer and the other on a five year old E-machine. Maybe dual booting on the same computer and making sure only the services your actually using loads at startup would change a lot for you.

    4. Re:Hope... by ZekeSpeak · · Score: 0, Troll

      Linux is fast in the server space, and perhaps in the CLI, sometimes, but for anything else, there's a reason the linux on the desktop enthusiasts are refered to as hobbists. s/hobbists/hobbits/
    5. Re:Hope... by tuxgeek · · Score: 1

      My HP laptop dual boots both XP and Etch. Both boot times are fairly equal either way. The difference is in running the system and doing my work. Linux is always responsive and consistent, but XP sometimes daydreams between tasks and is not consistently responsive. XP is a far cry better than '95 or '98 but is not my favorite desktop system. Linux holds that honor hands down. Even most windows based software sucks compared to most Linux alternative applications.

      --
      "Suppose you were an idiot...and suppose you were a member of Congress...but I repeat myself." Mark Twain
    6. Re:Hope... by IrquiM · · Score: 1

      I've done that for him, and Linux is still slower, but who cares? It's not like you're gonna reboot your linux PC more than 2-3 times a year!

      --
      This is blinging
    7. Re:Hope... by donaldm · · Score: 1

      You really have to get rid of your 286 PC. :-)

      --
      There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
    8. Re:Hope... by neumayr · · Score: 1

      Really? I take it you don't pay like 16 Euro cents per kw/h electricity, huh?

      --
      Truth arises more readily from error than from confusion. -Francis Bacon
    9. Re:Hope... by cbart387 · · Score: 1

      I don't doubt that some distros may be slower than XP in load time. This is especially true now that XP is fairly mature. How about once it's loaded? I'm not sure the speed of load time with my dual-booted system, but my Linux (Fedora 8) handles tasks much better than XP. For an example. If I'm running a processes that takes a lot of CPU time on Fedora, it will give me proper interrupts by giving the user a good response. XP, on the other hand, will give the user a horrible response time.

      And I agree with shutting down. :) I typically only do so if I _have_ to use XP or if the infrequent times that yum wants me to restart after an update.

      --
      Lack of planning on your part does not constitute an emergency on mine.
    10. Re:Hope... by RiotingPacifist · · Score: 1

      time to what? when my linux system boots, its there bang click on an app and go! last time i used vista ( a friends machine ofc it might be contagious), they had to give it a while before doning anything, this tech isnt about speeding up boot, its about speeding up program launching.*

      *Ofc if you have session restore on kde this wont be true.

      --
      IranAir Flight 655 never forget!
    11. Re:Hope... by Anonymous Coward · · Score: 0

      Go take a leak while it boots, it'll help with your bad mood, too.

    12. Re:Hope... by tomatz · · Score: 1

      Are u taking the **** or what?

  8. Apple OS X by Thomas+M+Hughes · · Score: 2

    Is this functionality available in Apple's OS X?

    1. Re:Apple OS X by Nemilar · · Score: 1

      OS X uses Prebinding, which is a bit of a different thing.

      --
      Nemilar http://www.techthrob.com - Visit Me!
    2. Re:Apple OS X by dreemernj · · Score: 1

      Prebinding isn't really similar to preload. Preload is actively trying to figure out what the user is going to access and loads it into RAM in advance. Prebinding links an executable to libraries. It only needs to be run when you install an application or when you update the libraries. And prebinding is deprecated now. It wasn't a big savings in performance and has been replaced, I believe, by a system cache of library symbols.

      Back when I used to use Macs fairly regularly (back around OS X's release) I remember a lot of applications that had an overall design that encouraged users to leave them running in the background. I'd close a word document's window but Word would stay running as just the menu bar which would switch back to the Finder as I clicked around, leaving Word loaded and waiting for another doc. I would find after using a computer for a few hours of work, I would be leaving a number of applications running in the background the whole time and since it was a higher spec model, it never had any problem with running out of memory. This obviously isn't like Preload or SuperFetch, but it seemed like a good design that encouraged a user behavior that made the system run faster, so long as you didn't start to run low on memory from all the apps running.

      --
      1 (short ton / firkin) = 89.1432354 slugs / keg
  9. Nice but... by pizzach · · Score: 4, Informative

    I never had any luck with preload the times I tried it (a year or two ago?). Nowadays I use alltray for preloading often used apps that are a bit chunky such as Firefox or Openoffice. Openoffice also has a built in preload feature...but you can use alltray anyway for the same effect.

    --
    Once you start despising the jerks, you become one.
    1. Re:Nice but... by Nemilar · · Score: 4, Informative

      Alltray and preload are two totally different things. With Alltray, you're talking about keeping the application open, just minimized to the system tray. With Preload, you're talking about caching the binaries/libraries in memory so when you do open the application, it's reading the data from RAM rather than the hard drive. Sure, AllTray moves the load to RAM, but at the cost of entire applications. The point of preload is that it just caches the most commonly used files.

      --
      Nemilar http://www.techthrob.com - Visit Me!
    2. Re:Nice but... by pizzach · · Score: 1
      I said alltray worked pretty well when preload seemed to do nothing. They are different programs, but they can be used to achieve similar effects. I did not say they were the same.

      I'm guessing you tried doing something silly like loading your whole /bin and /usr/src/bin to alltray and were give massive errors? For MOST linux users, the load times of only a few programs are the real pet peeves; and that is where alltray makes sense.

      Sure, alltray moves the load to RAM, but at the cost of entire applications. The point of preload is that it just caches the most commonly used files. Sure, preload caches the commonly used files, but what if your openoffice usage is just low enough to be below the threshold to be cached? The program takes a long time load and there is nothing you can do about it with preload...In fact, you have no idea what is preloaded and what isn't.
      --
      Once you start despising the jerks, you become one.
    3. Re:Nice but... by Anonymous Coward · · Score: 0

      Further, preload is a learning program. It watches what files are the most accessed, and gives those priority. You won't get much benefit out of it if you just try it for a few hours, but if you gave it a few weeks then you might actually notice an improvement.

  10. Blogspam by bziman · · Score: 5, Informative

    The submitter is the author of the blog, and is merely paraphrasing the whitepaper written by the author of the software -- and that is two years old. Nothing new or interesting here, just someone trying to draw eyeballs to his blog.

    1. Re:Blogspam by DragonTHC · · Score: 2, Insightful

      what's wrong with trying to drum up a little readership?

      For those of us with our own blogs, how on earth do you get readers without tooting your own horn?

      --
      They're using their grammar skills there.
    2. Re:Blogspam by xenocide2 · · Score: 4, Insightful

      By doing something productive, not spamming me with shit I already knew about. Blog about new information you've generated. Maybe make some charts about disk head position during boot and demonstrate whether I/O is throughput or seek bound. Above all else, don't just copy someone else's shit and translate it into HTML.

      --
      I Browse at +4 Flamebait

      Open Source Sysadmin

    3. Re:Blogspam by Anonymous Coward · · Score: 0

      That seems to miss the entire fucking point of blogging. You aren't blogging to an audience, you are blogging to get your feelings out there. The only bloggers who are blogging to an audience are the ones who just care about the advertising dollars. And you know what, I'd rather not support scum like that.

    4. Re:Blogspam by Gothmolly · · Score: 1

      Why do you need readers? What profound insight do you have? Or are you just masterbating?

      --
      I want to delete my account but Slashdot doesn't allow it.
    5. Re:Blogspam by Breakfast+Pants · · Score: 1

      Fresh content offering even a microscopic mote of originality? By that standard the article here fails.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
  11. Similar? by jsse · · Score: 4, Funny

    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 I might be wrong, but similar function in Windows Vista should be "Reload".

    Vista users respond positively toward the speed boost everytime we "Reload" their Vista. The downtime and data lost as a result of "Reload" might irritate some disgruntled users, but most of them enjoy the free break at the expense of the company.

    Nothing in those Linus thingy could beat that user satisfaction. I might be bias though.
    1. Re:Similar? by Anonymous Coward · · Score: 0

      "I might be bias though."
      Unlikely. You're probably merelu biased

      __

      Yes, I know it was a "Funny" posting, but the error detracts more for "Funnies"

    2. Re:Similar? by initdeep · · Score: 1

      or stupid....

      either appears to be supported.....

  12. Fulfill your fantasy by Anonymous Coward · · Score: 1, Funny

    And what do you call the first time it works properly and reliably?

    Fantasy. To achieve your fantasy of "making it work properly and reliably", may I suggest Viagra? Surely you've received one or two of my e-mails over the course of the past decade?
  13. Not sure about the gain by JanneM · · Score: 3, Insightful

    I have a pretty good amount of memory on my current machine - 2Gb - and I mostly just never close any applications, especially with the big ones like Gimp just reusing the already open instance when you open a new file. I suspect that preload would not actually be all that useful for me in practice; I'm still goign to enable it to see if I'm wrong, though.

    --
    Trust the Computer. The Computer is your friend.
    1. Re:Not sure about the gain by Anonymous Coward · · Score: 0

      2Gb ain't shit. Like 256K of RAM? What are you running on a calculator or something?

      8GB+ is the new standard.

  14. Re:Puppy by Talkischeap · · Score: 1

    I'll say somethings not right there, I loaded Puppy on a 1 Gig USB drive, and tried it on my 7 year old homebuilt, and it was way slower than even XP.

    Jerky mouse, freezing up, crashing, it brought back the days of Win98SE.

    I thought it was because the USB load was "experimental".

    I'll try DSL, or some other lighter weight distro and see what happens.

    --
    If it don't GO... chrome it. ~ Frank Banks
  15. Sticky bit by Anonymous Coward · · Score: 0

    Hasn't unix done this for quite a while (decades) with the sticky but? Or did that just appply to programs?

    1. Re:Sticky bit by FPCat · · Score: 1

      Hasn't unix done this for quite a while (decades) with the sticky but? Or did that just appply to programs? Ha! Sticky but! That just made my morning. Thanks :)
  16. Difference with readahead? by pieleric · · Score: 4, Interesting
    Currently I use readhead which, at boot time, basically uses a special linux syscall to tell the kernel to read some files ahead whenever it has nothing else better to read.

    Does anyone knows the difference between the two projects? Does preload have a better algorithm for selecting the files to read? Does it also use this special syscall?

    1. Re:Difference with readahead? by caseih · · Score: 1

      If you look at the FA, and then read the referenced paper, you'll find your questions are all answered by the original author. It's an interesting paper; just skip over the statistical analysis if you don't understand it.

    2. Re:Difference with readahead? by abc_los · · Score: 1

      Personally I'd pick blondes or brunettes over readhead any day.

  17. Oh dear, oh dear, oh dear by Colin+Smith · · Score: 1

    And then you go and run Gnome on it...

    --
    Deleted
  18. is toram parameter really faster? by emj · · Score: 1

    Linux do cache all requests to the disk so I really don't see why you would need to use toram to get more speed. The only thing I can see is the ability to use the DVD drive. Sure seek times during boot are going to be eliminated, but you can do a precache stage in the boot instead.

    But I always have wondered does linux cache the compressed blocks, or the uncompressed?

    1. Re:is toram parameter really faster? by BobPaul · · Score: 2, Informative

      The series of comments to which you replied is about Linux LiveCDs, which don't require/touch the hard disk unless you explicitly tell them to. Using "toram" or "dochache" or similar kernel switches allows the entire contents of the CD to be loaded to the ramdisk, dramatically speeding up loading and allow one to remove the CD.

      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.

    2. Re:is toram parameter really faster? by BobPaul · · Score: 1

      Sorry, I misread disk as "HD" and not as "DVD" on my first pass. Obviously your in the right place.

    3. Re:is toram parameter really faster? by Junta · · Score: 1

      dramatically speeding up loading Not so much in my experience, it just pushes all the loading and *then some* to the boot process. You may only ever hit, say, 40% of the disk content on a livecd if not tuned to your usage, and therefore incur 40% of the content having to be read painfully slow on demand. By virtue of being on demand, every operation that reads new files will be obviously slow the first go around.

      Meanwhile, toram and such cause 100% of the disk content to be hit up during boot process, and can make it excruciatingly slow. However, once that one singular step is done, it will be amazingly responsive.
      --
      XML is like violence. If it doesn't solve the problem, use more.
    4. Re:is toram parameter really faster? by BobPaul · · Score: 1

      I guess by loading I meant of applications, not of bootup. I use it if I'm going to use the livecd for an extended period of time rather than doing something quick like re-install grub.

      As a side note, from my experience even repeated loadings take a long time. If I open firefox it will often hang waiting for the disk to spin up after it's open and again if I close and reopen it. Even using the terminal can cause this. I pretty much hate using LiveCDs if they aren't cached in ram, but often I don't feel like waiting. Thanks for correcting that.

  19. Readahead Vs Preload by Aladrin · · Score: 1

    As far as I can tell, Kubuntu 7.10 has readahead installed by default. I can't find much information on whether preload is to replace that, or if they work together or what.

    Has anyone got any insight into what's better, or if they will peacefully work together? I'd prefer faster app times over faster boot times as I hardly ever reboot.

    --
    "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
  20. eeepc + preload = less waiting, more performance! by Ferret55 · · Score: 3, Informative

    tried it out on my little eeepc and it definitely made a difference, on average its sped up all loading times by about 30 percent. This is especially good because i upgraded to a 2gig stick of ram but most programs hardly need that much ram and on average im left with about 1.2 gigs just sitting there doing nothing, now the ram is more productive and the loading time is noticably faster eg. firefox on a cold start without preload took 10 seconds to load before, now on a cold start it loads in 6 :). Also since the cpu is relatively slow it means fetching data and the overhead of moving it around it cut down alot. I'd love to shake the creators hand for this plucky little piece of software :) thanks!

  21. Re:Puppy by Anonymous Coward · · Score: 0, Insightful

    Sounds like 7 years ago you had no idea how to build a decent computer...

  22. COOL by Uzik2 · · Score: 1

    I thought read ahead caching in the hard disk would have accomplished 90% of what this does.
    I guess being smarter is more beneficial than I had thought

    --
    -- Programming with boost is like building a house with lego. It's a cool but I wouldn't want to live in it
  23. Re:eeepc + preload = less waiting, more performanc by torpor · · Score: 1

    Wanna give me a quick howto on doing this on the EEEPC? I'd love to do this with mine .. any particular gotchas?

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  24. Re; Separate Process by Ayanami+Rei · · Score: 2, Insightful

    You could do it in the kernel, but you shouldn't. The kernel keeps track of files using inodes and device numbers, not paths, which may be volatile between reboots (udev+kernel can dynamically assign device numbers to kernel devices, filesystems are identified and mounted by scanning for UUIDs or labels in superblocks, etc). A tracking daemon can monitor system calls and keep a small database with logical paths, access patterns, and so forth; the user-space view of activity tracks intent better so the statistics can be more meaningful.

    Moreover the act of caching the file is easily accomplished by a low-priority user-space task which speculatively reads the files which may be referenced soon. In this fashion the kernel memory manager does not need to be changed in any way; we are not creating a new kernel memory pool which would need new logic under memory pressure. In the case that RAM is suddenly needed for storing application pages or an unexpected demand-loaded program binary or library, we can flush these buffered files just like any other cached file; it's not treated any differently. It's just a daemon touching files (with the hope of a benefit in startup times of applications that require them).

    --
    THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
    1. Re:Re; Separate Process by nguy · · Score: 2, Insightful

      You could do it in the kernel, but you shouldn't. The kernel keeps track of files using inodes and device numbers, not paths,

      The kernel can keep track of files in whatever way it likes, including paths. But I don't see a problem with using inode numbers anyway. I think "preload" is trying a little too hard.

      Moreover the act of caching the file is easily accomplished by a low-priority user-space task which speculatively reads the files

      These "low-priority user-space tasks" are spreading like a cancer. Linux is turning into a micro-kernel, without the "micro" or the efficient inter-task communication.

  25. Amazon solved this by Anonymous Coward · · Score: 0

    In particular, the locatedb daemon makes everything unresponsive because linux caches every file on your file-system it touches, even though it's pretty much guaranteed nobody else needs those files anytime soon.

    A little bird told me that Amazon (I think) had a kernel patch for this problem, because they were running Linux servers that got big files uploaded to them which would then not be touched for ages, and they didn't want them being cached.

    Sorry, the little bird didn't tell me the patch name. But it's not a new problem, and a solution does exist.
  26. ....so what? by Aggrav8d · · Score: 1

    In a few years we'll all be using solid state drives, anyhow. With 10,000x fetch rate, who'll know the difference? At that speed it makes me wonder when ram will be phased out completely. What's that, you say? Fewer parts, lower overhead, less environmental impact, and smaller form factor all for the cost of a few ms access time I'll barely notice anyways? Sounds like a good deal to me.

    1. Re:....so what? by elyk · · Score: 1

      Sounds good to me too, provided they overcome the million-or-so-writes that today's flash chips can handle before failing - it takes a fair amount of time to reach that in normal usage, but when you're using it as swap space you're going to start seeing failures pretty quickly.

      --
      MS-DOS: Most Severe Denial of Service
      Free Online Backup
    2. Re:....so what? by Anonymous Coward · · Score: 0

      Here is a trick: Don't swap. It's not absolutely needed, and if you're using an SSD it's probably a bad idea.

  27. Re:Puppy by Talkischeap · · Score: 2, Funny

    "Sounds like 7 years ago you had no idea how to build a decent computer..."

    Sounds like you're quite an arrogant asshole...

    --
    If it don't GO... chrome it. ~ Frank Banks
  28. Preload or Sticky bit? by Anonymous Coward · · Score: 0

    So when its cached in "memory", does this mean virtual memory (possibly swap- as if with the long-existing and well-known sticky-bit under other OS's)???

  29. Dammit, this is so easy to demonstrate... by Junta · · Score: 2, Interesting
    Ok, linux box here, free -m:

    total used free shared buffers cached
    Mem: 2026 1512 513 0 770 379
        buffers/cache: 363 1663
    Swap: 2870 0 2870
    slashdot won't seem to let me format the way I want, but run free -m on your own. The cached column is the 379 figure.
    Note the 379M number. That is the amount of data read from disk and kept in ram. When an application needs to malloc and no completely free memory, yes it will free up those pages (it ideally picks the cache least likely to be needed again). But absolutely, disk contents are kept in disk cache, but only after load. And no, memory leaks aren't hopelessly pervasive.

    What preload does normally happens implicitly during boot. It's hard to demonstrate on init scripts effectively, but log into gnome right after boot, and the disk will thrash like crazy. Log out, kill every last process of that user, log in again. It will be quite dramatic. preload aims for that subsequent experience without the pain of the first.

    So what preload brings is simple, and all that has to happen is simple, know which files are relevant to typical usage ahead of time, and be aggressive about 'cat file > /dev/null' if the system during boot has IO idle time. Presumably, the key is identifying which files those are for a particular system.

    Linux implicitly aids this, but the user interface side still subjectively 'feels' bogged down because it won't proactively load things it doesn't know you'll need, despite the ability to derive this historical data in user space. If preload takes idle time (let's say, for example, while services with arbitrary sleeps and while waiting for username and password) and proactively gets cache populated, it is more IO work in the aggregate (disk will be hit up for things that will never be needed), but it will feel smoother out of the gate.
    --
    XML is like violence. If it doesn't solve the problem, use more.
  30. Mixed response... by Junta · · Score: 1

    As fun as it is to poke fun at MS for updates incurring reboots, most modern distros end up issuing a kernel update every couple of weeks, so linux is not immune. Also, I have some misbehaving drivers on my laptop that currently preclude suspending, and thus shut down when I have to travel with it, so it's often the case my linux laptop incurs resets that flush cache. Finally, the simple reality is if you want to build a platform for the masses, you have to deal with some users that even with everything lined up to avoid cache-dropping reboots, will want to shut-down or reboot because they feel like it (or know suspend on their particular hardware still draws a few watts, and want to save that). OO.o whether you like it or not is a significant piece of that equation as it has the largest mindshare among the free suites, afaict. As much as I find it critical to use pipes in the shell to make use of various programs, it's not something I relish trying to explain to a complete novice.

    Meanwhile, if you close the app every time without rebooting, you won't be so bad off in the case that preload aims to help. Firefox starting once induces it's disk needs to be cached, starting it again should have a high disk cache hit rate. Leaving the app open just to avoid an eventual startup penalty can be a waste of memory and work against performance if you starve memory available for disk caching.

    --
    XML is like violence. If it doesn't solve the problem, use more.
    1. Re:Mixed response... by D3viL · · Score: 1

      As fun as it is to poke fun at MS for updates incurring reboots, most modern distros end up issuing a kernel update every couple of weeks, so linux is not immune. Unless you use kexec in which case you don't have to reboot to use the new kernel...
  31. Re:Puppy by Talkischeap · · Score: 1

    Cowardly troll boy said: "Sounds like those things aren't mutually exclusive."

    Thanks for sharing that it runs in your family, but we all can surmise that from your callow comments.

    --
    If it don't GO... chrome it. ~ Frank Banks
  32. Well... by jd · · Score: 1

    You could bugfix the two-year-old software, do a release on SourceForge, announce on Freshmeat, and THEN post on Slashdot. I bet that would not only boost readership, but it would be a readership that appreciated your efforts. All it would take is a relatively minor bugfix to be a real release. Run splint over it, or put it through dmalloc, fix compiler errors for gcc 4.2, or a dozen other things. A few minutes work, perhaps.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  33. AmigaOS anyone? by HFoster · · Score: 1

    AmigaOS booted as quickly as it did from floppy disk because the core elements of the kernel were in ROM, along with some key services. Mind you, Amiga learned a few tricks from UNIX.

  34. Re:eeepc + preload = less waiting, more performanc by Ferret55 · · Score: 1

    no gotchas if you are using ubuntu or eeexubuntu, just follow the instructions on the preload homepage.

  35. Not foolproof... by Junta · · Score: 1

    Even if very strictly only talking about reboots that go to firmware, depending on your system and what kernel you are changing from/to, the new kernel may do something odd like hang or some hardware/driver interaction might get confused by the situation (if the driver was unable to unload, and so the case of two driver loads coming without a driver unload or intermediate firmware initiation confuses some set of devices gravely, a few instances to the point of panic). As far as I can tell, most common cases kexec works well, but it isn't universally safe even if every driver is unloaded and precautions are taken before the change.

    But I wouldn't dictate avoiding firmware as being *that* significant, *particularly* on desktop platforms with relatively fast BIOS. From a user convenience factor, kexec still means the entire process space/memory/everything goes away. You start init over again with a new kernel and initrd, just like you would from grub. It's not exactly a consolation that a kernel update will not get you into firmware if it still resets everything your doing like a full system reboot would. I can see with some card firmwares being annoyed with startup time, but it's generally not that bad. If really disconcerting, a number of cards/BIOSes let you disable the firmware for the card and the linux driver will still work, you just need /boot on some trivially accessed media (i.e. a USB key) and / could be on any number of inconvenient devices for the firmware to get at. I just think the frustration system firmware is blown way out of proportion, and instead of insisting of doing away with it, demand features that facilitate things like fast boot and exotic boot loader configurations. A BIOS that would skip straight to a USB port (making all the relevant assumptions along the way) and go would go a long way paired with a USB flash storage device.

    --
    XML is like violence. If it doesn't solve the problem, use more.