Skip to content

Commit

Permalink
Merge pull request PelicanPlatform#1654 from turetske/cache-prefix-co…
Browse files Browse the repository at this point in the history
…nfigurable

Made the xrootd cache prefetch variable configurable via a pelican va…
  • Loading branch information
jhiemstrawisc authored Nov 12, 2024
2 parents abb1eec + b66c3e6 commit dbb8da6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/resources/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Cache:
SelfTestInterval: 15s
LowWatermark: 90
HighWaterMark: 95
BlocksToPrefetch: 0
LocalCache:
HighWaterMarkPercentage: 95
LowWaterMarkPercentage: 85
Expand Down
9 changes: 9 additions & 0 deletions docs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,15 @@ type: bool
default: false
components: ["cache"]
---
name: Cache.BlocksToPrefetch
description: |+
The number of 128 kilobyte blocks the cache will read ahead when recieving requests. This will put the data in the cache
potentially before it is needed and reduce the latency to the client when a request is made. However, it can also cause
many extra requests to an origin and potentially overload it when unnessesary. As such, this is turned off by default.
type: int
default: 0
components: ["cache"]
---
############################
# Director-level configs #
############################
Expand Down
1 change: 1 addition & 0 deletions param/parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions param/parameters_struct.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion xrootd/resources/xrootd-cache.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pfc.trace info
xrootd.tls all
xrd.network nodnr
pfc.blocksize 128k
pfc.prefetch 20
pfc.prefetch {{.Cache.BlocksToPrefetch}}
pfc.writequeue 16 4
pfc.ram 4g
pfc.diskusage {{if .Cache.LowWatermark}}{{.Cache.LowWatermark}}{{else}}0.90{{end}} {{if .Cache.HighWaterMark}}{{.Cache.HighWaterMark}}{{else}}0.95{{end}} purgeinterval 300s
Expand Down
1 change: 1 addition & 0 deletions xrootd/xrootd_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ type (
MetaLocations []string
LocalRoot string
PSSOrigin string
BlocksToPrefetch int
Concurrency int
X509ClientAuthenticationPrefixes []string
}
Expand Down

0 comments on commit dbb8da6

Please sign in to comment.