Is bin ever written to?

Knapp magick.crow at gmail.com
Tue Dec 23 21:48:10 UTC 2008


On Tue, Dec 23, 2008 at 10:09 PM, Loïc Grenié <loic.grenie at gmail.com> wrote:
> 2008/12/23 Knapp <magick.crow at gmail.com>:
>> On Tue, Dec 23, 2008 at 8:22 PM, Smoot Carl-Mitchell <smoot at tic.com> wrote:
>>> On Tue, 2008-12-23 at 20:05 +0100, Knapp wrote:
>>>> I was wondering if anything in a set up system ever needs to write to
>>>> /bin or /sbin or /usr/bin or /usr/sbin?
>>>> I was thinking of putting them in a ram disk with SquashFS to speed up
>>>> the system but it can only read and not write.
>>>> As far as I know the only time writing is needed is with a system update.
>>>
>>> You are correct.  The only time the "bin" directories are written is
>>> during system updates.
>>>
>>> I am not sure how much improvement you will see by putting the common
>>> system commands in a ram disk.  The demand paging system keeps
>>> frequently accessed pages in memory anyway. The only way to know is to
>>> try it and see what kind of improvement you see.
>>> --
>>> Smoot Carl-Mitchell
>>
>> Any other ideas of what might best be on a ram disk?
>> All the hidden home files was suggested because programs like FF might
>> be speeded up and then at shutdown the ramdisk could be written to the
>> home dir. This posses a risk, if there is a power outage but other
>> than that should be safe.
>
>    The kernel writers usually says that it's much better to NOT use a ramdisk
>  and let the kernel do the cache (it's also much safer in case of power
>  outage). You lose the first time you read a file, but the rest of the time it
>  remains in memory (in you read it often). Except if you have a very
>  specific use, you'd better not put anything on your ramdisk and not do
>  any ramdisk.
>
>     The first time you read a file, the kernel copies it into memory.
> It remains
>  there unless there is not enough memory for the rest of the system. In that
>  case the least used files are canceled from memory. This means that the
>  kernel will create a "virtual ramdisk" in the cache where all the
> files that you
>  use often will remain. Each of those "usual" files will be read only
> once during
>  each normal session. If you use all your memory for some memory intensive
>  program, the cache will be canceled, but your memory will be available for
>  your program (which will not, or less, swap) instead of being locked for a
>  ramdisk.
>
>           Loïc

OK, then how do you explain the increadible speed of distros like Damn
Small Linux with a ram boot? Even big programs like FF run in a blink
on my 386 laptop. On my amd 64 bit machine stating FF takes time even
if I do it 2 times in a row. I want that sort of speed on my much
faster desktop!

-- 
Douglas E Knapp

Amazon Gift Cards; let them choose!!
http://www.amazon.com/gp/product/B001078FFE?ie=UTF8&tag=seattlebujinkand&linkCode=as2&camp=1789&creative=9325&creativeASIN=B001078FFE


More information about the ubuntu-users mailing list