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

set timestamp on llog objects at creation time

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.17.0
    • Lustre 2.15.0
    • 3
    • 9223372036854775807

    Description

      For debugging purposes, it would be useful to store the ctime for an llog object when it is created. Otherwise, the objects currently do not set any timestamp on the log even though it was recently created (e.g. the 39xx logs, the low-numbered 2015 objects were created with an older Lustre version):

           9851      4 -rw-r--r--   1  root     root            8 Nov  7  2013 /mnt/tmp/O/1/LAST_ID
           1850     20 -rw-r--r--   1  root     root        19584 May  6  2015 /mnt/tmp/O/1/d4/164
          98363     12 -rw-r--r--   1  root     root         8448 Dec 31  1969 /mnt/tmp/O/1/d4/3972
           1665     20 -rw-r--r--   1  root     root        17792 May  6  2015 /mnt/tmp/O/1/d0/160
           1849     12 -rw-r--r--   1  root     root         8256 Apr 23  2015 /mnt/tmp/O/1/d30/158
           1861     20 -rw-r--r--   1  root     root        17472 May  6  2015 /mnt/tmp/O/1/d6/166
          98365     12 -rw-r--r--   1  root     root         8448 Dec 31  1969 /mnt/tmp/O/1/d6/3974
        2130157     12 -rw-r--r--   1  root     root         8384 Dec 31  1969 /mnt/tmp/O/1/d8/3976
      

      The same with logs in CONFIGS:

      # debugfs -c -R "ls -l CONFIGS" /dev/loop0
      debugfs 1.46.6-wc1 (10-Jan-2023)
           13   40755 (2)      0      0    4096  5-Mar-2024 12:58 .
            2   40755 (2)      0      0    4096  5-Mar-2024 12:58 ..
           14  100644 (1)      0      0   12288  5-Mar-2024 12:58 mountdata
           82  100644 (1)      0      0    8192 31-Dec-1969 17:00 nodemap
           85  100644 (1)      0      0   11008 31-Dec-1969 17:00 params
           86  100644 (1)      0      0   69600 31-Dec-1969 17:00 testfs-client
           87  100644 (1)      0      0   75560 31-Dec-1969 17:00 testfs-MDT0000
          154  100644 (1)      0      0   75024 31-Dec-1969 17:00 testfs-MDT0001
          156  100644 (1)      0      0   74488 31-Dec-1969 17:00 testfs-MDT0002
          158  100644 (1)      0      0   73952 31-Dec-1969 17:00 testfs-MDT0003
          160  100644 (1)      0      0   17992 31-Dec-1969 17:00 testfs-OST0000
          161  100644 (1)      0      0   17680 31-Dec-1969 17:00 testfs-OST0001
          169  100644 (1)      0      0   17144 31-Dec-1969 17:00 testfs-OST0002
          170  100644 (1)      0      0   16608 31-Dec-1969 17:00 testfs-OST0003
      

      Similarly, it would also be useful to update the mtime when a catalog is modified, since this doesn't happen very often and otherwise they show the timestamp when the file was created (maybe not even that for newer versions of Lustre):

          4 -rw-r--r--.  1 root        160 May  6  2015 CATALOGS
        180 -rw-r--r--.  1 root     176576 Nov  7  2013 changelog_catalog
         12 -rw-r--r--.  1 root       8384 Nov  7  2013 changelog_users
      

      There is no overhead to update the mtime when new records are added to an llog file, since the new inode size/blocks needs to be written anyway.

      Attachments

        Activity

          [LU-17309] set timestamp on llog objects at creation time

          squalfof please check https://review.whamcloud.com/c/fs/lustre-release/+/57510
          I benchmarked with ldiskfs, you can use sanity/60a as a reference.

          bzzz Alex Zhuravlev added a comment - squalfof please check https://review.whamcloud.com/c/fs/lustre-release/+/57510 I benchmarked with ldiskfs, you can use sanity/60a as a reference.
          squalfof Keguang Xu added a comment -

          Will look after it.

          • Any scripts/commands to reproduce this issue?
          • And environment? Ldiskfs or ZFS?

          Thanks.

          squalfof Keguang Xu added a comment - Will look after it. Any scripts/commands to reproduce this issue? And environment? Ldiskfs or ZFS? Thanks.

          updating attributes every time we add a record has a significant performance penalty:
          with timestamp:

          [   12.236741] Lustre: took 76627 waiting, 2394 us / rec in 1 threads
          [   13.341116] Lustre: took 60811 waiting, 1900 us / rec in 4 threads
          

          without timestamp:

          [   12.218171] Lustre: took 68078 waiting, 2127 us / rec in 1 threads
          [   13.323605] Lustre: took 53228 waiting, 1663 us / rec in 4 threads
          
          bzzz Alex Zhuravlev added a comment - updating attributes every time we add a record has a significant performance penalty: with timestamp: [ 12.236741] Lustre: took 76627 waiting, 2394 us / rec in 1 threads [ 13.341116] Lustre: took 60811 waiting, 1900 us / rec in 4 threads without timestamp: [ 12.218171] Lustre: took 68078 waiting, 2127 us / rec in 1 threads [ 13.323605] Lustre: took 53228 waiting, 1663 us / rec in 4 threads
          pjones Peter Jones added a comment -

          Merged for 2.17

          pjones Peter Jones added a comment - Merged for 2.17

          "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/56691/
          Subject: LU-17309 llog: set timestamp on llog objects at creation time
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: e33d196b937957f257590d823088e0cda388a11e

          gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/56691/ Subject: LU-17309 llog: set timestamp on llog objects at creation time Project: fs/lustre-release Branch: master Current Patch Set: Commit: e33d196b937957f257590d823088e0cda388a11e

          "kg.xu <squalfof@gmail.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/56691
          Subject: LU-17309 llog: set timestamp on llog objects at creation time
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 718583bccdf7f4c675f7cffc592c1b846bec2647

          gerrit Gerrit Updater added a comment - "kg.xu <squalfof@gmail.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/56691 Subject: LU-17309 llog: set timestamp on llog objects at creation time Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 718583bccdf7f4c675f7cffc592c1b846bec2647

          People

            squalfof Keguang Xu
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: