Skip to content

Commit a2ee30c

Browse files
committed
use du --inodes instead of tedious for loop
1 parent 02b2cf5 commit a2ee30c

1 file changed

Lines changed: 34 additions & 21 deletions

File tree

docs/hpc/03_storage/05_best_practices.md

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
## User Quota Limits and the myquota command
33
All users have quote limits set on HPC fie systems. There are several types of quota limits, such as limits on the amount of disk space (disk quota), number of files (inode quota) etc. The default user quota limits on HPC file systems are listed [on our Data Management page](./01_intro_and_data_management.mdx#hpc-storage-mounts-comparison-table).
44

5-
:::warning
6-
_One of the common issues users report is running out of inodes in their home directory._ This usually occurs during software installation, for example installing conda environment under their home directory. Running out of quota causes a variety of issues such as running user jobs being interrupted or users being unable to finish the installation of packages under their home directory.
5+
:::warning[Home directory inode quotas]
6+
_One of the common issues users report is running out of inodes in their home directory._ This usually occurs during software installation, for example installing conda environment under their home directory. Running out of quota causes a variety of issues such as running user jobs being interrupted or users being unable to finish the installation of packages under their home directory.
77
:::
88

99
Users can check their current utilization of quota using the myquota command. The myquota command provides a report of the current quota limits on mounted file systems, the user's quota utilization, as well as the percentage of quota utilization.
@@ -21,33 +21,46 @@ Space Variable /Flushed? Space / Files Space(%) / File
2121
/scratch $SCRATCH NO/YES 5.0TB/5.0M 0.0TB(0.0%)/1(0%)
2222
/archive $ARCHIVE YES/NO 2.0TB/0.02M 0.0TB(0.0%)/1(0%)
2323
```
24-
Users can find out the number of inodes (files) used per subdirectory under their home directory (`$HOME`), by running the following commands:
24+
You can use the following command to print the list of files within each sub-folder for a given directory:
2525
```sh
2626
$cd $HOME
27-
$ for d in $(find $(pwd) -maxdepth 1 -mindepth 1 -type d | sort -u); do n_files=$(find $d | wc -l); echo $d $n_files; done
28-
/home/netid/.cache 1507
29-
/home/netid/.conda 2
30-
/home/netid/.config 2
31-
/home/netid/.ipython 11
32-
/home/netid/.jupyter 2
33-
/home/netid/.keras 2
34-
/home/netid/.local 24185
35-
/home/netid/.nv 2
36-
/home/netid/.sacrebleu 46
37-
/home/netid/.singularity 1
38-
/home/netid/.ssh 5
39-
/home/netid/.vscode-server 7216
27+
$du --inodes -h --max-depth=1
28+
6 ./.ssh
29+
88 ./.config
30+
2 ./.vnc
31+
2 ./.aws
32+
3 ./.lmod.d
33+
5.3K ./.local
34+
3 ./.dbus
35+
408 ./ondemand
36+
2 ./.virtual_documents
37+
6 ./.nv
38+
6.7K ./.pixi
39+
33 ./workshop_scripts
40+
5 ./.cupy
41+
6 ./.gnupg
42+
1 ./.emacs.d
43+
194 ./.nextflow
44+
6 ./.terminfo
45+
2 ./.conda
46+
2 ./.singularity
47+
3 ./.vast-dev
48+
1 ./custom
49+
185 ./genai-workshop
50+
6 ./.atuin
51+
1 ./.apptainer
52+
9 ./.subversion
53+
4 ./packages
54+
1.4K ./.cache
55+
15K .
4056
```
4157

4258
## Large number of small files
43-
In case your dataset or workflow requires to use large number of small files, this can create a bottleneck due to read/write rates.
44-
45-
Please refer to [our page on working with a large number of files](./06_large_number_of_small_files.md) to learn about some of the options we recommend to consider.
59+
In case your dataset or workflow requires to use large number of small files, this can create a bottleneck due to read/write rates. Please refer to [our page on working with a large number of files](./06_large_number_of_small_files.md) to learn about some of the options we recommend to consider.
4660

4761
## Installing Python packages
4862
:::warning
49-
Your home directory has a relatively small number of inodes.
50-
If you create a conda or python environment in you home directory, this can eat up all the inodes.
63+
Your home directory is limited to a relatively small number of inodes (30,000). Creating conda/python environments in you home directory, this can eat easily exhaust your inode quota.
5164
:::
5265

5366
Please review the [Package Management section](../06_tools_and_software/01_intro.md#package-management-for-r-python--julia-and-conda-in-general) of the [Torch Software Page](../06_tools_and_software/01_intro.md).

0 commit comments

Comments
 (0)