Categories: SolutionsZFS

If ZFS is eating your memory

If ZFS is eating your memory


Todays solution is: If ZFS is eating your memory. In a production usage of ZFS especially when using my native ZFS on Linux article one sympthom that could occur is you ran out of of memory in short time.

Since ZFS is originally designed to run stand alone on a server,
using its total memory (default arc max value is 80% of total mem) and we are need most of the memory for our KVM instances, we have to cap the memory usage a little bit.

So if you realize high I/O writes which is eating your memory,
you can solve this by capping the arc memory limit to a lower value on your host machine.

That is what we are going to do now!

Set zfs_arc_min and zfs_arc_max memory limit

Create a file in /etc/modprobe.d/zfs.conf and add and adjust the zfs_arc_min and zfs_arc_max mem parameters:

# Min 2048MB / Max 4096 MB Limit
options zfs zfs_arc_min=2147483648
options zfs zfs_arc_max=4294967296

Reboot your machine at that should do it.

Jules

Jules is the owner and author of ISPIRE.ME. He's a Linux System Engineer, Tech fanatic and an Open Source fan.

View Comments

Share
Published by
Jules

Recent Posts

HTTP/2 SSL Offloading with Hitch and Varnish

HTTP/2 SSL Offloading with Hitch and Varnish Since Chrome browsers showing you insecure warning on…

7 years ago

File changed as we read it GlusterFS issue

File changed as we read it GlusterFS issue Recently i had trouble running Backups of…

7 years ago

Running multiple instances of varnish using systemd

Running multiple instances of varnish using systemd If you have not yet found a complete…

7 years ago

HTTP/2 SSL Offloading with Haproxy and Nginx

HTTP/2 SSL Offloading with Haproxy and Nginx After HTTP/2 becoming more an more prominent regarding SSL…

7 years ago

Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for

Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for Everyone knows the Problem. Get…

7 years ago

Review TDS2 How to backtest using tick data with Metatrader 4

Review TDS2 How to backtest using tick data with Metatrader 4 in this Review TDS2…

8 years ago

This website uses cookies.