|
|
On Sat, 29 Nov 2008, Ray Clark wrote:
> Regarding the cache, right now there is 150MB of free memory not
> being used by ANYBODY, so I don't think there is a shortage of
> memory for the ZFS cache... and 150MB >> 128K, or even a whole slew
To be more clear, memory which is claimed to be free is often actually
still used for caching. Even if the virtual memory system has not
mapped a VM page to a process, if a minor page fault occurs (due to an
access), the data in that seemingly "unused" page may still be
immediately switched in and used because the VM system tracks where
the current content of that page came from. This is primarily the
case for memory-mapped regions such as ordinary files, shared
libraries, executable text, or even a video frame buffer. This is
pretty much normal operation since when new processes are started, the
VM maps the existing pages that the new process requires into its
address space.
It is pretty common for Unix systems to lie about free memory and use
that free memory for the filesystem cache with the expectation that
this "free" memory can be freed up for use fast enough that no one
really notices.
If the critical "working set" of VM pages is larger than available
memory, then the system will become exceedingly slow. This is
indicated by a substantial amount of major page fault activity.
Since disk is 10,000 times slower than RAM, major page faults can
really slow things down dramatically. Imagine what happens if ZFS or
an often-accessed part of the kernel is not able to fit in available
RAM.
Bob
======================================
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
zfs-discuss mailing list
zfs-discuss@xxxxxxxxxxxxxxx
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|