Skip to content

Commit ba204f9

Browse files
committed
CLI,DOC: Fix LRU high/low watermark configuration setting
Fixes EOS-6267
1 parent 7dd7bf9 commit ba204f9

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

console/commands/com_attr.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,9 @@ com_attr(char* arg1)
539539
fprintf(stdout,
540540
" they haven't been accessed longer than <age> ago. <age> is defined like 3600,3600s,60min,1h,1mo,1y...\n");
541541
fprintf(stdout,
542-
" sys.lru.watermark=<low>:<high> : if the watermark reaches more than <high> %%, files will be removed \n");
542+
" sys.lru.lowwatermark=<low>\n");
543543
fprintf(stdout,
544-
" until the usage is reaching <low> %%.\n");
544+
" sys.lru.highwatermark=<high> : if the watermark reaches more than <high> %%, files will be removed until the usage is reaching <low> %%.\n");
545545
fprintf(stdout, "\n");
546546
fprintf(stdout,
547547
" sys.lru.convert.match=[match1:<age1>,match2:<age2>,match3:<age3>:<<size3>,match4:<age4>:><size4>...]\n");
@@ -702,7 +702,9 @@ com_attr(char* arg1)
702702
fprintf(stdout,
703703
" |eos> quota set -g 99 -v 1T /eos/instance/cache/ # define project quota on the cache\n");
704704
fprintf(stdout,
705-
" |eos> attr set sys.lru.watermark=90:95 /eos/instance/cache/ # define 90 as low and 95 as high watermark\n");
705+
" |eos> attr set sys.lru.lowwatermark=90 /eos/instance/cache/ \n");
706+
fprintf(stdout,
707+
" |eos> attr set sys.lru.highwatermark=95 /eos/instance/cache/ # define 90 as low and 95 as high watermark\n");
706708
fprintf(stdout, "\n");
707709
fprintf(stdout,
708710
"--------------------------------------------------------------------------------\n");

doc/citrine/clicommands/attr.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ attr
6060
sys.lru.expire.match=[match1:<age1>,match2:<age2>..]
6161
: defines the rule that files with a given match will be removed if
6262
they haven't been accessed longer than <age> ago. <age> is defined like 3600,3600s,60min,1h,1mo,1y...
63-
sys.lru.watermark=<low>:<high> : if the watermark reaches more than <high> %, files will be removed
64-
until the usage is reaching <low> %.
63+
sys.lru.lowwatermark=<low>
64+
sys.lru.highwatermark=<high> : if the watermark reaches more than <high> %, files will be removed until the usage is reaching <low> %.
6565
sys.lru.convert.match=[match1:<age1>,match2:<age2>,match3:<age3>:<<size3>,match4:<age4>:><size4>...]
6666
defines the rule that files with a given match will be converted to the layouts defined by sys.conversion.<match> when their access time reaches <age>. Optionally a size limitation can be given e.g. '*:1w:>1G' as 1 week old and larger than 1G or '*:1d:<1k' as one day old and smaller than 1k
6767
sys.stall.unavailable=<sec> : stall clients for <sec> seconds if a needed file system is unavailable
@@ -150,7 +150,8 @@ attr
150150
- configure a volume based LRU cache with a low/high watermark
151151
e.g. when the cache reaches the high watermark it cleans the oldest files until low-watermark is reached ...
152152
|eos> quota set -g 99 -v 1T /eos/instance/cache/ # define project quota on the cache
153-
|eos> attr set sys.lru.watermark=90:95 /eos/instance/cache/ # define 90 as low and 95 as high watermark
153+
|eos> attr set sys.lru.lowwatermark=90 /eos/instance/cache/
154+
|eos> attr set sys.lru.highwatermark=95 /eos/instance/cache/ # define 90 as low and 95 as high watermark
154155
|eos> attr set sys.force.atime=300 /eos/dev/instance/cache/ # track atime with a time resolution of 5 minutes
155156
--------------------------------------------------------------------------------
156157
- configure clean-up of empty directories ...

doc/citrine/configuration/lru.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ When the cache reaches the high watermark it cleans the oldest files untile low-
7272
.. code-block:: bash
7373
7474
# define project quota on the cache directory
75-
eps quota set -g 99 -v 1T /eos/instance/cache/
75+
eos quota set -g 99 -v 1T /eos/instance/cache/
7676
7777
# define 90 as low and 95 as high watermark
78-
eos attr set sys.lru.watermark=90:95 /eos/instance/cache/
78+
eos attr set sys.lru.lowwatermark=90 /eos/instance/cache/
79+
eos attr set sys.lru.highwatermark=95 /eos/instance/cache/
7980
8081
# track atime with a time resolution of 5 minutes
8182
eos attr set sys.force.atime=300 /eos/dev/instance/cache/

doc/diopside/manual/microservices.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,10 +1652,11 @@ When the cache reaches the high watermark it cleans the oldest files untile low-
16521652
.. code-block:: bash
16531653
16541654
# define project quota on the cache directory
1655-
eps quota set -g 99 -v 1T /eos/instance/cache/
1655+
eos quota set -g 99 -v 1T /eos/instance/cache/
16561656
16571657
# define 90 as low and 95 as high watermark
1658-
eos attr set sys.lru.watermark=90:95 /eos/instance/cache/
1658+
eos attr set sys.lru.lowwatermark=90 /eos/instance/cache/
1659+
eos attr set sys.lru.highwatermark=95 /eos/instance/cache/
16591660
16601661
# track atime with a time resolution of 5 minutes (space configuration parameter)
16611662
eos space config default space.atime=300

0 commit comments

Comments
 (0)