dandi / dandisets-healthstatus

Healthchecks of dandisets and support libraries (pynwb and matnwb)
0 stars 1 forks source link

FOI: I tuned up caching for davfs2 #78

Closed yarikoptic closed 6 days ago

yarikoptic commented 1 month ago

On drogon I see in the logs

Jun 13 10:23:29 drogon mount.davfs[3900294]: open files exceed max cache size by 848 MiBytes
Jun 13 10:23:29 drogon mount.davfs[3900294]: open files exceed max cache size by 525 MiBytes
Jun 13 10:23:29 drogon mount.davfs[3900294]: open files exceed max cache size by 307 MiBytes

@jwodder I have created/configured a different cache directory with allowance for 10G instead of default 50M:

drogon# git show
commit 851bed06507b6e263f314ce903fb23f25e625f6c (HEAD -> master)
Author: root <root@drogon.datalad.org>
Date:   Thu Jun 13 10:28:36 2024 -0400

    move/increase size for davfs2 cache

diff --git a/davfs2/davfs2.conf b/davfs2/davfs2.conf
index c86668f..3c567e4 100644
--- a/davfs2/davfs2.conf
+++ b/davfs2/davfs2.conf
@@ -61,7 +61,9 @@ follow_redirect 1
 # backup_dir      lost+found
 # cache_dir       /var/cache/davfs2 # system wide cache
 #                 ~/.davfs2/cache   # per user cache
+cache_dir /mnt/backup/cache/davfs2
 # cache_size      50                # MiByte
+cache_size 10000
 # table_size      1024
 # dir_refresh     60                # seconds
 # file_refresh    1                 # second
drogon# ls -ld /mnt/backup/cache/davfs2 /var/cache/davfs2
drwxrwxr-x 1 root davfs2    0 Jun 13 10:26 /mnt/backup/cache/davfs2
drwxrwxr-x 4 root davfs2 4096 Jun 12 11:43 /var/cache/davfs2

so I guess it should be in effect whenever you restart davfs2 mount.