Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

ZFS buffer/cache is counted under used memory #44

Closed
borutmrak opened this issue Apr 21, 2014 · 5 comments · May be fixed by #976
Closed

ZFS buffer/cache is counted under used memory #44

borutmrak opened this issue Apr 21, 2014 · 5 comments · May be fixed by #976

Comments

@borutmrak
Copy link

I'm running zfsonlinux and htop is counting the ZFS ARC (memory) cache under normal used memory.

This is because ZFS doesn't use normal Linux memory cache but it's own version.

It would be useful if htop could detect if ZFS is running (maybe checking for /dev/zfs) and in that case show the memory used by ZFS cache in a different colour or maybe joined with the normal buffers/cache.

ARC used memory can be checked in /proc/spl/kstat/zfs/arcstats (size):

# grep ^size /proc/spl/kstat/zfs/arcstats 
size                            4    3533162592
@hishamhm
Copy link
Owner

But does it behave like normal Linux memory cache? (ie, is it a kernelspace cache and if other programs need the memory does it relinquish it?)

@borutmrak
Copy link
Author

Yes, it does.

The limits for the cache are set in /sys/module/zfs/parameters/zfs_arc_max and /sys/module/zfs/parameters/zfs_arc_min, so there might be a minimum amount that is always in use, but the default is 0.

@hishamhm hishamhm closed this as completed May 3, 2014
@flaviut
Copy link

flaviut commented Jun 8, 2018

It looks like ARC space is considered correctly on FreeBSD, but not Linux.

Is this bug something you're willing to re-open?

@xornet-sl
Copy link

@hishamhm Please, could you consider adding this feature for linux?
It would be great if I could see ARC statistics by different color in memory bar and as a different counter!
It would be very useful feature!

@Harvie
Copy link

Harvie commented Jan 3, 2020

This is still a problem. Can you please take a look at it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants