Changes

Jump to navigation Jump to search
m
Local storage on the node
 
== The CephFS file system ==
'''WARNINGAs explained in the [[CCU: The GPU Cluster Quick Start|quick start tutorial]], every user can mount certain local host paths inside their pods, which refer to a global distributed Ceph file system had a recent critical failure and is currently not available. No mounts using /cephfs are possible at the momentReminder, you have to remove them from pod configuration to make the pods start. It primary home directory is still possible to use local storage SSDs on the nodes, so please use these for now. We work on restoring Ceph as soon as humanly possible.'''
As explained in the [[CCU:GPU Cluster Quick Start|quick start tutorial]], every user can mount certain local host paths inside their pods, which refer to a global distributed Ceph file system.<syntaxhighlight lang="bash">/cephfs/abyss/home/<your-username></syntaxhighlight>
This file system is usually very quite fast, but only if it is used for workloads it is designed for. Remember that it It is a distributed storage, this where the filesystem metadata is stored in databases on different servers, and the actual content of the files on other ones. This means that metadata access (such as reading file attributes, or on which server to look for a specific file) is over a database and can be a bottleneck. In effect, the task of reading the metadata for a small file is orders of magnitude more expensive than reading the actual contents of the file itself. This means that performance breaks down dramatically if writing or accessing many small files. In particular, or having many small files in a single directory (which forces metadata to be stored on a single serversay >10k)makes any simple filesystem operations such as directory listings take ages, and in particular automated backup jobs might run into problems.
'''TL;DR, and this is very important: when using CephFS, make sure to organize your dataset in few large files (e.g. HDF5), and not many small ones !If you really have to have individual files, then make sure they are stored in subdirectories which do not become too large. '''
For example, if you have a million images of the form abcdef.jpg in a single directory, you better distribute them over a directory tree a/b/c/def.jpg, so that it is only 1000 files per directory. An interesting option if you have a dataset consisting of many small files might be to keep it in a tar archive and mount that archive using [https://github.com/mxmlnkn/ratarmount ratarmount]. If this is not possible for you, then you need to resort to persistent volumes residing on use the local SSD storage on a single node, which for small files is orders of magnitude faster, but you are bound to a particular node (or have to duplicate the data in different local filesystems). A tutorial followsSee below for details on local filesystems. == CephFS capacity and backup strategy == The storage on the Ceph filesystem is quite expensive due to redundancy built in (if any server reboots or is otherwise unavailable, the others can still serve all of the data). The contents of the home directories are also backed up daily onto a backup server with a file history - if you ever accidentally overwrite or otherwise lose an extremely important file, you can contact me and check if I have an old copy in a backup.  Currently, there is sufficient space left, however, I kindly ask you to not keep data you do not use anymore on the Ceph filesystem for too long. In particular, please delete old checkpoints of training runs you will never need again - I have seeen people use several Terabytes for their training histories. If you still need these, please move them onto your own computers. If you really want to keep old stuff lying around on the cluster filesystem, maybe because you are not sure whether you will need it again later on, then please put it into a folder which is not backed up. For this, every user can mount the Ceph directory <syntaxhighlight lang="bash">/cephfs/abyss/archive/nobackup/<your-username></syntaxhighlight> which can be used as an archive. Make sure that the directory is created if it does not exist, by specifying "type: DirectoryOrCreate".
== Local storage on the node ==
The path for local storage for each user is
* <syntaxhighlight lang="bash">/raid/local-data/<your-username></syntaxhighlight>
You can mount it as a hostPath, but have to make sure that the directory is created if it does not exist, by specifying "type: DirectoryOrCreate".
The data will remain persistent on the host, but note that it also only exists on this particular host. If you need to access it again, you need to make sure the pod always ends up on the same specific node. See example below. Otherwise, write your scripts in such a way that they check for existence of the local data, and if it is not there yet, copy it over from somewhere on the internet.
'''In contrast to Ceph storage, local paths on the hosts are not backed up. You have been warned.'''
== Example ==

Navigation menu