You are not logged in.
Pages: 1
Is the root filesystem stored in RAM uncompressed or are the files only expanded when they are accessed for the first time?
Offline
As no one else has answered, I'm not here too often, I believe they are copied to ram uncompressed.
If you check ram usage against the linuxfs (& kernel?) sizes, that should confirm, (or not).
(In a terminal run 'free -m')
Hope that helps.
The root filesystem is stored in RAM uncompressed in the buffer cache as tmpfs.
Offline
Thanks for the confirmation but while I was awaiting an answer I found a way to move an existing install's root uncompressed to RAM on the fly:
Decompress the initramfs to a temporary directory:
[c]mkdir /tmp/initramfs/
cd /tmp/initramfs/
gzip -d < /mnt/boot/initramfs-linux.img | cpio –i[/c]
Add the code below to init immediately after the real root is mounted:
[c]echo
echo " || Press a key to load root filesystem to RAM..."
echo
if read -t 3 -n 1 k
then
mkdir /tmp/real_root/
mount --move /new_root/ /tmp/real_root/
mount --verbose -t tmpfs -o size=50% none /new_root/
echo
echo " || Copying root filesystem to RAM..."
echo
cp -a /tmp/real_root/* /new_root/
umount /tmp/real_root
read -p " || Done! Press [Enter] to continue..." RESP
else
clear
echo
echo " || To late! Normal boot in progress..."
echo
fi[/c]
Re-compress the initramfs:
[c]find . | cpio -o -H newc | gzip -9 > /mnt/boot/initramfs-linux.img
cd ~[/c]
This could easily be adapted to any distro atop any storage regime. Just remember that only updates while booted to the real root are persistent but the good thing is they will follow through to the RAM root the next time you boot into it.
The above is redundant with respect to SliTaz but it may provide some clarity on how to go about having the root filesystem loaded to RAM for increased system performance.
Offline
Pages: 1
[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]