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

llog files have less number of records than they designed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Critical
    • None
    • Lustre 2.10.0
    • None
    • 3
    • 9223372036854775807

    Description

      The default bitmap size for llog file is 64768, so it can store 64767 records. llog_cat_add fills one plain llog file to full size then go to another plain llog file. Right now, I see that this logic was broken.
      single node reproducer on top of master branch eb3379162c.

      [root@localhost intelgerrit]# sh luste/tests/llmount.sh
      [root@localhost intelgerrit]# lctl --device lustre-MDT0000 changelog_register
      lustre-MDT0000: Registered changelog userid 'cl1'
      [root@localhost intelgerrit]# mkdir /mnt/lustre/test
      [root@localhost intelgerrit]# lustre/tests/createmany -o /mnt/lustre/test/foo- 64768
       - open/close 10000 (time 1492674148.41 total 5.24 last 1909.71)
       - open/close 20000 (time 1492674153.50 total 10.33 last 1963.04)
       - open/close 30000 (time 1492674158.39 total 15.22 last 2044.79)
       - open/close 40000 (time 1492674163.59 total 20.42 last 1923.54)
       - open/close 50000 (time 1492674168.46 total 25.29 last 2055.37)
       - open/close 60000 (time 1492674173.32 total 30.15 last 2055.01)
      total: 64768 open/close in 32.60 seconds: 1986.96 ops/second
      [root@localhost ~]# debugfs -R "dump changelog_catalog changelog_catalog" /tmp/lustre-mdt1 
      debugfs 1.42.13.x3 (26-Dec-2016)
      
      [root@localhost ~]# llog_reader changelog_catalog  | tail -n13
      #01 (064)id=[0x7:0x1:0x0]:0 path=oi.1/0x1:0x7:0x0
      #02 (064)id=[0x8:0x1:0x0]:0 path=oi.1/0x1:0x8:0x0
      #03 (064)id=[0x9:0x1:0x0]:0 path=oi.1/0x1:0x9:0x0
      #04 (064)id=[0xa:0x1:0x0]:0 path=oi.1/0x1:0xa:0x0
      #05 (064)id=[0xb:0x1:0x0]:0 path=oi.1/0x1:0xb:0x0
      #06 (064)id=[0xc:0x1:0x0]:0 path=oi.1/0x1:0xc:0x0
      #07 (064)id=[0xd:0x1:0x0]:0 path=oi.1/0x1:0xd:0x0
      #08 (064)id=[0xe:0x1:0x0]:0 path=oi.1/0x1:0xe:0x0
      #09 (064)id=[0xf:0x1:0x0]:0 path=oi.1/0x1:0xf:0x0
      #10 (064)id=[0x10:0x1:0x0]:0 path=oi.1/0x1:0x10:0x0
      #11 (064)id=[0x11:0x1:0x0]:0 path=oi.1/0x1:0x11:0x0
      #12 (064)id=[0x12:0x1:0x0]:0 path=oi.1/0x1:0x12:0x0
      #13 (064)id=[0x13:0x1:0x0]:0 path=oi.1/0x1:0x13:0x0
      
      [root@localhost ~]# debugfs -R "dump /O/1/d7/7 plain_1" /tmp/lustre-mdt1 
      debugfs 1.42.13.x3 (26-Dec-2016)
      [root@localhost ~]# llog_reader plain_1 | tail
      #11994 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #11995 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #11996 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #11997 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #11998 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #11999 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #12000 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #12001 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #12002 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #12003 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      
      [root@localhost ~]# debugfs -R "dump /O/1/d8/8 plain_2" /tmp/lustre-mdt1 
      debugfs 1.42.13.x3 (26-Dec-2016)
      [root@localhost ~]# llog_reader plain_2 | tail
      #11627 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #11628 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #11629 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #11630 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #11631 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #11632 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #11633 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #11634 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #11635 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #11636 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      
      [root@localhost ~]# debugfs -R "dump /O/1/d16/16 plain_10" /tmp/lustre-mdt1 
      debugfs 1.42.13.x3 (26-Dec-2016)
      [root@localhost ~]# llog_reader plain_10 | tail
      #9529 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #9530 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #9531 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #9532 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #9533 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #9534 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #9535 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #9536 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      #9537 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
      #9538 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
      

      So every plain llog file stores about ~11k records instead of 64k.

      Attachments

        Activity

          People

            bfaccini Bruno Faccini (Inactive)
            aboyko Alexander Boyko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: