Skip to content

Commit

Permalink
Merge pull request #1677 from bbockelm/valgrind_tuning
Browse files Browse the repository at this point in the history
Tuning Pelican for running xrootd under valgrind
  • Loading branch information
jhiemstrawisc authored Nov 27, 2024
2 parents ee6adbe + 62a2854 commit 8e5f60a
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/resources/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Director:
CachePresenceTTL: 1m
CachePresenceCapacity: 10000
Cache:
DefaultCacheTimeout: "9.5s"
Port: 8442
SelfTest: true
SelfTestInterval: 15s
Expand Down Expand Up @@ -100,6 +101,7 @@ Shoveler:
PortHigher: 9999
AMQPExchange: shoveled-xrd
Xrootd:
MaxStartupWait: "10s"
Mount: ""
ManagerPort: 1213
DetailedMonitoringPort: 9930
Expand Down
19 changes: 19 additions & 0 deletions docs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,16 @@ type: int
default: 0
components: ["cache"]
---
name: Cache.DefaultCacheTimeout
description: |+
The default value of the cache operation timeout if one is not specified by the client.
Newer clients should always specify a timeout; changing this default is rarely necessary.
type: duration
default: 9.5s
hidden: true
components: ["cache"]
---
############################
# Director-level configs #
############################
Expand Down Expand Up @@ -2355,6 +2365,15 @@ type: string
default: none
components: ["origin"]
---
name: Xrootd.MaxStartupWait
description: |+
The maximum amount of time pelican will wait for the xrootd daemons to
successfully start
type: duration
default: 10s
hidden: true
components: ["origin", "cache"]
---
############################
# Monitoring-level configs #
############################
Expand Down
1 change: 1 addition & 0 deletions images/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ RUN yum install -y --enablerepo=osg-testing goreleaser npm xrootd-devel xrootd-s
xrdcl-http jq procps docker make curl-devel java-17-openjdk-headless git cmake3 gcc-c++ openssl-devel sqlite-devel libcap-devel sssd-client \
xrootd-multiuser \
zlib-devel \
vim valgrind gdb gtest-devel \
&& yum clean all

# The ADD command with a api.github.com URL in the next couple of sections
Expand Down
2 changes: 2 additions & 0 deletions param/parameters.go

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

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

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

8 changes: 5 additions & 3 deletions xrootd/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func makeUnprivilegedXrootdLauncher(daemonName string, configPath string, isCach
if confDir := os.Getenv("XRD_PLUGINCONFDIR"); confDir != "" {
result.ExtraEnv = append(result.ExtraEnv, "XRD_PLUGINCONFDIR="+confDir)
}
result.ExtraEnv = append(result.ExtraEnv, "XRD_PELICANFEDERATIONMETADATATIMEOUT="+param.Cache_DefaultCacheTimeout.GetDuration().String())
result.ExtraEnv = append(result.ExtraEnv, "XRD_PELICANDEFAULTHEADERTIMEOUT="+param.Cache_DefaultCacheTimeout.GetDuration().String())
}
return
}
Expand Down Expand Up @@ -165,7 +167,7 @@ func LaunchDaemons(ctx context.Context, launchers []daemon.Launcher, egrp *errgr
return
}

ticker := time.NewTicker(10 * time.Second)
ticker := time.NewTicker(param.Xrootd_MaxStartupWait.GetDuration())
defer ticker.Stop()
select {
case <-ctx.Done():
Expand All @@ -180,8 +182,8 @@ func LaunchDaemons(ctx context.Context, launchers []daemon.Launcher, egrp *errgr
portStartCallback(port)
}
case <-ticker.C:
log.Errorln("XRootD did not startup after 10s of waiting")
err = errors.New("XRootD did not startup after 10s of waiting")
log.Errorln("XRootD did not startup after", param.Xrootd_MaxStartupWait.GetDuration().String(), "of waiting")
err = errors.New("XRootD did not startup after " + param.Xrootd_MaxStartupWait.GetDuration().String() + " of waiting")
return
}

Expand Down

0 comments on commit 8e5f60a

Please sign in to comment.