[LUDOC-148] Please document mb_groups buddy cache proc output Created: 21/May/13  Updated: 24/Sep/13  Resolved: 24/Sep/13

Status: Resolved
Project: Lustre Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Colin Faber [X] (Inactive) Assignee: Linda Bebernes (Inactive)
Resolution: Fixed Votes: 0
Labels: QContent

Business Value: 20
Rank (Obsolete): 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 ]



 Comments   
Comment by Colin Faber [X] (Inactive) [ 21/May/13 ]

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

Comment by Jodi Levi (Inactive) [ 04/Jun/13 ]

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

Comment by Colin Faber [X] (Inactive) [ 04/Jun/13 ]

Hi,

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

-cf

Comment by Alex Zhuravlev [ 19/Sep/13 ]

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
Comment by Linda Bebernes (Inactive) [ 19/Sep/13 ]

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

Comment by Alex Zhuravlev [ 19/Sep/13 ]

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.

Comment by Linda Bebernes (Inactive) [ 23/Sep/13 ]

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

Comment by Linda Bebernes (Inactive) [ 24/Sep/13 ]

Approved and merged. Marking this resolved.

Generated at Sat Feb 10 03:40:37 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.