freebsd-nq/sys
Alexander Motin c908dc6f4b MFV r277426: 5408 managing ZFS cache devices requires lots of RAM
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Don Brady <dev.fs.zfs@gmail.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Chris Williamson <Chris.Williamson@delphix.com>

illumos/illumos-gate@89c86e3229

Currently, every buffer cached in the L2ARC is accompanied by a 240-byte
header in memory, leading to very high memory consumption when using very
large cache devices. These changes significantly reduce this overhead.

Currently:

L1-only header = 176 bytes
L1 + L2 or L2-only header = 176 bytes + 32 byte checksum + 32 byte l2hdr
    = 240 bytes

Memory-optimized:

L1-only header = 176 bytes
L1 + L2 header = 176 bytes + 32 byte checksum = 208 bytes
L2-only header = 96 bytes + 32 byte checksum = 128 bytes

So overall:

          Trunk  Optimized
        +-----------------+
L1-only | 176 B  | 176 B  | (same)
        +-----------------+
L1 & L2 | 240 B  | 208 B  | (saved 32 bytes)
        +-----------------+
L2-only | 240 B  | 128 B  | (saved 116 bytes)
        +-----------------+

For an average blocksize of 8KB, this means that for the L2ARC, the ratio
of metadata to data has gone down from about 2.92% to 1.56%.  For a
'storage optimized' EC2 instance with 1600GB of SSD and 60GB of RAM, this
means that we expect a completely full L2ARC to use (1600 GB * 0.0156) /
60GB = 41% of the available memory, down from 78%.
2015-08-10 10:34:23 +00:00
..
amd64 Remove some more vestiges of the Xen PV domu support. Specifically, 2015-08-06 17:07:21 +00:00
arm Rationalize BSD license on sys/*/include/float.h 2015-08-05 17:05:35 +00:00
arm64 Add support for external PCIe (PEM) on Cavium's ThunderX 2015-08-08 21:32:03 +00:00
boot Remove guards around overwriting loader.rc and menu.rc 2015-08-06 16:07:27 +00:00
bsm
cam Remove verbose CTL messages. 2015-08-09 09:54:29 +00:00
cddl MFV r277426: 5408 managing ZFS cache devices requires lots of RAM 2015-08-10 10:34:23 +00:00
compat Add file_open(): the underlying system call of openat(). 2015-08-06 06:47:28 +00:00
conf Add support for external PCIe (PEM) on Cavium's ThunderX 2015-08-08 21:32:03 +00:00
contrib Import OpenBSD's iwm WiFi driver for Intel 3160/7260/7265. 2015-08-08 06:06:48 +00:00
crypto const'ify an arg that we don't update... 2015-07-29 23:37:15 +00:00
ddb Various changes to the registers displayed in DDB for x86. 2015-07-22 01:09:02 +00:00
dev Remove mps_request_polled(), it's redundant to mps_wait_command() 2015-08-10 09:02:34 +00:00
fs The changes that introduced fo_mmap() treated all character device 2015-08-06 16:50:37 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom Make some debug printf's into DPRINTF's to reduce noise on attach/detahh 2015-08-09 06:58:06 +00:00
gnu The GNU Amlogic DTS files have some errors (e.g. bad register 2015-04-11 08:17:39 +00:00
i386 Remove unused i386 header privatespace.h. For the native kernel, its 2015-08-07 05:59:58 +00:00
isa
kern Add const-qualifiers for source mbuf argument in m_dup(), m_copym(), 2015-08-08 15:50:46 +00:00
kgssapi
libkern Remove checks for __ARM_EABI__, we only build for EABI now. 2015-07-09 21:02:40 +00:00
mips Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
modules Build the iwm and iwmfw modules by default on x86. 2015-08-08 21:09:41 +00:00
net MFP r274295: 2015-08-08 18:14:59 +00:00
net80211 Revert the wifi ifnet changes until things are more baked and tested. 2015-08-08 01:10:17 +00:00
netgraph * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
netinet tcp_reass_zone is not a VNET variable. 2015-08-09 19:07:24 +00:00
netinet6 Fix compilation after r286457 w/o INVARIANTS or INVARIANT_SUPPORT. 2015-08-08 21:41:59 +00:00
netipsec Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
netnatm
netpfil Reduce overhead of ipfw's me6 opcode. 2015-07-29 10:53:42 +00:00
netsmb
nfs
nfsclient Remove some oldnfs remnants. 2015-04-18 16:08:06 +00:00
nfsserver
nlm
ofed ipv4_is_zeronet() and ipv4_is_loopback() expect an address in network 2015-08-07 18:30:11 +00:00
opencrypto Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
pc98 Remove unused i386 header privatespace.h. For the native kernel, its 2015-08-07 05:59:58 +00:00
powerpc Correct return type of booke_init() prototype. 2015-08-08 23:13:53 +00:00
rpc Remove useless acquire semantic from the atomic_add operation before 2015-07-28 06:58:10 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
sys cdefs: reduce code duplication 2015-08-09 15:38:32 +00:00
teken
tools
ufs - Make 'struct buf *buf' private to vfs_bio.c. Having a global variable 2015-07-29 02:26:57 +00:00
vm Introduce a sysctl for reporting the number of fully populated reservations. 2015-08-06 21:27:50 +00:00
x86 Formally pair store_rel(&smp_started) with load_acq(&smp_started). 2015-08-06 18:02:54 +00:00
xdr
xen Add support for Xen blkif indirect segment I/Os. This makes it possible for 2015-07-30 03:50:01 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00