[zfs-discuss] ZFS eating up all 16 GB RAM when combining 4k blocksize ZVOL with XFS

Omar Siam simar at gmx.net
Tue Nov 13 09:59:42 EST 2018


Hi!

> You can also try with:
> free,
> check /var/log/messages (& daemon.log),
> dmesg | grep -i oom
> top (with a low delay to see which processes are the most active.)
When I used htop last time among the most active processes were the 
[z_wr_int_x] ones. And they never show any RAM usage. All these tools 
are good for diagnosing RAM eating users pace processes but I doubt the 
big RAM consumer is a user space process. I am not aware of a tool for 
getting kernel RAM usage aside from slabtop which also does not yield 
useful info here. I read somewhere [1] that SPL uses a malloc mechanism 
that does not use the kernel's slab infrastructure to get some big 
chunks of memory for use by ZFS. I suspect the RAM usage there but I 
can't prove it.
>   
> I just find a script that might help, launch it from the command line
> in an infinite loop and redirect the output to a file:
> https://www.zyxware.com/articles/4446/show-total-memory-usage-by-each-application-in-your-ubuntu-or-any-gnu-linux-system
>
Interesting script. But it as I see it it only filters out RAM usage 
that is displayed "multiple times". I don't really care about that. Even 
if I count memory multiple times, as I think is likely for snapd I 
think, it still does not account for anywhere near 15.1 GB of RAM.
Best regards
Omar

[1] 
http://manpages.ubuntu.com/manpages/cosmic/man5/spl-module-parameters.5.html 
about the parameter spl_kmem_cache_kmem_limit


More information about the zfs-discuss mailing list