ramdisk bug ?
-
Hello,
Yesterday I enabled ram disk usage for tmp and var.
I had a big problem.
I had left the default values of 40 and 60 mb, because the usage values were much lower.
Shortly afterwards, I'd say about an hour, pfsense rebooted by itself and I couldn't connect to it.
I managed to see the problem by connecting to the console.
I got an error like "fatal error unable to create lock file no space left on device"
Impossible to do anything.
all console actions returned no space left on device.
I had to reinstall pfsense, but using the config.xml
I could see on reboot that the /var on the ramdisk was filling up like crazy and was well over the 60 mb allocated, whereas if it's not on the ramdisk, it's well under 60 mb.
I tried to change the allocation on the ramdisk to 1024 and 2048 respectively for tmp and var, but pfsense didn't take this into account and stayed at 40 and 60 mb.
So I had to disable ram disk.Could this be a bug? Known?
pfsense + 24.11
-
@PiAxel said in ramdisk bug ?:
1024 and 2048 respectively for tmp and var
That's 3 Gbytes for the two of them.
You have (way more !! then) 3 Gbytes RAM ?I'm using 25.03 beta 2 myself - let's say a better 24.11, and my /tmp is about 2 Mbytes in size.
The /tmp is empty when the system boots.
But my /var is different : 2,3 G bytes.
My system RAM, a 4100, so I can't extend it : just 4 G bytes.
Upfront : I never used a ram disk before, as for me, the potential negative side effects are bigger as the advantages. I do recall that it isn't all "/var" but some /var/ sub folders like /var/log/ /var/cache/ /var/unbound/ ? etc (you tell me ^^). Further more, it's just one more thing to 'baby-sit', and setting up RAM disk isn't really a "set it and forget it" option. Probably, for osme, it is - they don't post here on the form. For other, it isn't.For me, it's the /var/unbound/ that is rather big, as of of its sub/sub folders contains the pfBlockerng-devel log file. That a whopping 1.x G Gbytes for me, as I want the details.
All these sizes depend of course on you pfSense system log settings : who much do you keep ? how often do you rotate them ? and the same thing for the pfBlockerng log settings. Be ware that these can grow very fast.Also, I'm not user but didn't the 'mandatory' pfSense package "System_Patches" propose patches for teh RAM disk ? You this package installed, and applied all "Netgate" official patches ? Better : go to 25.03 Beta 2.
-
@Gertjan
I have a DIY system with 32G ram. It's an old intel Xeon E3 1220 V6 with supermicro x11ssl-cf motherboard. The "System_Patches" package is installed, as are all the patches. -
Ok, RAM couldn't be an issue then.
Neither the drive, probably, as I presume a classic hard disk or SSD.
So, imho, what is the final gain using a RAM drive ?True, it should work.
There are some "ramdisk" posts since 24.11 came out.
Look them up, and check if the situation corresponds with your issue ?Did you have a look at what is actually in (the size per folder) your several /var/ folders ?
Also : if you have 10 or 20 minutes spare time, and since you are using pfSense plus == the ZFS file system : install 25.03 beta 2 and try again.
Because ( click) :there are some "ram disk" issues solved in 25.03 beta 2.
-
You may need to reboot twice to seen that set since it only gets; applied at boot.
However, yes, there is a bug on some systems where the default values are always used. It only happens on some filesystems where a race condition occurs. It's fixed in 25.03-Beta.
When using RAM Disks I usually start out at double the default values. 1G + 2G is very large. If you have hungry packages though you may need large drives, but not that big!