Carson Gaspar wrote:
> Not true. The script is simply not intelligent enough. There are really
> 3 broad kinds of RAM usage:
> 
> A) Unused
> B) Unfreeable by the kernel (normal process memory)
> C) Freeable by the kernel (buffer cache, ARC, etc.)
> 
> Monitoring usually should focus on keeping (A+C) above some threshold.
> On Solaris, this means parsing some rather obscure kstats, sadly (not
> that Linux's /proc/meminfo is much better).

B) is freeable but requires moving pages to spinning rust.  There's a subset of 
B (Call it B1) that is the active processes' working sets which are basically 
useless to swap out, since they'll be swapped right back in again.

Two other important types of RAM usage in many modern situations:
D) Unpageable (pinned) memory
E) Memory that is presented to the OS but that is thin-provisioned by a 
hypervisor or other vitualization layer.  (use of this memory may mean that the 
hypervisor moves pages to spinning rust)

For virtualized systems, you should limit the size of A+B1+C so that it does 
not get into memory E.  There's no point in having data in the ARC if the 
hypervisor has to go to disk to get it.  Considering that the size of E is 
dependant on the memory demands on the host server, (which the guest has no 
insight into) this is a Very Hard problem.

Often this is arranged by having the hypervisor break the virtualization 
containment via a memory management driver (vmware tools provides a memory 
control, for example) which steals pages of virtual-chip memory to avoid the 
hypervisor swapping.

--Joe
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to