[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sticky bit, powersaving & hdd spindown



Damien <bitwise@repose.cx> writes:
> > Under DOS there was the possibility of treating some of your RAM like a
> > disk (hence the name ramdisk).  Not sure if Linux can do this, but if
> > so, then just copy the binary to a ramdisk and run it from there.

Yes it  can be done. You will  need to enable ramdisk  support in your
kernel.  (Set the  ramdisk size there to something  big enough  to  run your
program.) Then put something like this in your /etc/fstab:

/dev/ram /ram minix user,noauto 0 0

(On my machine, /dev/ram is a symlink to /dev/ram1, and /ram is just a
mount point I created: mkdir /ram)

I occasionally use  a 64MB ramdisk, for recording  music (actually for
testing whether  the HDD is a  bottleneck in music  recording). To use
the ramdisk, I say:

mkfs.minix /dev/ram 65536
mount /ram

Can't remember why  I used the minix filesystem,  you can probably use
anything you like (e.g. ext2fs). 

I don't know how the ramdisk memory is managed though, anybody else
know? I'm not sure there is anything protecting that memory from being
overwritten  by other  applications,  though you'd  think there  would
be. Hmm. 

Anyway, try it. 
Also I  wonder if  putting more memory  in your machine  would prevent
your program from being un-cached. 

-chris







Reply to: