Data Management
Understanding the various file systems, and how to use them properly, is critical to optimizing your workflow and being a good SciNet citizen. This page describes the various Trillium file systems, and how to properly use them.
Performance
The file systems on SciNet, with the exception of archive, are GPFS, a high-performance file system which provides rapid reads and writes to large datasets in parallel from many nodes. As a consequence of this design, however, the file system performs quite poorly at accessing data sets which consist of many, small files. For instance, you will find that reading data in from one 16MB file is enormously faster than from 400 40KB files. Such small files are also quite wasteful of space, as the blocksize for the scratch and project filesystems is 16MB. This is something you should keep in mind when planning your input/output strategy for runs on SciNet.
For instance, if you run multi-process jobs, having each process write to a file of its own is not an scalable I/O solution. A directory gets locked by the first process accessing it, so all other processes have to wait for it. Not only has the code just become considerably less parallel, chances are the file system will have a time-out while waiting for your other processes, leading your program to crash mysteriously. Consider using MPI-IO (part of the MPI-2 standard), which allows files to be opened simultaneously by different processes, or using a dedicated process for I/O to which all other processes send their data, and which subsequently writes this data to a single file.
Purpose of each file system
Trillium and Balam access several different file systems. Note that not all of these file systems are available to all users.
/home ($HOME)
/home is intended primarily for individual user files, common software or small datasets used by others in the same group, provided it does not exceed individual quotas. Otherwise you may consider /scratch or /project. /home is read-only on the compute nodes and has daily backups.
/scratch ($SCRATCH)
/scratch is to be used primarily for temporary or transient files, checkpoint dumps, for all the results of your computations and simulations, or any material that can be easily recreated or reacquired. You may use scratch as well for any intermediate step in your workflow, provided it does not induce too much I/O (Input/Output) or too many small files on this disk-based storage pool, otherwise you should consider burst buffer (/bb). Once you have your final results, those that you want to keep for the long term, you may migrate them to /project or /archive. /scratch has no backups. There is currently no automatic purging policy on Trillium, but scratch is not a long-term storage location.
/project ($PROJECT)
/project is available to groups whose PIs have a storage allocation, and is intended for common group software, large static datasets, or any material very costly to be reacquired or re-generated by the group, associated with jobs currently running on Trillium or Balam. Material on /project is expected to remain relatively immutable over time. You should think of $PROJECT as if it was $STATIC. Temporary or transient files should be kept on scratch, not project. High data turnover induces stress and unnecessary consumption of tapes on the TSM backup system, long after this material has been deleted, due to backup retention policies and the extra versions kept of the same file. Even renaming top directories is enough to trick the system into assuming a completely new directory tree has been created, and the old one deleted, hence think carefully about your naming convention ahead of time, and stick with it. Users abusing the project file system and using it as scratch will be flagged and contacted. Note that /project is only available to groups with RAC allocation.
/archive ($ARCHIVE)
/archive is available to groups whose PIs have a storage allocation, and on Trillium and Balam it is the 'nearline' storage pool. It's used if you want to temporarily offload semi-active material from any of the above file systems. In practice users will offload/recall material as part of their regular workflow, or when they hit their quotas on scratch or project. That material can remain on HPSS for a few months to a few years. Note that /archive is only available to groups with RAC allocation.
/dev/shm (RAM)
On the Trillium and Balam nodes ramdisk is available. Ramdisk is much faster than real disk, and faster than Burst Buffer. Up to 70 percent of the RAM on the node (i.e. 202GB) may be used as a temporary local file system. This is particularly useful in the early stages of migrating desktop-computing codes to an HPC platform, especially those that use a lot of file I/O (Input/Output). Using a lot of I/O is a bottleneck in large scale computing, especially on parallel file systems, since the files are synchronized across the whole network.
$SLURM_TMPDIR (RAM)
For consistency with the general purpose Alliance clusters (Nibi, Fir, Rorqual and Narval), the environment variable $SLURM_TMPDIR will be set on Trillium compute jobs. Note that this variable will point to RAMdisk, not to local hard drives. The $SLURM_TMPDIR directory will be empty when your jobs starts and its content gets deleted after the job has finished.
Note that Trillium and Balam compute nodes have no local disks, so $SLURM_TMPDIR lives in memory (ramdisk), in contrast to the general purpose systems of the Alliance (formerly Compute Canada), i.e., Fir, Nibi, Rorqual and Narval, where this variable points to a directory on a node-local SSD disk.
Quotas and purging
You should familiarize yourself with the various file systems, what purpose they serve, and how to properly use them. This table summarizes the various file systems.
| location | quota | block size | expiration time | backed up | on login nodes | on compute nodes | |
|---|---|---|---|---|---|---|---|
| $HOME | 100 GB / 250,000 files per user | 1 MB | yes | yes | read-only | ||
| $SCRATCH | 25 TB / 6,000,000 files per user provided group quota is not reached | 16 MB | none at present | no | yes | yes | |
| groups of up to 4 users | 50TB for the group | ||||||
| groups of up to 11 users | 125TB for the group | ||||||
| groups of up to 28 users | 250TB for the group | ||||||
| groups of up to 60 users | 400TB for the group | ||||||
| groups with over 60 users | 500TB for the group | ||||||
| $PROJECT | by group allocation | 16 MB | yes | yes | yes | ||
| $ARCHIVE | by group allocation | dual-copy | no | no | |||
| $BBUFFER | 10 TB per user | 1 MB | very short | no | yes | yes | |
- Inode vs. Space quota (PROJECT and SCRATCH)
- dynamic quota per group (SCRATCH)
- Compute nodes do not have local storage.
- Archive space is on HPSS, and is not accessible on the login, compute, or datamover nodes.
- Backup means a recent snapshot, not a replica of all data or version that ever was.
$BBUFFERstands for the Burst Buffer, a faster parallel storage tier for temporary data.
How much Disk Space Do I have left?
The diskusage_report command, available on the Trillium login nodes and datamovers, provides information in a number of ways on the home, scratch, project and archive file systems. For instance, how much disk space is being used by yourself and your group (with the -a option), or how much your usage has changed over a certain period ("delta information") or you may generate plots of your usage over time. Please see the usage help below for more details.
Usage: diskUsage [-h|-?| [-a] [-u <user>]
-h|-?: help
-a: list usages of all members on the group
-u <user>: as another user on your group
Note: information on usage and quota is only updated every 3 hours!
Scratch purging
There is currently no automatic purging policy for /scratch on Trillium. Scratch is still not a long-term storage location and has no backups: move anything you need to keep to /project or /archive. A purging policy may be introduced in the future; this page will be updated if that happens.
Handling large collections of files
There are a number of situations in which dealing with a format that encapsulates and compacts very large numbers of small files may be more performant and convenient than handling those small files in expanded format directly in the file system. These alternative file formats also save a lot of stress on the backup system, since tape is not designed to deal with a lot of small files. It also help you not hit your inodes quota on the file systems.
Please visit this page for more details:
https://docs.alliancecan.ca/wiki/Handling_large_collections_of_files
Backup Policy
Our backup is based on versions, not on date or age:
- In general we keep the 2 most recent versions of a file, one per day, provided it exists on the file system. Once a file is deleted we expire the oldest version from the backup, and keep the most recent for 60 days. After that grace period then that only version is expired as well.
- We may have 1 or 2 versions of a file on the backup for over 10 years, provided the original has never been deleted from the file system.
- On the other hand we may not have any backup, if the user created the file in the morning and deleted in the afternoon, since the backup system never had a chance to capture the file (it runs once a day around midnight).
- And the user may have generated several versions of a file during the day, however only the most recent version before the backup runs will be captured for that day.
Moving data
Data for analysis and final results need to be moved to and from Trillium and Balam. There are several ways to accomplish this.
Using rsync/scp
Move amounts less than 10GB through the login nodes.
- Login nodes and datamovers are visible from outside SciNet.
- Use scp or rsync to trillium.scinet.utoronto.ca or trillium.alliancecan.ca (no difference).
- This will time out for amounts larger than about 10GB.
Move amounts larger than 10GB through the datamover nodes.
- From a login node, ssh to
tri-dm{1,2,3,4}. From there you can transfer to or from the cluster. - Alternatively, you may also login/scp/rsync directly to the datamovers from the outside:
tri-dm1.scinet.utoronto.ca tri-dm2.scinet.utoronto.ca tri-dm3.scinet.utoronto.ca tri-dm4.scinet.utoronto.ca
- If you do this often, consider using Globus, a web-based tool for data transfer.
Note that you can only connect 4 times in a 2-minute window to the login nodes or the datamover nodes. So bundle your transfers, i.e., specify multiple files to be copied as arguments to scp or rsync, or copy whole directories, or zip/tar the files up and unzip/untar them on the other end.
If you want to transfer smaller files between other Digital Research Alliance Canada clusters and Trillium use the SSH agent forwarding flag, -A when logging into another cluster. For example, to copy files to Trillium from Nibi use:
ssh -A USERNAME@nibi.alliancecan.ca
then perform the copy:
[USERNAME@l1.nibi ~]$ scp file USERNAME@trillium.alliancecan.ca:/scratch/USERNAME/
Using Globus
Please check the comprehensive documentation here, and here.
The Trillium endpoint is "alliancecan#trillium".
Moving data to HPSS/Archive/Nearline
HPSS is for long-term storage of data.
- HPSS is a tape-based storage solution, and is SciNet's nearline a.k.a. archive facility.
- Storage space on HPSS is allocated through the annual Resource Allocation Competition (RAC) administered by the Digital Research Alliance of Canada.
File/Ownership Management (ACL)
- By default, at SciNet, users within the same group already have read permission to each other's files (not write)
- You may use access control list (ACL) to allow your supervisor (or another user within your group) to manage files for you (i.e., create, move, rename, delete), while still retaining your access and permission as the original owner of the files/directories. You may also let users in other groups or whole other groups access (read, execute) your files using this same mechanism.