xcache (lsetup xcache)
WARNING: This page is obsolete.
Please look at
https://gitlab.cern.ch/atlas-tier3sw/xcache/-/blob/master/README.md
.
This is useful for laptops, desktops as well as Tier3s if you have users who access the same file at remote sites more than once using the root protocol. xcache caches the file at the specified directory so that subsequent access will be significantly faster as they will be local access.
Setup:
setupATLAS
Next do one of these:
lsetup xcache
voms-proxy-init -voms atlas -valid 96:0
OR if you want to setup a release as well ...
lsetup "asetup AthAnalysis,21.2.3" xcache
voms-proxy-init -voms atlas -valid 96:0
If you want to set this up for a Tier3, and generate / renew the proxy automatically, please look at the script
$ATLAS_LOCAL_ROOT_BASE/user/myproxydelegate-example.sh
Help
xcache -h
Git repo
has more details on advanced usage - eg delegation of proxies.
Start
Select a directory for the cache files as shown in the example below.
xcache start -d /tmp/desilva/myCache
This will define the following environment variables; for example:
ALRB_XCACHE_PROXY_REMOTE=root://atlasremote.triumf.ca:59560//
ALRB_XCACHE_PROXY=root://localhost:59560//
- if you are using it locally on the same session, then you are all ready.
- To use xcache in another session on the same machine, you need to define
export ALRB_XCACHE_PROXY...
- To use xcache on another machine, you need to define
export ALRB_XCACHE_PROXY_REMOTE...
- (you can do this for all users at your site if xcache is setup on one machine and run using one person's proxy renewed automatically.)
Usage
Locally
For example, locally:
root -b
e.g.
root [0] TFile::Open("${ALRB_XCACHE_PROXY}root://tbn18.nikhef.nl:1094//dpm/nikhef.nl/home/atlas/atlasdatadisk/rucio/data15_13TeV/d0/f1/AOD.11253261._000350.pool.root.1")
Other Machines on the Same Domain
For example, remote machines on the same domain:
root -b
root [0] TFile::Open("${ALRB_XCACHE_PROXY_REMOTE}root://tbn18.nikhef.nl:1094//dpm/nikhef.nl/home/atlas/atlasdatadisk/rucio/data15_13TeV/d0/eb/AOD.11253261._000047.pool.root.1")
Dataset
If you want to process a dataset that is available through rucio:
setupATLAS
# set up a root version and rucio wrapper
lsetup "root <version>" "rucio -w"
voms-proxy-init -voms atlas
and then get the list of files to process with the root protocol:
# get the nearest RSE which has the dataset you want
rucio list-dataset-replicas <dataset>
# get the URL of the files in the dataset for root access and append the xcache prefix
# You can replace ALRB_XCACHE_PROXY below with ALRB_XCACHE_PROXY_REMOTE if xcache is on another machine on the same domain
rucio list-file-replicas --rse <nearest RSE from previous step> --protocol root --pfns <dataset> | sed -e 's/^root/\${ALRB_XCACHE_PROXY}root/'