Solved Question about wired memory

Hello fellow BSD-Users,

since FreeBSD 11 is released, I'm building a desktop system from ports and take another run on FreeBSD. So after building a few ports (bigger ones like x11/xorg, x11-wm/xfce4 and german/libreoffice) I came across something which I realized some time ago too. Everytime I build ports the memory usage goes up. After taking a closer look with top I saw that "wired" memory was about 2 GB. So finally I did some google magic but didn't find something useful. Most threads I found were related to ZFS, but I only use UFS. After reading another thread here in the FreeBSD forum and the Handbook the only hint I got was, wired memory is related to the kernel. Has anyone more information to share? Does this value decrease over time? So far I had to do a reboot to get the memory "back".

Thanks a lot
 
Unless your system is actually running out of RAM, you should never think about it. Ever. Conserving RAM in a computer is like conserving gasoline in a car: the best way to do it is to not use the machine, and trying to use the machine while not using the thing that it depends on it is futile.

To answer your question directly, "wired" RAM is that which is used by the kernel to actually do the things that make the system work. It's not actively used at all times; the amount you see is the amount reserved by, or "wired to" the kernel, and the kernel will let some of that reserved RAM go if and only if something else needs it.
 
Does this value decrease over time?
Yes, usually it does, depending on current workload.

So far I had to do a reboot to get the memory "back".
The kernel and its subsystem, like ZFS, implement several strategies to optimize disk I/O and keep some data in memory because that improve overall performance.

Instead of accessing the disk to read again some file it will find that the file content is already in memory, and will deliver that data to the application that is requesting that file content. This is usually know as 'cache'.

You may not want to have your memory "back" for itself, because that is not going to improve anything.
The kernel itself, when in need of more RAM will release part or all of that 'cache' memory and will reuse that to load an application, just as an example.

So, having an OS that maximize the use of available resource, like RAM, is a good OS.
And of course, this is a "simplified" explanation.
 
Thanks to both of you, so this is a memory management thing. That's ok with me. Is there some web page with more technical details?
 
Back
Top