|
How to not use your hard diskHow to not use your hard diskPosted Mar 13, 2008 9:31 UTC (Thu) by rvfh (subscriber, #31018)Parent article: How to use a terabyte of RAM
I was wondering: is there a way to achieve something similar just using the I/O cache? My laptop is meant to run Vista and thus comes with 2GB of RAM, of which Linux (or even XP!) does not use that much; it would be nice to tell the system to not flush some parts of the FS to disk and keep them in RAM for a very long time, without having to set-up a RAM disk and then committing it to disk on shut down... More concretely: my source code is like so: project/src/test/file_test_dir all the file_test_dir's are big and contain big useless short-lived data. what is below is important code. I'd love to be able to say: *test_dir does not be need be sync'd to disk at all, or very rarely. Ok, just writing it lets me think that's it's not trivial unless I do create a RAM disk for my test data... oh well. Or maybe unionfs can help?
(Log in to post comments)
How to not use your hard disk Posted Mar 13, 2008 15:36 UTC (Thu) by i3839 (subscriber, #31386) [Link] If it's on a separate partition (or image file) you could try a huge value for the "commit" mount option in ext3. But using tmpfs is probably easier, and just doing a cp -a when wanting to store it to disk.
How to not use your hard disk Posted Mar 14, 2008 20:22 UTC (Fri) by giraffedata (subscriber, #1954) [Link] So the goal is to eliminate writes to disk of data that will probably never be read back? Do you have a problem with too much disk I/O? Is it slowing down other I/O? Some filesystems (none on Linux that I know of) have, for this reason, an attribute of a file or file image "delayed write," which means don't bother to harden writes to disk until the OS finds a better use for the memory or there's an orderly shutdown. And some policy engine that can set the attribute based on file name. On Linux, I'd probably make those directories symlinks to directories in a tmpfs filesystem. Not ramfs, because the memory manager can probably do a better job than my static policy at determining when the memory can be better used for something else.
How to not use your hard disk Posted Mar 15, 2008 17:42 UTC (Sat) by rvfh (subscriber, #31018) [Link] This is exactly it! I might do the symlink trick, but I would really like to have that per-file delayed write option... Thanks!
|
Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.