[Soekris] Smallest possible MFS /dev on OpenBSD
Jean-Yves Boisiaud
jyblst at erasys.fr
Wed Jan 16 14:14:55 UTC 2008
> I've got OpenBSD 4.2 on a net4801 and am mounting /dev in RAM.
> I'd like
> to reduce the amount of memory used even further.
> Currently only %4 is
> used:
> Filesystem Size Used Avail Capacity Mounted on
> mfs:21800 853K 34.0K 777K 4% /dev
>
> What should I be aware of in /etc/fstab to minimize the memory
> footprint of /dev? Currently, I have:
> swap /dev mfs rw,-P/dev.base,-i1,-s2300,-c264,-m5,nosuid 0 0
I think that ramfs is dynamic, ie physical memory is not reserved during
mount_mfs execution.
To reduce the /dev memory fs space :
- you can reduce the inodes density with -i. Default is one inode for
8196 bytes.
- delete unused devices.
Here is the command I use on my Soekris targets :
# mount_mfs -i 256 -s 592 -P /var/run/dev swap /dev
And the result is :
# df -h /dev
Filesystem Size Used Avail Capacity Mounted on
mfs:31196 23.0K 6.0K 16.0K 27% /dev
Number of files in /dev:
# ls /dev | wc -l
307
>
> Random changes to mfs' parameters aren't getting me anywhere. There
> should be a rational way of arriving at optimal settings for mfs:
>
> -b block-size
> -c fragments-per-cylinder-group
> -f frag-size
> -i bytes
> -m free-space
> -s size
More information about the Soekris-tech
mailing list