You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deployment/README.md
+2-67Lines changed: 2 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This directory contains a [Terraform Module](https://www.terraform.io/docs/modul
5
5
The `main` branch may be updated at any time with the latest changes which could be breaking. You should always configure your module to use a release. This can be configured in the modules Terraform Configuration block.
@@ -182,26 +182,6 @@ The service account will need the following project level IAM permissions:
182
182
| LOCAL_SSDS | (Only used if `CACHEFILESD_DISK_TYPE` = `local-ssd`) The number of Local SSDs to assign to each cache instance. This can be either 0 to 8, 16, or 24 local SSDs for up to 9TB of capacity ([see here](https://cloud.google.com/compute/docs/disks/local-ssd#choosing_a_valid_number_of_local_ssds)). If you are setting this to 24 Local SSDs you should also change the `MACHINE_TYPE` variable to an instance with 32 CPU's, for example `n1-highmem-32`. | False |`4`|
183
183
| CACHEFILESD_PERSISTENT_DISK_SIZE_GB | (Only used if `CACHEFILESD_DISK_TYPE` = `pd-standard`, `pd-balanced` or `pd-ssd`), what size should the persistent disk be in GB? Can be set between `100` and `64000`. For large volumes, consider larger instance types (see [here](https://cloud.google.com/compute/docs/disks/performance)). | False |`1500`|
| CULLING | Culling method to use (`default`, `custom`, or `none`). | False |`custom`|
190
-
| CULLING_LAST_ACCESS | (custom only) Remove files from the cache that were last accessed over `CULLING_LAST_ACCESS` ago. | False | If using Local SSD: 1 hour for each `LOCAL_SSD`.<br><br>If using Persistent Disk, 6 hours. |
191
-
| CULLING_THRESHOLD | (custom only) Cull when the percentage of remaining disk space (or inodes) is less than `CULLING_THRESHOLD`. | False |`20`|
192
-
| CULLING_INTERVAL | (custom only) How often to check if the remaining disk space is less than the `CULLING_THRESHOLD`| False |`1m`|
193
-
| CULLING_QUIET_PERIOD | (custom only) After culling, how long to wait before resuming checks. | False |`CULLING_LAST_ACCESS / 4`|
194
-
195
-
The culling `CULLING` mode supports the following options:
196
-
197
-
*`default` - This uses the standard cachefilesd to perform culling.
198
-
*`custom` - This uses the custom knfsd-cull service to perform culling.
199
-
*`none` - Disables culling completely
200
-
201
-
The purpose of the custom culling agent is to workaround a known issue where cachefilesd may stop culling files in the cache. See [culling](../docs/culling.md) for more information on how to configure cachefilesd, and the known issue where cachefilesd may stop culling.
202
-
203
-
The `none` option supports special cases where the cache rarely fills up.
204
-
205
185
### Mount Options
206
186
207
187
These mount options are for the proxy to the source server.
@@ -232,51 +212,6 @@ These mount options are for the proxy to the source server.
232
212
| NOHIDE | When `true`, adds the `nohide` option to all the exports. | False |`true`|
233
213
| EXPORT_OPTIONS | Any custom NFS exports options. These options will be applied to all NFS exports. | False |`""`|
234
214
235
-
#### Custom culling options
236
-
237
-
The durations, `CULLING_LAST_ACCESS`, `CULLING_INTERVAL`, and
238
-
`CULLING_QUIET_PERIOD` support `h`, `m`, and `s` (hours, minutes, seconds)
239
-
For example `5m`, `2.5h`, or `1h30m`.
240
-
241
-
To avoid deleting files unnecessarily the culling process will wait until the
242
-
remaining percentage of free space is less than `CULLING_THRESHOLD`. The
243
-
remaining free space will be checked every `CULLING_INTERVAL`.
244
-
245
-
Any file with a last access time older than `CULLING_LAST_ACCESS` will be
246
-
deleted. Because files are deleted based on their last access, this might not
247
-
remove enough files (or any files) to bring the free space above the threshold
248
-
if most of the files in the cache have been used within the last access period.
249
-
It can also remove more files than required (possibly even all the files).
250
-
251
-
Once a culling attempt has been completed (even if no files were culled),
252
-
culling will wait for `CULLING_QUIET_PERIOD` before resuming culling checks.
253
-
This avoids repeatedly scanning the full file tree (costing IOPS) while most
254
-
files are in use.
255
-
256
-
**IMPORTANT:**`CULLING_THRESHOLD`*MUST* be greater than `bstop` and `fstop` in
257
-
`/etc/cachefilesd.conf`. Otherwise cachefilesd will stop caching data before the
258
-
custom culling threshold is reached so culling will never run.
259
-
260
-
#### Example
261
-
262
-
```terraform
263
-
CULLING = "custom"
264
-
CULLING_LAST_ACCESS = "4h"
265
-
CULLING_THRESHOLD = 20
266
-
CULLING_INTERVAL = "1m"
267
-
CULLING_QUIET_PERIOD = "1h"
268
-
```
269
-
270
-
The culling agent will check every minute (`CULLING_INTERVAL`) to see if the
271
-
remaining disk space (or inodes) is less than 20% (`CULLING_THRESHOLD`) of the
272
-
total disk space.
273
-
274
-
When the remaining disk space is below the 20% threshold the culling agent will
275
-
then remove any files that were last accessed over four hours ago (`CULLING_LAST_ACCESS`)
276
-
from the cache.
277
-
278
-
The culling agent will then wait for at least one hour (`CULLING_QUIET_PERIOD`)
Copy file name to clipboardExpand all lines: deployment/terraform-module-knfsd/resources/tests/expected/configure-culling/culling-custom-creates-config
0 commit comments