Re: Is bin ever written to?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Knapp wrote:
On Tue, Dec 23, 2008 at 10:09 PM, Loïc Grenié <loic.grenie@xxxxxxxxx> wrote:
2008/12/23 Knapp <magick.crow@xxxxxxxxx>:
On Tue, Dec 23, 2008 at 8:22 PM, Smoot Carl-Mitchell <smoot@xxxxxxx> 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.
Well, maybe 'cause it's "damn small"?

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!
You can use strace and compare number of files opened in both cases. All
the files in your FF profile, add-ons/plugins, libraries etc. It's not
just /usr/bin/firefox. Do you want all that in RAM disk?...

You may also experiment with the swappiness setting in sysfs, i.e.
balance in RAM usage (see, for ex., here:
http://www.linux.com/feature/146599).

In practice however a faster hard disk or RAID setup will most likely
make the biggest difference.

Sarunas



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklRaJwACgkQejaFVltl6E8qhACfamjA2mGueY4PQM+oqJGirF/O
iAwAnAiLxCUwSufWFknGKBCjMaUMg1BL
=UA3k
-----END PGP SIGNATURE-----

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • Re: Is bin ever written to?
    ... I was thinking of putting them in a ram disk with SquashFS to speed up ... frequently accessed pages in memory anyway. ... The kernel writers usually says that it's much better to NOT use a ramdisk ...
    (Ubuntu)
  • Re: Is bin ever written to?
    ... I was thinking of putting them in a ram disk with SquashFS to speed up ... frequently accessed pages in memory anyway. ... The kernel writers usually says that it's much better to NOT use a ramdisk ...
    (Ubuntu)
  • Kernel: /dev/ram1 (rd.c) not releasing unused memory automatically any more?
    ... I use the ramdisk /dev/ram1 on an embedded linux system. ... In good old days of kernel 2.2.9, the ram disk released memory ... automatically when a file was deleted or the ram disk was unmounted. ...
    (comp.os.linux.misc)
  • Re: BOOT_CS
    ... the CRC32 of the decompressed RAM disk - and stop the boot process ... another kernel version / initrd to load. ... You cannot place the decompressed initrd at a maximum address before ... address minus ramdisk size if I remember ...
    (Linux-Kernel)
  • RE: No swap can be dangerous (was Re: swap on RAID (was Re: swp - Re: ext3 journal on software raid)
    ... I think swapping to a RAM disk can't work. ... Now the first page of swap space is ... and memory is now allocated for it. ... Each time the Kernel attempts to swap some of the RAM ...
    (Linux-Kernel)