Using find to make things fast

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
lightweight
Sophomore Member
Posts: 234
Joined: Sat Jun 30, 2007 10:56 pm
Location: L. A.

Using find to make things fast

#1 Post by lightweight » Tue Apr 08, 2008 1:33 am

As 2x2GB RAM prices have fallen I've been messing around with the idea of mounting different dirs to ramdisk then writing back to disk at shutdown to cut/eliminate disk access time after initial boot, as well as loading Linux to ramdisk because guys like this have the right idea: http://thumper.fastcoder.net/wiki/Runni ... _a_Ramdisk , and it was pointed out to me that I'm missing the obvious: instead one could just load, say, /lib into the buffer with a

Code: Select all

find /lib
(or / and exclude .mp3/etc, or whatever)
and experiment to their heart's delight with speed and battery life, which is way more convenient and practical. And one can control writes back to disk and shutdown already does a sanity sync anyway. Cool.
Have: x60s ultralight 1705-CTO, Debian SiD, Linux 2.6.25-2 | x61s ultralight 7668-CTO, Debian SiD/Experimental, Linux 2.6.27-git5 | Model M 1391401, white label, 07-17-91
Had: x22, Debian Testing/SiD, Linux 2.6.18-22

aaa
ThinkPadder
ThinkPadder
Posts: 1062
Joined: Fri Jun 08, 2007 2:36 pm

#2 Post by aaa » Tue Apr 08, 2008 5:06 am

But it's very easy to nuke the disk cache, just by writing or reading a huge file...
Plus, a whole folder like /lib isn't all used, only small parts of it. So that makes both methods cumbersome. The ramdisk way is fastest though, because sequentially loading one big file is way faster than randomly loading each individual file one by one.

BTW, there's a tool called 'preload' that's supposed to help with this. However, I haven't seen much benefit... maybe I just configured it wrong or something (I just installed it and expected it to work, lol).

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: axur-delmeria and 1 guest