How much memory does ZFS consume?
Posted: Wed May 27, 2009 7:02 pm
http://milek.blogspot.com/2006/09/how-m ... nsume.html
When using ZFS standard tools give inaccurate values for free memory as ZFS doesn't use normal page cache and rather allocates directly kernel memory. When low-memory condition occurs ZFS should free its buffer memory. So how to get how much additional memory is possibly free?
bash-3.00# echo "::kmastat"|mdb -k|grep zio_buf|awk 'BEGIN {c=0} {c=c+$5} END {print c}'
2923298816
[[ What is zio_bud for??? ]]
I believe it is for ZFS I/O buffer.
So kernel consumes about 3.2GB of memory and about 2.7GB is allocated to ZFS buffers and basically should be treated as free memory. Approximately free memory on this host is: Free (cachelist) + Free (freelist) + 2923298816. --> WHY???
I guess ZFS I/O buffer can be treated as FREE memory when needed.
When using ZFS standard tools give inaccurate values for free memory as ZFS doesn't use normal page cache and rather allocates directly kernel memory. When low-memory condition occurs ZFS should free its buffer memory. So how to get how much additional memory is possibly free?
Code: Select all
bash-3.00# mdb -k
Loading modules: [ unix krtld genunix specfs dtrace cpu.AuthenticAMD.15 ufs md ip sctp usba fcp fctl lofs zfs random nfs crypto fcip cpc logindmux ptm ipc ]
> ::memstat
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 859062 3355 41%
Anon 675625 2639 32%
Exec and libs 7994 31 0%
Page cache 39319 153 2%
Free (cachelist) 110881 433 5%
Free (freelist) 385592 1506 19%
Total 2078473 8119
Physical 2049122 8004
>::quit
2923298816
[[ What is zio_bud for??? ]]
I believe it is for ZFS I/O buffer.
So kernel consumes about 3.2GB of memory and about 2.7GB is allocated to ZFS buffers and basically should be treated as free memory. Approximately free memory on this host is: Free (cachelist) + Free (freelist) + 2923298816. --> WHY???
I guess ZFS I/O buffer can be treated as FREE memory when needed.