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

Make statahead better support Breadth First Search (BFS) or Depth First Search (DFS)

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • Lustre 2.17.0
    • None
    • 9223372036854775807

    Description

      Batching processing can obtain boost performance.
      However, in some file system tree, each level may contain less than 100 entries, but with high depth.
      It can do statahead according to Breadth First Search (BFS) or Depth First Search (DFS) access pattern once detect, each time statahead a subtree with more than 1 level, collect enough statahead entries, send the batching RPC via bulk I/O, to improve the tree walking performance.

      BFS_Traverse(DIR, Q) {
      	Q.enqueue(DIR);
      	while |Q| > 0 do
      		dir = Q.dequeue()
      		opendir(dir);
      		while dent = readdir(dir) != NULL do
      			stat(dent); process(dent);
      			if dent is a directory do
      				Q.enqueue(dent);
      			end if
      		end while
      		closedir(dir);
      	end while
      }
      DFS_Traverse(dir) {
      	openddir(dir);
      	while (dent = readdir(dir) != NULL) do
      		if dent is a file then
      			stat(dent); process(dent);
      		else /* a directory */
      			DFS_Traverse(dent)
      		end if
      	end while
      	closedir(dir);
      }
      

      Attachments

        Issue Links

          Activity

            People

              qian_wc Qian Yingjin
              qian_wc Qian Yingjin
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: