xcache (lsetup xcache)

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.



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


xcache -h

Git repo has more details on advanced usage - eg delegation of proxies.


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:


  • 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.)



For example, locally:

root -b
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")


If you want to process a dataset that is available through rucio:

# 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/'
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2019-05-22 - AsokaDeSilva
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback