Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are arc tuneables read during runtime? #299

Open
chid opened this issue Sep 2, 2020 · 4 comments
Open

Are arc tuneables read during runtime? #299

chid opened this issue Sep 2, 2020 · 4 comments

Comments

@chid
Copy link

chid commented Sep 2, 2020

I have been running ZFSin for a bit over two weeks and I've noticed that it consumes a huge chunk of my memory (20GB) without any way for me to reduce the amount. I have tried to set the zfs_arc_max to a much lower figure (500MB) and it appears that it's not honored. I have now adjusted it using the registry settings.

I expect that the answer would be to export and then reimport though I have had bluescreens the last few times I've tried to do this.

I noticed there was a similar issue occurring with ZFS openzfs/zfs#8463 though that code block doesn't appear to exist in ZFSin.

@lundman
Copy link
Collaborator

lundman commented Sep 2, 2020

If you want to change things dynamically (without rebooting), you can use the kstat tool;

https://openzfsonosx.org/wiki/Windows_kstat

@chid
Copy link
Author

chid commented Sep 2, 2020

I have tried using the command kstat.exe -w zfs:0:tunable:zfs_arc_max=5368709 and it didn't seem to have an impact. This is on version OpenZFSOnWindows-release-20200814.exe

@lundman
Copy link
Collaborator

lundman commented Sep 2, 2020

the zfs_arc_max is the write variable - then you read the new value from the other arc_max variable - i dont know why they split them. There is also a variable to simulate memory pressure - to make arc deflate

@chid
Copy link
Author

chid commented Sep 3, 2020

I assume you mean the other values are c, c_min, c_max

(base) PS C:\Windows\system32> kstat.exe -w zfs:0:tunable:zfs_arc_max=5368709
zfs:0:tunable:zfs_arc_max: 0 -> 5368709
(base) PS C:\Windows\system32> kstat.exe zfs:0:arcstats:c
module: zfs                             instance: 0
name:   arcstats                        class:    misc
        c                               16060096512

(base) PS C:\Windows\system32> kstat.exe zfs:0:arcstats:c_max
module: zfs                             instance: 0
name:   arcstats                        class:    misc
        c_max                           16060096512

(base) PS C:\Windows\system32> kstat.exe zfs:0:arcstats:c_min
module: zfs                             instance: 0
name:   arcstats                        class:    misc
        c_min                           2007512064

(base) PS C:\Windows\system32> kstat.exe -w zfs:0:tunable:zfs_arc_max=2007512064
zfs:0:tunable:zfs_arc_max: 5368709 -> 2007512064
(base) PS C:\Windows\system32> kstat.exe zfs:0:arcstats:c_min
module: zfs                             instance: 0
name:   arcstats                        class:    misc
        c_min                           2007512064

(base) PS C:\Windows\system32> kstat.exe zfs:0:arcstats:c_max
module: zfs                             instance: 0
name:   arcstats                        class:    misc
        c_max                           2007512064

(base) PS C:\Windows\system32> kstat.exe zfs:0:arcstats:c
module: zfs                             instance: 0
name:   arcstats                        class:    misc
        c                               2007512064

(base) PS C:\Windows\system32> kstat.exe zfs:0:arcstats:c
module: zfs                             instance: 0
name:   arcstats                        class:    misc
        c                               2007512064

Up until this point it appears nothing has changed (on my system ZFS still using ~16GB of ram)

I tried to update the zfs_arc_overflow_shift tuneable and it appears to trigger a change in memory usage (though not to the target size) to around 9GB.

Do you want me to write up something for the wiki?

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

No branches or pull requests

2 participants