summaryrefslogtreecommitdiffstats
path: root/Feature Planning/GlusterFS 3.5/readdir ahead.md
blob: fe34a97b70525a29c3e582730ab9aa494b2469e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Feature
-------

readdir-ahead

Summary
-------

Provide read-ahead support for directories to improve sequential
directory read performance.

Owners
------

Brian Foster

Current status
--------------

Gluster currently does not attempt to improve directory read
performance. As a result, simple operations (i.e., ls) on large
directories are slow.

Detailed Description
--------------------

The read-ahead feature for directories is analogous to read-ahead for
files. The objective is to detect sequential directory read operations
and establish a pipeline for directory content. When a readdir request
is received and fulfilled, preemptively issue subsequent readdir
requests to the server in anticipation of those requests from the user.
If sequential readdir requests are received, the directory content is
already immediately available in the client. If subsequent requests are
not sequential or not received, said data is simply dropped and the
optimization is bypassed.

Benefit to GlusterFS
--------------------

Improved read performance of large directories.

### Scope

Nature of proposed change
-------------------------

readdir-ahead support is enabled through a new client-side translator.

Implications on manageability
-----------------------------

None beyond the ability to enable and disable the translator.

Implications on presentation layer
----------------------------------

N/A

Implications on persistence layer
---------------------------------

N/A

Implications on 'GlusterFS' backend
-----------------------------------

N/A

Modification to GlusterFS metadata
----------------------------------

N/A

Implications on 'glusterd'
--------------------------

N/A

How To Test
-----------

Performance testing. Verify that sequential reads of large directories
complete faster (i.e., ls, xfs\_io -c readdir).

User Experience
---------------

Improved performance on sequential read workloads. The translator should
otherwise be invisible and not detract performance or disrupt behavior
in any way.

Dependencies
------------

N/A

Documentation
-------------

Set the associated config option to enable or disable directory
read-ahead on a volume:

		gluster volume set <vol> readdir-ahead [enable|disable]

readdir-ahead is disabled by default.

Status
------

Development complete for the initial version. Minor changes and bug
fixes likely.

Future versions might expand to provide generic caching and more
flexible behavior.

Comments and Discussion
-----------------------