Prototyping Redis functionality on relevant computing systems for ExaEpi.
The idea here is that the user installs a personal Redis. Then for each run:
-
Launches the DB server on the login node
-
Launches the compute jobs (via Merlin?), all of which have access to the DB
-
When the compute job is completing, one of the jobs will use the Redis client to issue the shutdown command
-
On an error, the user will have to interactively shutdown the DB
-
The data will be persisted for future runs or analysis
$ git clone [email protected]:redis/redis.git $ cd redis # Switch to a stable branch tag: $ git checkout 7.2.0 $ nice make
Get the login node IP address via ip addr
. E.g. 10.201.0.56
. (There are many NICs, we could write a script to make this easier.)
$ nice -n 19 redis/src/redis-server redis/redis.conf
For a persistent password:
-
Edit
redis/redis.conf
-
Change the
requirepass
field to the password
For a non-persistent password:
Set a password by connecting from localhost
.
$ redis/src/redis-cli > config set requirepass PASSWORD
Terminate with Ctrl-C or issue shutdown
from client.
Start interactive Polaris session with something like:
$ qsub -I -A PROJECT -q debug -l 'select=1:system=polaris' -l 'walltime=00:60:00' -l 'filesystems=home:eagle:grand' -- /usr/bin/env 'SHLVL=0' zsh -l
Run the interactive client with the server IP address and authenticate:
$ redis/src/redis-cli -h 10.201.0.56 > auth PASSWORD # Now you can issue arbitrary Redis queries > set x 42 OK > get x "42"
-
Add to
PATH
:~wozniak/Public/sfw/redis/bin
-
Copy
redis.conf
to an editable location:$ cp ~wozniak/Public/sfw/redis/examples/redis.conf /path/to/redis.conf
-
Edit
redis.conf
to:-
change the value of
dir
to a writeable directory -
change the value of
dbfilename
to a writable filename indir
-
-
Run
redis-server /path/to/redis.conf
-
When you shutdown the server, the state is saved in your
dir/dbfilename
location.