One of the reasons why ZFS is a fast file system is the use of a file system caching called ARC (Adaptive Replacement Cache), which runs in memory.
The current size of ARC can be seen with the following command:
kstat -p zfs:0:arcstats:size
At the time of this output, ARC was using 11.4GB.
Although ARC should be intelligent enough to not occupy RAM which is needed by zones or applications, I have seen cases where ARC uses 50% of the total available memory and the other 50% were fully occupied by zones and applications, causing applications (like MySQL) to swap. That's a performance nightmare.But there's a way to limit the ARC size by setting the value of zfs_arc_max. At the end of /etc/system I added the following lines:
* Limit ZFS Arc
set zfs:zfs_arc_max = 21474836480
This means that I have set a maximum limit for the zfs arc to 20GB (21474836480 Bytes).
After a reboot (and RAM-Upgrade at the same time), the memory graph clearly shows that the ARC size (represented by CACHES in the graph) has hit 20GB, but never went above it:
No comments yet.
AWS Android Ansible Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Container Containers CouchDB DB DNS Database Databases Docker ELK ElasticSearch Elasticsearch Filebeat FreeBSD GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java Kibana Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Rancher SSL Security Shell SmartOS Solaris Surveillance SystemD TLS Tomcat Ubuntu Unix VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder