Uploaded image for project: 'Lustre Documentation'
  1. Lustre Documentation
  2. LUDOC-148

Please document mb_groups buddy cache proc output

Details

    • Task
    • Resolution: Fixed
    • Major
    • None
    • None
    • 20
    • 8350

    Description

      Currently both ext4 and ldiskfs provide /proc/fs/

      {ext4 | ldiskfs}

      /<dev>/mb_groups output. This file is referenced in many kernel documents however other than noting that it's providing data on buddy group cache info, it doesn't bother documenting any further.

      Below is sample output from this file, it would be extremely useful for this to be fully documented and understood.

      #0 : 23147 1 9280 [ 1 1 0 1 0 1 1 0 0 1 0 1 1 2 ]
      #1 : 1156 41 1025 [ 42 15 5 3 3 3 2 2 2 0 0 0 0 0 ]
      #2 : 782 46 8194 [ 38 28 10 5 4 3 1 1 1 0 0 0 0 0 ]
      #3 : 624 7 1025 [ 10 9 5 4 2 2 1 1 1 0 0 0 0 0 ]
      #4 : 1065 6 12802 [ 3 5 3 2 2 1 1 1 1 1 0 0 0 0 ]
      #5 : 1023 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 0 0 0 ]
      #6 : 0 0 32768 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
      #7 : 1023 1 1025 [ 1 1 1 1 1 1 1 1 1 1 0 0 0 0 ]
      #8 : 1022 1 19458 [ 0 1 1 1 1 1 1 1 1 1 0 0 0 0 ]
      #9 : 1784 4 1025 [ 2 3 2 3 3 3 1 2 1 2 0 0 0 0 ]

      Attachments

        Activity

          [LUDOC-148] Please document mb_groups buddy cache proc output

          Approved and merged. Marking this resolved.

          linda Linda Bebernes (Inactive) added a comment - Approved and merged. Marking this resolved.

          Change pushed to gerrit for review http://review.whamcloud.com/#/c/7728/

          linda Linda Bebernes (Inactive) added a comment - Change pushed to gerrit for review http://review.whamcloud.com/#/c/7728/

          well, this isn't an option. this is stats available to the users/administrators/developers so they can see/analyze on-disk fragmentation. not to be used often, I guess.

          bzzz Alex Zhuravlev added a comment - well, this isn't an option. this is stats available to the users/administrators/developers so they can see/analyze on-disk fragmentation. not to be used often, I guess.

          Alex - Thanks for the column definitions. Should mb_groups be documented as an option in the table in Section 31.2 "Tuning Multi-Block Alocation (mballoc)? Or does it go somewhere else?
          http://build.whamcloud.com/job/lustre-manual/lastSuccessfulBuild/artifact/lustre_manual.xhtml#idp8394512

          linda Linda Bebernes (Inactive) added a comment - Alex - Thanks for the column definitions. Should mb_groups be documented as an option in the table in Section 31.2 "Tuning Multi-Block Alocation (mballoc)? Or does it go somewhere else? http://build.whamcloud.com/job/lustre-manual/lastSuccessfulBuild/artifact/lustre_manual.xhtml#idp8394512

          hm, I actually see slightly different format in the master branch:

          1. cat /proc/fs/ldiskfs/loop0/mb_groups
            #group: free free frags first pa [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]
            #0 : 2936 2936 1 42 0 [ 0 0 0 1 1 1 1 2 0 1 2 0 0 0 ]

          where columns are:

          • #group number
          • available blocks in the group
          • blocks free on a disk
          • number of free fragments
          • the very first free block in the group
          • number of preallocated chunks (not blocks)
          • a series of available chunks of different sizes
          bzzz Alex Zhuravlev added a comment - hm, I actually see slightly different format in the master branch: cat /proc/fs/ldiskfs/loop0/mb_groups #group: free free frags first pa [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ] #0 : 2936 2936 1 42 0 [ 0 0 0 1 1 1 1 2 0 1 2 0 0 0 ] where columns are: #group number available blocks in the group blocks free on a disk number of free fragments the very first free block in the group number of preallocated chunks (not blocks) a series of available chunks of different sizes

          Hi,

          Bzzz is probably the right person to comment here as he wrote the code.

          -cf

          cfaber#1 Colin Faber [X] (Inactive) added a comment - Hi, Bzzz is probably the right person to comment here as he wrote the code. -cf

          Hi John!
          Would you be able to complete this documentation?

          jlevi Jodi Levi (Inactive) added a comment - Hi John! Would you be able to complete this documentation?

          On 2013-05-20, at 16:41, "Colin Faber" <cfaber@gmail.com> wrote:
          > I'm hoping you might be able to answer a question about /proc/fs///mb_groups. I looked over the code and that in it self wasn't obvious what the meaning of these columns is.
          >
          > So I'm hoping that you might be able to answer this as the documentation is seriously lacking in this area =)

          Hi Colin,
          This should probably be addressed as an LUDOC bug and patch, so that the documentation is permanently improved for everyone.

          > The output format looks like:
          >
          > #group: free frags first [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]
          > #0 : 4703 5 9376 [ 3 6 4 4 4 1 1 1 1 0 2 1 0 0 ]
          > #1 : 1992 12 1144 [ 6 5 6 4 4 4 1 1 2 0 1 0 0 0 ]
          > #2 : 2915 5 6688 [ 5 3 2 2 4 4 4 3 4 0 1 0 0 0 ]
          > #3 : 2135 5 1025 [ 3 4 3 4 2 4 4 1 2 2 0 0 0 0 ]
          >
          > some of those entries are obvious however the others aren't, and whether they're showing a count (say for fragmentation) or percentage.

          My guess is that these stats are the dump of the mballoc buddy bitmap table showing for each group in the filesystem:

          • number of free blocks
          • number of chunks of free space
          • offset of first free block in group
          • count of free chunks of specified size (in 2^n blocks)

          Could you please file an LUDOC ticket in Jira with these comments, so they can go into the manual after 31.2.11, and hopefully they can be vetted by Alex (who wrote this code).

          Cheers, Andreas

          cfaber#1 Colin Faber [X] (Inactive) added a comment - On 2013-05-20, at 16:41, "Colin Faber" <cfaber@gmail.com> wrote: > I'm hoping you might be able to answer a question about /proc/fs/ / /mb_groups. I looked over the code and that in it self wasn't obvious what the meaning of these columns is. > > So I'm hoping that you might be able to answer this as the documentation is seriously lacking in this area =) Hi Colin, This should probably be addressed as an LUDOC bug and patch, so that the documentation is permanently improved for everyone. > The output format looks like: > > #group: free frags first [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ] > #0 : 4703 5 9376 [ 3 6 4 4 4 1 1 1 1 0 2 1 0 0 ] > #1 : 1992 12 1144 [ 6 5 6 4 4 4 1 1 2 0 1 0 0 0 ] > #2 : 2915 5 6688 [ 5 3 2 2 4 4 4 3 4 0 1 0 0 0 ] > #3 : 2135 5 1025 [ 3 4 3 4 2 4 4 1 2 2 0 0 0 0 ] > > some of those entries are obvious however the others aren't, and whether they're showing a count (say for fragmentation) or percentage. My guess is that these stats are the dump of the mballoc buddy bitmap table showing for each group in the filesystem: number of free blocks number of chunks of free space offset of first free block in group count of free chunks of specified size (in 2^n blocks) Could you please file an LUDOC ticket in Jira with these comments, so they can go into the manual after 31.2.11, and hopefully they can be vetted by Alex (who wrote this code). Cheers, Andreas

          People

            linda Linda Bebernes (Inactive)
            cfaber#1 Colin Faber [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: