Exploring Remote Resources
Overview
Teaching: 25 min
Exercises: 10 minQuestions
How does my local computer compare to the remote systems?
How does the login node compare to the compute nodes?
Are all compute nodes alike?
Objectives
Survey system resources using
nproc
,free
, and the queuing systemCompare & contrast resources on the local machine, login node, and worker nodes
Learn about the various filesystems on the cluster using
df
Find out
who
else is logged inAssess the number of idle and occupied nodes
Look Around the Remote System
If you have not already connected to Baskerville, please do so now:
[user@laptop ~]$ ssh yourUsername@login.baskerville.ac.uk
Take a look at your home directory on the remote system:
[yourUsername@bask-pg0310u18a ~]$ ls
What’s different between your machine and the remote?
Open a second terminal window on your local computer and run the
ls
command (without logging in to Baskerville). What differences do you see?Solution
You would likely see something more like this:
[user@laptop ~]$ ls
Applications Documents Library Music Public Desktop Downloads Movies Pictures
The remote computer’s home directory shares almost nothing in common with the local computer: they are completely separate systems!
Most high-performance computing systems run the Linux operating system, which
is built around the UNIX Filesystem Hierarchy Standard. Instead of
having a separate root for each hard drive or storage medium, all files and
devices are anchored to the “root” directory, which is /
:
[yourUsername@bask-pg0310u18a ~]$ ls /
bin etc lib64 proc sbin sys var
boot bask mnt root scratch tmp working
dev lib opt run srv usr
The /bask/homes/y
directory is the one where
we generally want to keep all of our files (Note: on Baskerville, the last letter of the directory corresponds to the first letter of your username). Other folders on a UNIX OS contain
system files and change as you install new software or upgrade your OS.
Using HPC filesystems
On HPC systems, you have a number of places where you can store your files. These differ in both the amount of space allocated and whether or not they are backed up.
- Home – often a network filesystem, data stored here is available throughout the HPC system, and often backed up periodically. Files stored here are typically slower to access, the data is actually stored on another computer and is being transmitted and made available over the network!
- Scratch – typically faster than the networked Home directory, but not usually backed up, and should not be used for long term storage.
- Work – sometimes provided as an alternative to Scratch space, Work is a fast file system accessed over the network. Typically, this will have higher performance than your home directory, but lower performance than Scratch; it may not be backed up. It differs from Scratch space in that files in a work file system are not automatically deleted for you: you must manage the space yourself.
Nodes
Individual computers that compose a cluster are typically called nodes (although you will also hear people call them servers, computers and machines). On a cluster, there are different types of nodes for different types of tasks. The node where you are right now is called the login node, head node, landing pad, or submit node. A login node serves as an access point to the cluster.
As a gateway, the login node should not be used for time-consuming or resource-intensive tasks. You should be alert to this, and check with your site’s operators or documentation for details of what is and isn’t allowed. It is well suited for uploading and downloading files, setting up software, and running tests. Generally speaking, in these lessons, we will avoid running jobs on the login node.
Who else is logged in to the login node?
[yourUsername@bask-pg0310u18a ~]$ who
This may show only your user ID, but there are likely several other people (including fellow learners) connected right now.
Dedicated Transfer Nodes
If you want to transfer larger amounts of data to or from the cluster, some systems offer dedicated nodes for data transfers only. The motivation for this lies in the fact that larger data transfers should not obstruct operation of the login node for anybody else. Check with your cluster’s documentation or its support team if such a transfer node is available. As a rule of thumb, consider all transfers of a volume larger than 500 MB to 1 GB as large. But these numbers change, e.g., depending on the network connection of yourself and of your cluster or other factors.
The real work on a cluster gets done by the compute (or worker) nodes. compute nodes come in many shapes and sizes, but generally are dedicated to long or hard tasks that require a lot of computational resources.
All interaction with the compute nodes is handled by a specialized piece of software called a scheduler (the scheduler used in this lesson is called Slurm). We’ll learn more about how to use the scheduler to submit jobs next, but for now, it can also tell us more information about the compute nodes.
For example, we can view all of the compute nodes by running the command
sinfo
(Note: command not available on Baskerville).
[yourUsername@bask-pg0310u18a ~]$ sinfo
PARTITION AVAIL TIMELIMIT NODES STATE NODELIST
normal* up 7-00:00:00 1 down* c5-12
normal* up 7-00:00:00 87 mix c1-[7,13-15,19,22-24,28,31,33,3.......
normal* up 7-00:00:00 110 alloc c1-[1-6,8-9,11-12,16-18,20-21,........
normal* up 7-00:00:00 1 idle c1-10
bigmem up 14-00:00:0 1 drain c6-3
bigmem up 14-00:00:0 10 mix c3-[29-31,53,56],c6-[1,4-7]
bigmem up 14-00:00:0 1 alloc c6-2
bigmem up 14-00:00:0 24 idle c3-[32-52,54-55],c6-8
accel up 14-00:00:0 3 mix c7-[1-2,8]
accel up 14-00:00:0 5 alloc c7-[3-7]
optimist up infinite 1 down* c5-12
optimist up infinite 1 drain c6-3
optimist up infinite 100 mix c1-[7,13-15,19,22-24,28,31,33,35,37...
optimist up infinite 116 alloc c1-[1-6,8-9,11-12,16-18,20-21,25-27...
optimist up infinite 25 idle c1-10,c3-[32-52,54-55],c6-8
A lot of the nodes are busy running work for other users: we are not alone here!
There are also specialized machines used for managing disk storage, user authentication, and other infrastructure-related tasks. Although we do not typically logon to or interact with these machines directly, they enable a number of key features like ensuring our user account and files are available throughout the HPC system.
What’s in a Node?
All of the nodes in an HPC system have the same components as your own laptop or desktop: CPUs (sometimes also called processors or cores), memory (or RAM), and disk space. CPUs are a computer’s tool for actually running programs and calculations. Information about a current task is stored in the computer’s memory. Disk refers to all storage that can be accessed like a file system. This is generally storage that can hold data permanently, i.e. data is still there even if the computer has been restarted. While this storage can be local (a hard drive installed inside of it), it is more common for nodes to connect to a shared, remote fileserver or cluster of servers.
Explore Your Computer
Try to find out the number of CPUs and amount of memory available on your personal computer.
Note that, if you’re logged in to the remote computer cluster, you need to log out first. To do so, type
Ctrl+d
orexit
:[yourUsername@bask-pg0310u18a ~]$ exit [user@laptop ~]$
Solution
There are several ways to do this. Most operating systems have a graphical system monitor, like the Windows Task Manager. More detailed information can be found on the command line:
- Run system utilities
[user@laptop ~]$ nproc --all [user@laptop ~]$ free -m
- Read from
/proc
[user@laptop ~]$ cat /proc/cpuinfo [user@laptop ~]$ cat /proc/meminfo
- Run system monitor
[user@laptop ~]$ htop
Explore the Login Node
Now compare the resources of your computer with those of the login node.
Solution
[user@laptop ~]$ ssh yourUsername@login.baskerville.ac.uk [yourUsername@bask-pg0310u18a ~]$ nproc --all [yourUsername@bask-pg0310u18a ~]$ free -m
You can get more information about the processors using
lscpu
, and a lot of detail about the memory by reading the file/proc/meminfo
:[yourUsername@bask-pg0310u18a ~]$ less /proc/meminfo
You can also explore the available filesystems using
df
to show disk free space. The-h
flag renders the sizes in a human-friendly format, i.e., GB instead of B. The type flag-T
shows what kind of filesystem each resource is.[yourUsername@bask-pg0310u18a ~]$ df -Th
Different results from
df
- The local filesystems (ext, tmp, xfs, zfs) will depend on whether you’re on the same login node (or compute node, later on).
- Networked filesystems (beegfs, cifs, gpfs, nfs, pvfs) will be similar – but may include yourUsername, depending on how it is mounted.
Shared Filesystems
This is an important point to remember: files saved on one node (computer) are often available everywhere on the cluster!
Explore a Worker Node
Finally, let’s look at the resources available on the worker nodes where your jobs will actually run. Try running this command to see the name, CPUs and memory available on the worker nodes (the instructors will give you the ID of the compute node to use):
sinfo --node c3-12 -o "%n %c %m"
Compare Your Computer, the Login Node and the Compute Node
Compare your laptop’s number of processors and memory with the numbers you see on the cluster login node and compute node. What implications do you think the differences might have on running your research work on the different systems and nodes?
Solution
Compute nodes are usually built with processors that have higher core-counts than the login node or personal computers in order to support highly parallel tasks. Compute nodes usually also have substantially more memory (RAM) installed than a personal computer. More cores tends to help jobs that depend on some work that is easy to perform in parallel, and more, faster memory is key for large or complex numerical tasks.
Differences Between Nodes
Many HPC clusters have a variety of nodes optimized for particular workloads. Some nodes may have larger amount of memory, or specialized resources such as Graphics Processing Units (GPUs or “video cards”).
With all of this in mind, we will now cover how to talk to the cluster’s scheduler, and use it to start running our scripts and programs!
Key Points
An HPC system is a set of networked machines.
HPC systems typically provide login nodes and a set of compute nodes.
The resources found on independent (worker) nodes can vary in volume and type (amount of RAM, processor architecture, availability of network mounted filesystems, etc.).
Files saved on shared storage are available on all nodes.
The login node is a shared machine: be considerate of other users.