[lustre-discuss] [EXTERNAL] Limiting Lustre memory use?

Ellis Wilson elliswilson at microsoft.com
Tue Feb 22 05:33:34 PST 2022

Hi Bill,

I just ran into a similar issue.  See:

Lustre definitely caches data in the pagecache, and as far as I have seen metadata in slab.  I'd start by running slabtop on a client machine if you can stably reproduce the OOM situation, or creating a cronjob to cat /proc/meminfo and /proc/vmstat into a file at minutely intervals to try to save state of the machine before it goes belly up.  If you see a tremendous amount consumed by Lustre slabs then it's likely on the inode caching side (the slab name should be indicative though), and you might try a client build with this recent change to see if it mitigates the issue:

Note that disabling the Lustre inode cache like this will inherently apply significantly more pressure on your MDTs, but if it keeps you out of OOM territory, it's probably a win.

In my case it wasn't metadata that was forcing my clients to OOM, but PTLRPC holding onto references to pages the rest of Lustre thought it was done with until my OSTs committed their transactions.  Revising my OST mount options to use an explicit commit=5 fixed my problem.



-----Original Message-----
From: lustre-discuss <lustre-discuss-bounces at lists.lustre.org> On Behalf Of bill broadley via lustre-discuss
Sent: Friday, February 18, 2022 4:43 PM
To: lustre-discuss at lists.lustre.org
Subject: [EXTERNAL] [lustre-discuss] Limiting Lustre memory use?

On a cluster I managed (without Lustre), we had many problems with users running nodes out of ram which often killed the node.  We added cgroup support to slurm and those problems disappeared.  Nearly 100% of the time get a cgroup OOM instead of a kernel OOM and the nodes would stay up and stable. This became doubly important when we started allowing jobs to share nodes and didn't want job A to be able to crash job B.

I've tried similar on a Lustre enabled cluster and it seems like the memory used by Lustre (which I believe is in the kernel and outside of the job's cgroup).  I think part of the problem is I believe Lustre caches metadata in the linux page cache, but not data.  I've tried reducing the ram available to slurm, but still getting kernel OOMs instead of cgroup OOMs.

Anyone have a suggestion for fixing this?  Is there any way to limit Lustre's memory use in the kernel?  Or force that caching into userspace and inside the cgroup?  Or possibly out of ram and onto a client local NVMe?

lustre-discuss mailing list
lustre-discuss at lists.lustre.org

More information about the lustre-discuss mailing list