Messages in this thread |  | | | From | Kevin Puetz <> | | Subject | Re: VM disk cache behavior. | | Date | Tue, 08 Feb 2005 23:03:13 -0600 |
| |
Andy Isaacson wrote:
> Most likely is that your app isn't behaving in a cache-friendly way. If > your file will fit in memory, just fault it in sequentially (wc -l file) > and then your app should cook. If you're not going to fit in memory, > the vm caching will probably only help if you have some reuse; you could > develop a pre-faulter to get your IO started ahead of time, but that's > generally nontrivial.
Of course, what's non-trivial is predicting your upcoming I/O pattern (unless it's not actually random at all, just messy). Calling madvise to prefault it is pretty easy if you actually do know what you'll want in the near future.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |