|
| 1 | +# Lustre Tuning |
| 2 | +`/capstor/` and `/iopsstor` are both [lustre](https://lustre.org) filesystem. |
| 3 | +Lustre is an open-source, parallel file system used in HPC systems. |
| 4 | +As shown in  uses *metadata* servers to store and query metadata which is basically what is shown by `ls`: directory structure, file permission, modification dates,.. |
| 5 | +This data is globally synchronized, which means that handling many small files is not especially suited for lustre, and the perfomrance of that part is similar on both capstor and iopsstor. |
| 6 | +With many small files, a local filesystems like `/dev/shmem/$USER` or "/tmp", if enough memory can be spared for it, can be *much* faster, and offset the packing/unpacking work. Alternatively using a squashed filesystems can be a good option. |
| 7 | + |
| 8 | +The data itself is subdivided in blocks of size `<blocksize>` and is stored by Object Storage Servers (OSS) in one or more Object Storage Targets (OST). |
| 9 | +The blocksize and number of OSTs to use is defined by the striping settings. A new file or directory ihnerits them from its parent directory. The `lfs getstripe <path>` command can be used to get information on the actual stripe settings. For directories and empty files `lfs setstripe --stripe-count <count> --stripe-size <size> <directory/file>` can be used to set the layout. The simplest way to have the correct layout is to copy to a directory with the correct layout |
| 10 | + |
| 11 | +A blocksize of 4MB gives good throughput, without being overly big, so it is a good choice when reading a file sequentially or in large chuncks, but if one reads shorter chuncks in random order it might be better to reduce the size, the performance will be smaller, but the performance of your application might actually increase. |
| 12 | +https://doc.lustre.org/lustre_manual.xhtml#managingstripingfreespace |
| 13 | + |
| 14 | +!!! example "Good large files settings" |
| 15 | + ```console |
| 16 | + lfs setstripe --stripe-count -1 --stripe-size 4M <big_files_dir>` |
| 17 | + ``` |
| 18 | + |
| 19 | +Lustre also supports composite layouts, switching from one layout to another at a given size `--component-end` (`-E`). |
| 20 | +With it it is possible to create a Progressive file layout switching `--stripe-count` (`-c`), `--stripe-size` (`-S`), so that fewer locks are required for smaller files, but load is distributed for larger files. |
| 21 | + |
| 22 | +!!! example "Good default settings" |
| 23 | + ```console |
| 24 | + lfs setstripe -E 4M -c 1 -E 64M -c 4 -E -1 -c -1 -S 4M <base_dir> |
| 25 | + ``` |
0 commit comments