Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
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
- is related to
-
LU-8582 Interop: master<->b2_8 - sanity test_255a: test failed to respond and timed out
-
- Resolved
-
-
LU-23 Improve performance for traversing large directory with readdir+
-
- Resolved
-
-
LU-14361 Add support for statahead pattern with regularized file name
-
- Resolved
-
- is related to
-
LU-14139 batched statahead processing
-
- Resolved
-