Can anyone recommend a good book or set of documents specifically about what OpenSolaris or Solaris is doing internally? I was reading this post and saw a comment that said
"On Solaris it was/is even more involved. The swap file is mirrored in a ram disk like tmpfs so the memory is always almost full - but it is apparently provable that this is the optimal strategy. – mgb Jun 25 at 19:40"
Can anyone verify that?
I then checked my OpenSolaris fileserver and saw this:
load averages: 0.05, 0.04, 0.04; up 6+15:41:36 09:48:02
118 processes: 117 sleeping, 1 on cpu
CPU states: 99.4% idle, 0.1% user, 0.4% kernel, 0.0% iowait, 0.0% swap
Kernel: 1025 ctxsw, 6 trap, 1120 intr, 916 syscall
Memory: 16G phys mem, 3816M free mem, 8143M total swap, 8143M free swap
This server is doing nothing at the moment. Why is the swap completely empty? Where is this filesystem?
Basically, I want to learn more about how OpenSolaris is managing memory, and the intricacies of the operating system in general.
Thanks! matt.
from the tmpfs man page " tmpfs is a memory based file system which uses kernel resources relating to the VM system and page cache as a file system."
/tmp is in RAM/swap space. If you right enough to /tmp, you'll get an out of swap space error. You can prevent this by setting a size in the option field in /etc/vfstab: size=1024m for example
The standard book on Solaris internals is Rich Teer's: http://www.solarisinternals.com/wiki/index.php/Solaris_Internals
I'd guess you're not using any swap because you've not done anything I/O or memory intensive with the machine, and you've a good deal of physical memory.
Solaris Internals: Solaris 10 and OpenSolaris Kernel Architecture (2nd Edition)
The authors also have a website/wiki with more information at solarisinternals.com
The statement "The memory is always almost full" is incorrect, at least out of its context. What is true is Solaris will try to use as much memory (read RAM) as it thinks useful. Unused memory is wasted memory anyway.
Tmpfs is only undirectly related to RAM usage as it is backed by virtual memory. If you want to know what is your RAM usage, run that command:
If you want to know your virtual memory and swap usage, run
You aren't currently using swap because everything memory related fit in RAM.
You might want to check the Solaris Performance and Tools book.