What kind of workload to you want to run on the machine? That will tell you whether you should or should not have swap.Just spinning up a new instance of FreeBSD 14 on a VM. The Guided UFS disk set-up using the entire disk has reserved 3.8GB out of a 120GB disk for swap.
Usually I go in and manually delete this. I realise it's a luxury but most of my kit has 16GB of RAM, and VMs are given 8GB of RAM (I run one at a time, as just a desktop user)
Is swap still necessary in this day and age? I can understand having a memory overflow is helpful but perhaps these days it's a bit redundant, unless there is some other use for swap that I'm not aware of, in which case I'd appreciate the learnings.
Thanks
You should remove some RAM.This is 19 hours into building Chromium and dependencies from ports. Frustrating that I can't have that extra 4GB space back.
Mem: 350M Active, 6153M Inact, 1676M Laundry, 28G Wired, 601M Buf, 10G Free
ARC: 21G Total, 18G MFU, 1409M MRU, 784K Anon, 1068M Header, 1526M Other
17G Compressed, 81G Uncompressed, 4.64:1 Ratio
Swap: 40G Total, 754M Used, 39G Free, 1% Inuse
I have a bit of swap setup for my system to use and it's pretty much needed for the things I do. Without swap I have to reboot my system if I try to work on too big of files, especially when video editing.Is swap still necessary in this day and age? I can understand having a memory overflow is helpful but perhaps these days it's a bit redundant, unless there is some other use for swap that I'm not aware of, in which case I'd appreciate the learnings.
Yeah, amen to that. I'm just a desktop user. Running on SSD. I didn't think of swapoff, I guess I can just comment the entry in /etc/fstab. I'm quite happy for it to crash for OOM, I don't think with my uses it'll ever get there. Chromium is my biggest resource hog. I'm not a tab hoarder ever, I've never seen the machine go over 4GB of RAM usage. I'm frankly surprised and impressed that the memory usage is so low after compiling Chromium for so long. Good job devs!Long story short, it depends on your workload and what your expectations are.
I have a bit of swap setup for my system to use and it's pretty much needed for the things I do.
I have a Dell PowerEdge R750XA with 2 Intel Xeon Silver 4309Y. I bought it directly from Dell. I only have 8GB instead of 16GB because one of the RAM sticks fell out during shipping and damaged the pins of the slot, although I can recommend, been pretty solid overall with FreeBSD on it.what hardware are you running? Could you not add more RAM? Is that a Raspberry Pi or something?
That is ok. Normal desktop operation does not use so much RAM. Mine is running fine with 8G - I have another 8G here, but there is no need to insert them.Yeah, amen to that. I'm just a desktop user. Running on SSD. I didn't think of swapoff, I guess I can just comment the entry in /etc/fstab. I'm quite happy for it to crash for OOM, I don't think with my uses it'll ever get there. Chromium is my biggest resource hog. I'm not a tab hoarder ever, I've never seen the machine go over 4GB of RAM usage.
That doesn't normally happen, and even if it would happen, it's harmless. The only bad thing I have seen is if the disk that does the swapping has cable problems. There is no mirroring on the swap device. Normally a cable problem is also harmless, because the mirror will catch it, but when it concerns swap, the system does crash.My impression was from previous comments in this thread that even when the memory isn't topped out, data is being "swapped" between swap and memory. If this is the case, I'd really like to prevent this (safely).