Justin Gombos wrote:

There is a ZFS FAQ somewhere indicating that ZFS *appears* to hog
memory because it uses as much as it can, but it supposedly
relinquishes memory as soon as an app calls for it.

I thought that should be pointed out, though I am not quick to accept
it myself.  How does the kernel ask ZFS processes for more memory?

ZFS uses kmem_cache_create() and friends, which is a fun little beast.
It can manufacture and recycle pre-initialized bits of memory without
having to do much to it.  One of the arguments used in setting up a
cache is a callback routine the kernel memory allocator can call when
it needs subsystems to clean up and return memory to the system.

In the particular case of the ZFS ARC cache, there's a hdr_cache and
a buf_cache; the hdr_cache has a callback, which wakes up the ARC
reclaim thread to evict unneeded allocations in several areas, not
just that one cache.

Rob T
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to