Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

up vote 1 down vote accepted

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%5FInternals

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.

share|improve this answer
    
Thanks, I will start reading through the solarisinternals wiki. –  matt Nov 30 '09 at 16:22

Solaris Internals: Solaris 10 and OpenSolaris Kernel Architecture (2nd Edition)

The authors also have a website/wiki with more information at solarisinternals.com

share|improve this answer

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:

echo ::memstat | mdb -k

If you want to know your virtual memory and swap usage, run

swap -l
swap -s

You aren't currently using swap because everything memory related fit in RAM.

share|improve this answer

You might want to check the Solaris Performance and Tools book.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.