diff --git a/roles/slurm-common/templates/slurm.epilog.j2 b/roles/slurm-common/templates/slurm.epilog.j2 index 9755cf925a38a3a2c8d4edb8295668a8535bc462..71b02e52891533284ce7b31637757e55b18a0911 100644 --- a/roles/slurm-common/templates/slurm.epilog.j2 +++ b/roles/slurm-common/templates/slurm.epilog.j2 @@ -1,6 +1,13 @@ #!/bin/sh + # specific files to be deleted to clean up after a Strudel session find /tmp -user ${SLURM_JOB_USER} -name "pulse*" | xargs rm -rf find /tmp -user ${SLURM_JOB_USER} -name ".esd-*" | xargs rm -rf find /tmp -user ${SLURM_JOB_USER} -name ".X*-lock" | xargs rm -rf find /tmp/.X11-unix -user ${SLURM_JOB_USER} -name "X*" | xargs rm -rf + +# files to be deleted from /tmp after jobs completed +/bin/find /tmp -user ${SLURM_JOB_USER} -type 'f' -print0 | /usr/bin/xargs -0 -r /bin/rm -f + +# echo 1 to drop page cache +sync; echo 1 > /proc/sys/vm/drop_caches diff --git a/roles/slurm-common/templates/slurm.prolog.j2 b/roles/slurm-common/templates/slurm.prolog.j2 index 039e4d0069c5c26909f86c505b9de66182e6d1f3..af563f852887fed89c763d3596fedc5a54affa4c 100644 --- a/roles/slurm-common/templates/slurm.prolog.j2 +++ b/roles/slurm-common/templates/slurm.prolog.j2 @@ -1,2 +1,6 @@ #!/bin/sh + +# echo 1 to drop page cache +sync; echo 1 > /proc/sys/vm/drop_caches + exit 0