Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6529

Server side lock limits to avoid unnecessary memory exhaustion

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.8.0
    • None
    • 3
    • 9223372036854775807

    Description

      As seen in tickets like LU-5727, we currently rely almost entirely on the good aggregate behavior of the lustre clients to avoid memory exhaustion on the MDS (and other servers, no doubt).

      We require the servers, the MDS in particular, to instead limit ldlm lock usage to something reasonable to avoid OOM conditions on their own. It is not good design to leave the MDS's memory usage entirely up to the very careful administrative limiting of ldlm lock usage limits across all of the client nodes.

      Consider that some sites have many thousands of clients across many clusters where such careful balancing and coordinated client limits may be difficult to achieve. Consider also WAN usages, where some clients might not ever reside at the same organization as the servers. Consider also bugs in the client, again like LU-5727.

      See also the attached graph showing MDS memory usage. Clearly the ldlm lock usage grows without bound, and other parts of the kernel memory usage are put under undue pressure. 70+ GiB of ldlm lock usage is not terribly reasonable for our setup.

      Some might argue that the SLV code needs to be fixed, and I have no argument against pursuing that work. That could certainly be worked in some other ticket.

      But even if SLV is fixed, we still require enforcement of good memory usage on the server side. There will always be client bugs or misconfiguration on clients and the server OOMing is not a reasonable response to those issues.

      I would propose a configurable hard limit on the number of locks (or space used by locks) on the server side.

      I am open to other solutions, of course.

      Attachments

        1. MemUsage.png
          91 kB
          Christopher Morrone

        Issue Links

          Activity

            [LU-6529] Server side lock limits to avoid unnecessary memory exhaustion

            Thanks. I'll close the issue.

            marc@llnl.gov D. Marc Stearman (Inactive) added a comment - Thanks. I'll close the issue.

            Patches. Yes.

            morrone Christopher Morrone (Inactive) added a comment - Patches. Yes.

            Chris, do we have this patch in our local release?

            marc@llnl.gov D. Marc Stearman (Inactive) added a comment - Chris, do we have this patch in our local release?

            All patches have landed for 2.8.

            jgmitter Joseph Gmitter (Inactive) added a comment - All patches have landed for 2.8.

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16123/
            Subject: LU-6529 ldlm: improve proc interface of lock reclaim
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 33b55f223a42f20916bc417f7e5a21f68b59cd02

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16123/ Subject: LU-6529 ldlm: improve proc interface of lock reclaim Project: fs/lustre-release Branch: master Current Patch Set: Commit: 33b55f223a42f20916bc417f7e5a21f68b59cd02
            niu Niu Yawei (Inactive) added a comment - - edited

            Another bug: The proc files accept negative values. Negative values should be rejected.

            Well, it's same as other Lustre proc files which rely on some basic helper functions. I think it's worth a new ticket to fix this.

            I am also disappointed that the patch passed review with so little in the way of function comments. Aren't function comments are landing requirement?

            I'll try to add more comments in the next patch.

            Under Lustre 2.5.4 + local patches, we seem to be hitting the high lock limit prematurely, at least as far as we can tell from the number of ldlm_locks active on the slab. Is there some other way to get an idea of what the lustre server thinks is the current lock count?

            There is a counter for the ldlm lock, but it's not exported, maybe I'd export it via proc for debug purpose (together with the proc interface changes).

            In current Lustre, you can roughly get the number by adding up the /proc/fs/lustre/ldlm/namespaces/$target/pool/granted for all the MDT/OST targets on server.

            niu Niu Yawei (Inactive) added a comment - - edited Another bug: The proc files accept negative values. Negative values should be rejected. Well, it's same as other Lustre proc files which rely on some basic helper functions. I think it's worth a new ticket to fix this. I am also disappointed that the patch passed review with so little in the way of function comments. Aren't function comments are landing requirement? I'll try to add more comments in the next patch. Under Lustre 2.5.4 + local patches, we seem to be hitting the high lock limit prematurely, at least as far as we can tell from the number of ldlm_locks active on the slab. Is there some other way to get an idea of what the lustre server thinks is the current lock count? There is a counter for the ldlm lock, but it's not exported, maybe I'd export it via proc for debug purpose (together with the proc interface changes). In current Lustre, you can roughly get the number by adding up the /proc/fs/lustre/ldlm/namespaces/$target/pool/granted for all the MDT/OST targets on server.

            Under Lustre 2.5.4 + local patches, we seem to be hitting the high lock limit prematurely, at least as far as we can tell from the number of ldlm_locks active on the slab. Is there some other way to get an idea of what the lustre server thinks is the current lock count?

            morrone Christopher Morrone (Inactive) added a comment - Under Lustre 2.5.4 + local patches, we seem to be hitting the high lock limit prematurely, at least as far as we can tell from the number of ldlm_locks active on the slab. Is there some other way to get an idea of what the lustre server thinks is the current lock count?

            I am also disappointed that the patch passed review with so little in the way of function comments. Aren't function comments are landing requirement?

            morrone Christopher Morrone (Inactive) added a comment - I am also disappointed that the patch passed review with so little in the way of function comments. Aren't function comments are landing requirement?

            Another bug: The proc files accept negative values. Negative values should be rejected.

            morrone Christopher Morrone (Inactive) added a comment - Another bug: The proc files accept negative values. Negative values should be rejected.

            Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/16123
            Subject: LU-6529 ldlm: improve proc interface of lock reclaim
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: cd15ce613f958e14fd8c8a01a97cdd67cb17e249

            gerrit Gerrit Updater added a comment - Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/16123 Subject: LU-6529 ldlm: improve proc interface of lock reclaim Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: cd15ce613f958e14fd8c8a01a97cdd67cb17e249

            People

              niu Niu Yawei (Inactive)
              morrone Christopher Morrone (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: