New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: ability to limit tmpfs for var and tmp #2856
Comments
Checking freebsd man for tmpfs: The following options are available when mounting tmpfs file systems: size Specifies the total file system size in bytes, unless |
Hi, This brings us back to the old days where tmpfs was not being used and the memory disk would always need an upper bound. There is little to no desire to move back into this direction. I understand the motivation, but don't think trading one issue for another is worth it. You can always use tmpfs manually via /etc/fstab. It should work fine if you disable the GUI option first. Cheers, |
If I disable the GUI settings, do I need to reboot in order to active the change? Then I should break the normal boot process, and boot into single user mode, edit fstab to add the 2x tmpfs with -o size xxxx, and only then let the multiuser boot finish? |
You need to reboot, but you can disable the GUI setting, edit /etc/fstab and reboot in one go. /tmp tmpfs should be there with no further modification. The memstick image uses tmpfs directly, so you can compare: https://github.com/opnsense/tools/blob/master/build/vga.sh#L52 |
(options are passed along with rw,mode=01777,size=xxxx) |
Ok, I will try it. Just in case the help for this ramdisk can add this little info about no size limit? |
I don't know. Between adding the hint and losing the translations for the current help text there is no clear winner... |
I let you guys think about this. Documentation could give 1-2 lines about this. |
Hi @soder10, After removal of a backwards compatibility code with versions < 17.1 and a bit of thought it doesn't need any more info in the GUI itself, but I'm not opposed descriptions in the documentation, although we don't have a relevant page with that particular area (misc settings) at the moment. As far as I remember this is the only time this has been asked in years, compared to when people asked for memory disk to be moved to tmpfs to tap RAM in an unlimited fashion. Cheers, |
Ok, thanks for the support anyway. |
Could there be an option in System: Settings: Tunables to set optional max tmpfs size? |
Hello devs,
I have enabled tmpfs for /var and /tmp to spare the SSD. However, I would like to make sure the available RAM is not decreased down to 0 due to a runaway logging process or tmp pollution. It would make sense to limit the size of the tmpfs filesystems to 50% or 75% of RAM. With that it can guarantee the availability of the system even if the tmpfs fills up.
The text was updated successfully, but these errors were encountered: