Blame


1 bdf5b5cd 2005-07-13 devnull .TH VENTI 8
2 bdf5b5cd 2005-07-13 devnull .SH NAME
3 cbc99e3e 2011-06-03 rsc venti \- archival storage server
4 3aec33fe 2005-07-18 devnull .SH SYNOPSIS
5 cbc99e3e 2011-06-03 rsc .in +0.25i
6 cbc99e3e 2011-06-03 rsc .ti -0.25i
7 3aec33fe 2005-07-18 devnull .B venti/venti
8 3aec33fe 2005-07-18 devnull [
9 cbc99e3e 2011-06-03 rsc .B -Ldrs
10 3aec33fe 2005-07-18 devnull ]
11 3aec33fe 2005-07-18 devnull [
12 3aec33fe 2005-07-18 devnull .B -a
13 3aec33fe 2005-07-18 devnull .I address
14 3aec33fe 2005-07-18 devnull ]
15 3aec33fe 2005-07-18 devnull [
16 3aec33fe 2005-07-18 devnull .B -B
17 3aec33fe 2005-07-18 devnull .I blockcachesize
18 3aec33fe 2005-07-18 devnull ]
19 3aec33fe 2005-07-18 devnull [
20 3aec33fe 2005-07-18 devnull .B -c
21 3aec33fe 2005-07-18 devnull .I config
22 3aec33fe 2005-07-18 devnull ]
23 3aec33fe 2005-07-18 devnull [
24 3aec33fe 2005-07-18 devnull .B -C
25 3aec33fe 2005-07-18 devnull .I lumpcachesize
26 3aec33fe 2005-07-18 devnull ]
27 3aec33fe 2005-07-18 devnull [
28 3aec33fe 2005-07-18 devnull .B -h
29 3aec33fe 2005-07-18 devnull .I httpaddress
30 3aec33fe 2005-07-18 devnull ]
31 3aec33fe 2005-07-18 devnull [
32 3aec33fe 2005-07-18 devnull .B -I
33 3aec33fe 2005-07-18 devnull .I indexcachesize
34 3aec33fe 2005-07-18 devnull ]
35 3aec33fe 2005-07-18 devnull [
36 3aec33fe 2005-07-18 devnull .B -W
37 3aec33fe 2005-07-18 devnull .I webroot
38 3aec33fe 2005-07-18 devnull ]
39 bdf5b5cd 2005-07-13 devnull .SH DESCRIPTION
40 a7f1ab29 2011-05-10 rsc .I Venti
41 a7f1ab29 2011-05-10 rsc is a SHA1-addressed archival storage server.
42 bdf5b5cd 2005-07-13 devnull See
43 d32deab1 2020-08-16 rsc .MR venti (7)
44 bdf5b5cd 2005-07-13 devnull for a full introduction to the system.
45 bdf5b5cd 2005-07-13 devnull This page documents the structure and operation of the server.
46 bdf5b5cd 2005-07-13 devnull .PP
47 bdf5b5cd 2005-07-13 devnull A venti server requires multiple disks or disk partitions,
48 bdf5b5cd 2005-07-13 devnull each of which must be properly formatted before the server
49 bdf5b5cd 2005-07-13 devnull can be run.
50 bdf5b5cd 2005-07-13 devnull .SS Disk
51 bdf5b5cd 2005-07-13 devnull The venti server maintains three disk structures, typically
52 bdf5b5cd 2005-07-13 devnull stored on raw disk partitions:
53 bdf5b5cd 2005-07-13 devnull the append-only
54 bdf5b5cd 2005-07-13 devnull .IR "data log" ,
55 bdf5b5cd 2005-07-13 devnull which holds, in sequential order,
56 bdf5b5cd 2005-07-13 devnull the contents of every block written to the server;
57 bdf5b5cd 2005-07-13 devnull the
58 bdf5b5cd 2005-07-13 devnull .IR index ,
59 bdf5b5cd 2005-07-13 devnull which helps locate a block in the data log given its score;
60 bdf5b5cd 2005-07-13 devnull and optionally the
61 bdf5b5cd 2005-07-13 devnull .IR "bloom filter" ,
62 bdf5b5cd 2005-07-13 devnull a concise summary of which scores are present in the index.
63 bdf5b5cd 2005-07-13 devnull The data log is the primary storage.
64 bdf5b5cd 2005-07-13 devnull To improve the robustness, it should be stored on
65 bdf5b5cd 2005-07-13 devnull a device that provides RAID functionality.
66 bdf5b5cd 2005-07-13 devnull The index and the bloom filter are optimizations
67 bdf5b5cd 2005-07-13 devnull employed to access the data log efficiently and can be rebuilt
68 bdf5b5cd 2005-07-13 devnull if lost or damaged.
69 bdf5b5cd 2005-07-13 devnull .PP
70 bdf5b5cd 2005-07-13 devnull The data log is logically split into sections called
71 bdf5b5cd 2005-07-13 devnull .IR arenas ,
72 bdf5b5cd 2005-07-13 devnull typically sized for easy offline backup
73 bdf5b5cd 2005-07-13 devnull (e.g., 500MB).
74 bdf5b5cd 2005-07-13 devnull A data log may comprise many disks, each storing
75 bdf5b5cd 2005-07-13 devnull one or more arenas.
76 bdf5b5cd 2005-07-13 devnull Such disks are called
77 bdf5b5cd 2005-07-13 devnull .IR "arena partitions" .
78 bdf5b5cd 2005-07-13 devnull Arena partitions are filled in the order given in the configuration.
79 bdf5b5cd 2005-07-13 devnull .PP
80 bdf5b5cd 2005-07-13 devnull The index is logically split into block-sized pieces called
81 bdf5b5cd 2005-07-13 devnull .IR buckets ,
82 bdf5b5cd 2005-07-13 devnull each of which is responsible for a particular range of scores.
83 bdf5b5cd 2005-07-13 devnull An index may be split across many disks, each storing many buckets.
84 bdf5b5cd 2005-07-13 devnull Such disks are called
85 bdf5b5cd 2005-07-13 devnull .IR "index sections" .
86 bdf5b5cd 2005-07-13 devnull .PP
87 bdf5b5cd 2005-07-13 devnull The index must be sized so that no bucket is full.
88 bdf5b5cd 2005-07-13 devnull When a bucket fills, the server must be shut down and
89 bdf5b5cd 2005-07-13 devnull the index made larger.
90 bdf5b5cd 2005-07-13 devnull Since scores appear random, each bucket will contain
91 bdf5b5cd 2005-07-13 devnull approximately the same number of entries.
92 bdf5b5cd 2005-07-13 devnull Index entries are 40 bytes long. Assuming that a typical block
93 bdf5b5cd 2005-07-13 devnull being written to the server is 8192 bytes and compresses to 4096
94 bdf5b5cd 2005-07-13 devnull bytes, the active index is expected to be about 1% of
95 bdf5b5cd 2005-07-13 devnull the active data log.
96 bdf5b5cd 2005-07-13 devnull Storing smaller blocks increases the relative index footprint;
97 bdf5b5cd 2005-07-13 devnull storing larger blocks decreases it.
98 bdf5b5cd 2005-07-13 devnull To allow variation in both block size and the random distribution
99 bdf5b5cd 2005-07-13 devnull of scores to buckets, the suggested index size is 5% of
100 bdf5b5cd 2005-07-13 devnull the active data log.
101 bdf5b5cd 2005-07-13 devnull .PP
102 bdf5b5cd 2005-07-13 devnull The (optional) bloom filter is a large bitmap that is stored on disk but
103 bdf5b5cd 2005-07-13 devnull also kept completely in memory while the venti server runs.
104 bdf5b5cd 2005-07-13 devnull It helps the venti server efficiently detect scores that are
105 bdf5b5cd 2005-07-13 devnull .I not
106 bdf5b5cd 2005-07-13 devnull already stored in the index.
107 bdf5b5cd 2005-07-13 devnull The bloom filter starts out zeroed.
108 bdf5b5cd 2005-07-13 devnull Each score recorded in the bloom filter is hashed to choose
109 bdf5b5cd 2005-07-13 devnull .I nhash
110 bdf5b5cd 2005-07-13 devnull bits to set in the bloom filter.
111 bdf5b5cd 2005-07-13 devnull A score is definitely not stored in the index of any of its
112 bdf5b5cd 2005-07-13 devnull .I nhash
113 bdf5b5cd 2005-07-13 devnull bits are not set.
114 bdf5b5cd 2005-07-13 devnull The bloom filter thus has two parameters:
115 bdf5b5cd 2005-07-13 devnull .I nhash
116 bdf5b5cd 2005-07-13 devnull (maximum 32)
117 bdf5b5cd 2005-07-13 devnull and the total bitmap size
118 bdf5b5cd 2005-07-13 devnull (maximum 512MB, 2\s-2\u32\d\s+2 bits).
119 bdf5b5cd 2005-07-13 devnull .PP
120 bdf5b5cd 2005-07-13 devnull The bloom filter should be sized so that
121 bdf5b5cd 2005-07-13 devnull .I nhash
122 3aec33fe 2005-07-18 devnull \(mu
123 bdf5b5cd 2005-07-13 devnull .I nblock
124 bdf5b5cd 2005-07-13 devnull \(<=
125 3aec33fe 2005-07-18 devnull 0.7 \(mu
126 bdf5b5cd 2005-07-13 devnull .IR b ,
127 bdf5b5cd 2005-07-13 devnull where
128 bdf5b5cd 2005-07-13 devnull .I nblock
129 bdf5b5cd 2005-07-13 devnull is the expected number of blocks stored on the server
130 bdf5b5cd 2005-07-13 devnull and
131 bdf5b5cd 2005-07-13 devnull .I b
132 bdf5b5cd 2005-07-13 devnull is the bitmap size in bits.
133 bdf5b5cd 2005-07-13 devnull The false positive rate of the bloom filter when sized
134 bdf5b5cd 2005-07-13 devnull this way is approximately 2\s-2\u\-\fInblock\fR\d\s+2.
135 bdf5b5cd 2005-07-13 devnull .I Nhash
136 bdf5b5cd 2005-07-13 devnull less than 10 are not very useful;
137 bdf5b5cd 2005-07-13 devnull .I nhash
138 bdf5b5cd 2005-07-13 devnull greater than 24 are probably a waste of memory.
139 bdf5b5cd 2005-07-13 devnull .I Fmtbloom
140 bdf5b5cd 2005-07-13 devnull (see
141 d32deab1 2020-08-16 rsc .MR venti-fmt (8) )
142 bdf5b5cd 2005-07-13 devnull can be given either
143 bdf5b5cd 2005-07-13 devnull .I nhash
144 bdf5b5cd 2005-07-13 devnull or
145 bdf5b5cd 2005-07-13 devnull .IR nblock ;
146 bdf5b5cd 2005-07-13 devnull if given
147 bdf5b5cd 2005-07-13 devnull .IR nblock ,
148 bdf5b5cd 2005-07-13 devnull it will derive an appropriate
149 bdf5b5cd 2005-07-13 devnull .IR nhash .
150 bdf5b5cd 2005-07-13 devnull .SS Memory
151 bdf5b5cd 2005-07-13 devnull Venti can make effective use of large amounts of memory
152 bdf5b5cd 2005-07-13 devnull for various caches.
153 bdf5b5cd 2005-07-13 devnull .PP
154 bdf5b5cd 2005-07-13 devnull The
155 bdf5b5cd 2005-07-13 devnull .I "lump cache
156 bdf5b5cd 2005-07-13 devnull holds recently-accessed venti data blocks, which the server refers to as
157 bdf5b5cd 2005-07-13 devnull .IR lumps .
158 bdf5b5cd 2005-07-13 devnull The lump cache should be at least 1MB but can profitably be much larger.
159 bdf5b5cd 2005-07-13 devnull The lump cache can be thought of as the level-1 cache:
160 bdf5b5cd 2005-07-13 devnull read requests handled by the lump cache can
161 bdf5b5cd 2005-07-13 devnull be served instantly.
162 bdf5b5cd 2005-07-13 devnull .PP
163 bdf5b5cd 2005-07-13 devnull The
164 bdf5b5cd 2005-07-13 devnull .I "block cache
165 bdf5b5cd 2005-07-13 devnull holds recently-accessed
166 bdf5b5cd 2005-07-13 devnull .I disk
167 bdf5b5cd 2005-07-13 devnull blocks from the arena partitions.
168 bdf5b5cd 2005-07-13 devnull The block cache needs to be able to simultaneously hold two blocks
169 bdf5b5cd 2005-07-13 devnull from each arena plus four blocks for the currently-filling arena.
170 bdf5b5cd 2005-07-13 devnull The block cache can be thought of as the level-2 cache:
171 bdf5b5cd 2005-07-13 devnull read requests handled by the block cache are slower than those
172 bdf5b5cd 2005-07-13 devnull handled by the lump cache, since the lump data must be extracted
173 bdf5b5cd 2005-07-13 devnull from the raw disk blocks and possibly decompressed, but no
174 bdf5b5cd 2005-07-13 devnull disk accesses are necessary.
175 bdf5b5cd 2005-07-13 devnull .PP
176 bdf5b5cd 2005-07-13 devnull The
177 bdf5b5cd 2005-07-13 devnull .I "index cache
178 bdf5b5cd 2005-07-13 devnull holds recently-accessed or prefetched
179 bdf5b5cd 2005-07-13 devnull index entries.
180 bdf5b5cd 2005-07-13 devnull The index cache needs to be able to hold index entries
181 bdf5b5cd 2005-07-13 devnull for three or four arenas, at least, in order for prefetching
182 bdf5b5cd 2005-07-13 devnull to work properly. Each index entry is 50 bytes.
183 bdf5b5cd 2005-07-13 devnull Assuming 500MB arenas of
184 bdf5b5cd 2005-07-13 devnull 128,000 blocks that are 4096 bytes each after compression,
185 bdf5b5cd 2005-07-13 devnull the minimum index cache size is about 6MB.
186 bdf5b5cd 2005-07-13 devnull The index cache can be thought of as the level-3 cache:
187 bdf5b5cd 2005-07-13 devnull read requests handled by the index cache must still go
188 bdf5b5cd 2005-07-13 devnull to disk to fetch the arena blocks, but the costly random
189 bdf5b5cd 2005-07-13 devnull access to the index is avoided.
190 bdf5b5cd 2005-07-13 devnull .PP
191 bdf5b5cd 2005-07-13 devnull The size of the index cache determines how long venti
192 bdf5b5cd 2005-07-13 devnull can sustain its `burst' write throughput, during which time
193 bdf5b5cd 2005-07-13 devnull the only disk accesses on the critical path
194 bdf5b5cd 2005-07-13 devnull are sequential writes to the arena partitions.
195 bdf5b5cd 2005-07-13 devnull For example, if you want to be able to sustain 10MB/s
196 bdf5b5cd 2005-07-13 devnull for an hour, you need enough index cache to hold entries
197 bdf5b5cd 2005-07-13 devnull for 36GB of blocks. Assuming 8192-byte blocks,
198 bdf5b5cd 2005-07-13 devnull you need room for almost five million index entries.
199 bdf5b5cd 2005-07-13 devnull Since index entries are 50 bytes each, you need 250MB
200 bdf5b5cd 2005-07-13 devnull of index cache.
201 bdf5b5cd 2005-07-13 devnull If the background index update process can make a single
202 bdf5b5cd 2005-07-13 devnull pass through the index in an hour, which is possible,
203 bdf5b5cd 2005-07-13 devnull then you can sustain the 10MB/s indefinitely (at least until
204 bdf5b5cd 2005-07-13 devnull the arenas are all filled).
205 bdf5b5cd 2005-07-13 devnull .PP
206 bdf5b5cd 2005-07-13 devnull The
207 bdf5b5cd 2005-07-13 devnull .I "bloom filter
208 bdf5b5cd 2005-07-13 devnull requires memory equal to its size on disk,
209 bdf5b5cd 2005-07-13 devnull as discussed above.
210 bdf5b5cd 2005-07-13 devnull .PP
211 bdf5b5cd 2005-07-13 devnull A reasonable starting allocation is to
212 bdf5b5cd 2005-07-13 devnull divide memory equally (in thirds) between
213 bdf5b5cd 2005-07-13 devnull the bloom filter, the index cache, and the lump and block caches;
214 bdf5b5cd 2005-07-13 devnull the third of memory allocated to the lump and block caches
215 bdf5b5cd 2005-07-13 devnull should be split unevenly, with more (say, two thirds)
216 bdf5b5cd 2005-07-13 devnull going to the block cache.
217 bdf5b5cd 2005-07-13 devnull .SS Network
218 bdf5b5cd 2005-07-13 devnull The venti server announces two network services, one
219 bdf5b5cd 2005-07-13 devnull (conventionally TCP port
220 bdf5b5cd 2005-07-13 devnull .BR venti ,
221 bdf5b5cd 2005-07-13 devnull 17034) serving
222 bdf5b5cd 2005-07-13 devnull the venti protocol as described in
223 d32deab1 2020-08-16 rsc .MR venti (7) ,
224 bdf5b5cd 2005-07-13 devnull and one serving HTTP
225 bdf5b5cd 2005-07-13 devnull (conventionally TCP port
226 a7f1ab29 2011-05-10 rsc .BR http ,
227 bdf5b5cd 2005-07-13 devnull 80).
228 bdf5b5cd 2005-07-13 devnull .PP
229 bdf5b5cd 2005-07-13 devnull The venti web server provides the following
230 bdf5b5cd 2005-07-13 devnull URLs for accessing status information:
231 a7f1ab29 2011-05-10 rsc .TF "\fL/storage"
232 a7f1ab29 2011-05-10 rsc .PD
233 bdf5b5cd 2005-07-13 devnull .TP
234 bdf5b5cd 2005-07-13 devnull .B /index
235 bdf5b5cd 2005-07-13 devnull A summary of the usage of the arenas and index sections.
236 bdf5b5cd 2005-07-13 devnull .TP
237 bdf5b5cd 2005-07-13 devnull .B /xindex
238 bdf5b5cd 2005-07-13 devnull An XML version of
239 bdf5b5cd 2005-07-13 devnull .BR /index .
240 bdf5b5cd 2005-07-13 devnull .TP
241 bdf5b5cd 2005-07-13 devnull .B /storage
242 bdf5b5cd 2005-07-13 devnull Brief storage totals.
243 bdf5b5cd 2005-07-13 devnull .TP
244 7276d83b 2012-07-14 rsc .BI /set
245 7276d83b 2012-07-14 rsc Disable the values of all variables.
246 bdf5b5cd 2005-07-13 devnull Variables are:
247 bdf5b5cd 2005-07-13 devnull .BR compress ,
248 bdf5b5cd 2005-07-13 devnull whether or not to compress blocks
249 bdf5b5cd 2005-07-13 devnull (for debugging);
250 bdf5b5cd 2005-07-13 devnull .BR logging ,
251 bdf5b5cd 2005-07-13 devnull whether to write entries to the debugging logs;
252 bdf5b5cd 2005-07-13 devnull .BR stats ,
253 bdf5b5cd 2005-07-13 devnull whether to collect run-time statistics;
254 bdf5b5cd 2005-07-13 devnull .BR icachesleeptime ,
255 bdf5b5cd 2005-07-13 devnull the time in milliseconds between successive updates
256 bdf5b5cd 2005-07-13 devnull of megabytes of the index cache;
257 bdf5b5cd 2005-07-13 devnull .BR arenasumsleeptime ,
258 bdf5b5cd 2005-07-13 devnull the time in milliseconds between reads while
259 bdf5b5cd 2005-07-13 devnull checksumming an arena in the background.
260 bdf5b5cd 2005-07-13 devnull The two sleep times should be (but are not) managed by venti;
261 bdf5b5cd 2005-07-13 devnull they exist to provide more experience with their effects.
262 bdf5b5cd 2005-07-13 devnull The other variables exist only for debugging and
263 bdf5b5cd 2005-07-13 devnull performance measurement.
264 bdf5b5cd 2005-07-13 devnull .TP
265 7276d83b 2012-07-14 rsc .BI /set?name= variable
266 7276d83b 2012-07-14 rsc Show the current setting of
267 7276d83b 2012-07-14 rsc .IR variable .
268 7276d83b 2012-07-14 rsc .TP
269 7276d83b 2012-07-14 rsc .BI /set?name= variable &value= value
270 bdf5b5cd 2005-07-13 devnull Set
271 bdf5b5cd 2005-07-13 devnull .I variable
272 bdf5b5cd 2005-07-13 devnull to
273 bdf5b5cd 2005-07-13 devnull .IR value .
274 bdf5b5cd 2005-07-13 devnull .TP
275 185fd7db 2020-01-13 crossd .BI /graph?arg= name [&arg2= name] &graph= type &param= value \fR...
276 185fd7db 2020-01-13 crossd A PNG image graphing the
277 185fd7db 2020-01-13 crossd .IT name
278 185fd7db 2020-01-13 crossd run-time statistic over time.
279 185fd7db 2020-01-13 crossd The details of names and parameters are mostly undocumented;
280 185fd7db 2020-01-13 crossd see the
281 185fd7db 2020-01-13 crossd .BR graphname
282 185fd7db 2020-01-13 crossd array in
283 bdf5b5cd 2005-07-13 devnull .B httpd.c
284 185fd7db 2020-01-13 crossd in the venti code for a list of possible statistics. The
285 185fd7db 2020-01-13 crossd .IR type
286 185fd7db 2020-01-13 crossd of graph defaults to raw, see the
287 185fd7db 2020-01-13 crossd .BR xgraph
288 185fd7db 2020-01-13 crossd function for a list of types. Possible
289 185fd7db 2020-01-13 crossd .IR param
290 185fd7db 2020-01-13 crossd include the timeframe
291 185fd7db 2020-01-13 crossd .BR (t0
292 185fd7db 2020-01-13 crossd and
293 185fd7db 2020-01-13 crossd .BR t1)
294 185fd7db 2020-01-13 crossd , the y limits
295 185fd7db 2020-01-13 crossd .BR (min
296 185fd7db 2020-01-13 crossd and
297 185fd7db 2020-01-13 crossd .BR max)
298 185fd7db 2020-01-13 crossd etc.
299 bdf5b5cd 2005-07-13 devnull .TP
300 bdf5b5cd 2005-07-13 devnull .B /log
301 bdf5b5cd 2005-07-13 devnull A list of all debugging logs present in the server's memory.
302 bdf5b5cd 2005-07-13 devnull .TP
303 bdf5b5cd 2005-07-13 devnull .BI /log/ name
304 bdf5b5cd 2005-07-13 devnull The contents of the debugging log with the given
305 bdf5b5cd 2005-07-13 devnull .IR name .
306 bdf5b5cd 2005-07-13 devnull .TP
307 bdf5b5cd 2005-07-13 devnull .B /flushicache
308 bdf5b5cd 2005-07-13 devnull Force venti to begin flushing the index cache to disk.
309 bdf5b5cd 2005-07-13 devnull The request response will not be sent until the flush
310 bdf5b5cd 2005-07-13 devnull has completed.
311 bdf5b5cd 2005-07-13 devnull .TP
312 bdf5b5cd 2005-07-13 devnull .B /flushdcache
313 bdf5b5cd 2005-07-13 devnull Force venti to begin flushing the arena block cache to disk.
314 bdf5b5cd 2005-07-13 devnull The request response will not be sent until the flush
315 bdf5b5cd 2005-07-13 devnull has completed.
316 bdf5b5cd 2005-07-13 devnull .PD
317 bdf5b5cd 2005-07-13 devnull .PP
318 bdf5b5cd 2005-07-13 devnull Requests for other files are served by consulting a
319 bdf5b5cd 2005-07-13 devnull directory named in the configuration file
320 bdf5b5cd 2005-07-13 devnull (see
321 bdf5b5cd 2005-07-13 devnull .B webroot
322 bdf5b5cd 2005-07-13 devnull below).
323 bdf5b5cd 2005-07-13 devnull .SS Configuration File
324 bdf5b5cd 2005-07-13 devnull A venti configuration file
325 bdf5b5cd 2005-07-13 devnull enumerates the various index sections and
326 bdf5b5cd 2005-07-13 devnull arenas that constitute a venti system.
327 bdf5b5cd 2005-07-13 devnull The components are indicated by the name of the file, typically
328 bdf5b5cd 2005-07-13 devnull a disk partition, in which they reside. The configuration
329 bdf5b5cd 2005-07-13 devnull file is the only location that file names are used. Internally,
330 bdf5b5cd 2005-07-13 devnull venti uses the names assigned when the components were formatted
331 bdf5b5cd 2005-07-13 devnull with
332 bdf5b5cd 2005-07-13 devnull .I fmtarenas
333 bdf5b5cd 2005-07-13 devnull or
334 bdf5b5cd 2005-07-13 devnull .I fmtisect
335 bdf5b5cd 2005-07-13 devnull (see
336 d32deab1 2020-08-16 rsc .MR venti-fmt (8) ).
337 bdf5b5cd 2005-07-13 devnull In particular, only the configuration needs to be
338 bdf5b5cd 2005-07-13 devnull changed if a component is moved to a different file.
339 bdf5b5cd 2005-07-13 devnull .PP
340 bdf5b5cd 2005-07-13 devnull The configuration file consists of lines in the form described below.
341 bdf5b5cd 2005-07-13 devnull Lines starting with
342 bdf5b5cd 2005-07-13 devnull .B #
343 bdf5b5cd 2005-07-13 devnull are comments.
344 a7f1ab29 2011-05-10 rsc .TF "\fLindex\fI name "
345 a7f1ab29 2011-05-10 rsc .PD
346 bdf5b5cd 2005-07-13 devnull .TP
347 bdf5b5cd 2005-07-13 devnull .BI index " name
348 bdf5b5cd 2005-07-13 devnull Names the index for the system.
349 bdf5b5cd 2005-07-13 devnull .TP
350 bdf5b5cd 2005-07-13 devnull .BI arenas " file
351 bdf5b5cd 2005-07-13 devnull .I File
352 bdf5b5cd 2005-07-13 devnull is an arena partition, formatted using
353 bdf5b5cd 2005-07-13 devnull .IR fmtarenas .
354 bdf5b5cd 2005-07-13 devnull .TP
355 bdf5b5cd 2005-07-13 devnull .BI isect " file
356 bdf5b5cd 2005-07-13 devnull .I File
357 bdf5b5cd 2005-07-13 devnull is an index section, formatted using
358 bdf5b5cd 2005-07-13 devnull .IR fmtisect .
359 eb5fbb97 2005-08-11 devnull .TP
360 eb5fbb97 2005-08-11 devnull .BI bloom " file
361 eb5fbb97 2005-08-11 devnull .I File
362 eb5fbb97 2005-08-11 devnull is a bloom filter, formatted using
363 eb5fbb97 2005-08-11 devnull .IR fmtbloom .
364 06466bd0 2005-07-24 devnull .PD
365 bdf5b5cd 2005-07-13 devnull .PP
366 bdf5b5cd 2005-07-13 devnull After formatting a venti system using
367 bdf5b5cd 2005-07-13 devnull .IR fmtindex ,
368 bdf5b5cd 2005-07-13 devnull the order of arenas and index sections should not be changed.
369 bdf5b5cd 2005-07-13 devnull Additional arenas can be appended to the configuration;
370 bdf5b5cd 2005-07-13 devnull run
371 bdf5b5cd 2005-07-13 devnull .I fmtindex
372 bdf5b5cd 2005-07-13 devnull with the
373 bdf5b5cd 2005-07-13 devnull .B -a
374 bdf5b5cd 2005-07-13 devnull flag to update the index.
375 bdf5b5cd 2005-07-13 devnull .PP
376 bdf5b5cd 2005-07-13 devnull The configuration file also holds configuration parameters
377 bdf5b5cd 2005-07-13 devnull for the venti server itself.
378 bdf5b5cd 2005-07-13 devnull These are:
379 a7f1ab29 2011-05-10 rsc .TF "\fLhttpaddr\fI netaddr "
380 bdf5b5cd 2005-07-13 devnull .TP
381 bdf5b5cd 2005-07-13 devnull .BI mem " size
382 bdf5b5cd 2005-07-13 devnull lump cache size
383 bdf5b5cd 2005-07-13 devnull .TP
384 bdf5b5cd 2005-07-13 devnull .BI bcmem " size
385 bdf5b5cd 2005-07-13 devnull block cache size
386 bdf5b5cd 2005-07-13 devnull .TP
387 bdf5b5cd 2005-07-13 devnull .BI icmem " size
388 bdf5b5cd 2005-07-13 devnull index cache size
389 bdf5b5cd 2005-07-13 devnull .TP
390 bdf5b5cd 2005-07-13 devnull .BI addr " netaddr
391 bdf5b5cd 2005-07-13 devnull network address to announce venti service
392 bdf5b5cd 2005-07-13 devnull (default
393 bdf5b5cd 2005-07-13 devnull .BR tcp!*!venti )
394 bdf5b5cd 2005-07-13 devnull .TP
395 bdf5b5cd 2005-07-13 devnull .BI httpaddr " netaddr
396 bdf5b5cd 2005-07-13 devnull network address to announce HTTP service
397 185fd7db 2020-01-13 crossd (default is not to start the service)
398 bdf5b5cd 2005-07-13 devnull .TP
399 bdf5b5cd 2005-07-13 devnull .B queuewrites
400 bdf5b5cd 2005-07-13 devnull queue writes in memory
401 bdf5b5cd 2005-07-13 devnull (default is not to queue)
402 bdf5b5cd 2005-07-13 devnull .TP
403 bdf5b5cd 2005-07-13 devnull .BI webroot " dir
404 a7f1ab29 2011-05-10 rsc directory tree containing files for
405 a7f1ab29 2011-05-10 rsc .IR venti 's
406 a7f1ab29 2011-05-10 rsc internal HTTP server to consult for unrecognized URLs
407 bdf5b5cd 2005-07-13 devnull .PD
408 bdf5b5cd 2005-07-13 devnull .PP
409 bdf5b5cd 2005-07-13 devnull The units for the various cache sizes above can be specified by appending a
410 bdf5b5cd 2005-07-13 devnull .LR k ,
411 bdf5b5cd 2005-07-13 devnull .LR m ,
412 bdf5b5cd 2005-07-13 devnull or
413 bdf5b5cd 2005-07-13 devnull .LR g
414 bdf5b5cd 2005-07-13 devnull (case-insensitive)
415 bdf5b5cd 2005-07-13 devnull to indicate kilobytes, megabytes, or gigabytes respectively.
416 06466bd0 2005-07-24 devnull .PP
417 06466bd0 2005-07-24 devnull The
418 06466bd0 2005-07-24 devnull .I file
419 06466bd0 2005-07-24 devnull name in the configuration lines above can be of the form
420 06466bd0 2005-07-24 devnull .IB file : lo - hi
421 06466bd0 2005-07-24 devnull to specify a range of the file.
422 06466bd0 2005-07-24 devnull .I Lo
423 06466bd0 2005-07-24 devnull and
424 06466bd0 2005-07-24 devnull .I hi
425 06466bd0 2005-07-24 devnull are specified in bytes but can have the usual
426 06466bd0 2005-07-24 devnull .BI k ,
427 06466bd0 2005-07-24 devnull .BI m ,
428 06466bd0 2005-07-24 devnull or
429 06466bd0 2005-07-24 devnull .B g
430 06466bd0 2005-07-24 devnull suffixes.
431 06466bd0 2005-07-24 devnull Either
432 06466bd0 2005-07-24 devnull .I lo
433 06466bd0 2005-07-24 devnull or
434 06466bd0 2005-07-24 devnull .I hi
435 06466bd0 2005-07-24 devnull may be omitted.
436 06466bd0 2005-07-24 devnull This notation eliminates the need to
437 06466bd0 2005-07-24 devnull partition raw disks on non-Plan 9 systems.
438 bdf5b5cd 2005-07-13 devnull .SS Command Line
439 3aec33fe 2005-07-18 devnull Many of the options to Venti duplicate parameters that
440 3aec33fe 2005-07-18 devnull can be specified in the configuration file.
441 3aec33fe 2005-07-18 devnull The command line options override those found in a
442 3aec33fe 2005-07-18 devnull configuration file.
443 3aec33fe 2005-07-18 devnull Additional options are:
444 a7f1ab29 2011-05-10 rsc .TF "\fL-c\fI config"
445 a7f1ab29 2011-05-10 rsc .PD
446 bdf5b5cd 2005-07-13 devnull .TP
447 bdf5b5cd 2005-07-13 devnull .BI -c " config
448 bdf5b5cd 2005-07-13 devnull The server configuration file
449 bdf5b5cd 2005-07-13 devnull (default
450 bdf5b5cd 2005-07-13 devnull .BR venti.conf )
451 bdf5b5cd 2005-07-13 devnull .TP
452 bdf5b5cd 2005-07-13 devnull .B -d
453 bdf5b5cd 2005-07-13 devnull Produce various debugging information on standard error.
454 bdf5b5cd 2005-07-13 devnull Implies
455 bdf5b5cd 2005-07-13 devnull .BR -s .
456 bdf5b5cd 2005-07-13 devnull .TP
457 bdf5b5cd 2005-07-13 devnull .B -L
458 bdf5b5cd 2005-07-13 devnull Enable logging. By default all logging is disabled.
459 bdf5b5cd 2005-07-13 devnull Logging slows server operation considerably.
460 bdf5b5cd 2005-07-13 devnull .TP
461 cbc99e3e 2011-06-03 rsc .B -r
462 cbc99e3e 2011-06-03 rsc Allow only read access to the venti data.
463 cbc99e3e 2011-06-03 rsc .TP
464 bdf5b5cd 2005-07-13 devnull .B -s
465 bdf5b5cd 2005-07-13 devnull Do not run in the background.
466 bdf5b5cd 2005-07-13 devnull Normally,
467 bdf5b5cd 2005-07-13 devnull the foreground process will exit once the Venti server
468 bdf5b5cd 2005-07-13 devnull is initialized and ready for connections.
469 bdf5b5cd 2005-07-13 devnull .PD
470 bdf5b5cd 2005-07-13 devnull .SH EXAMPLE
471 bdf5b5cd 2005-07-13 devnull A simple configuration:
472 bdf5b5cd 2005-07-13 devnull .IP
473 bdf5b5cd 2005-07-13 devnull .EX
474 bdf5b5cd 2005-07-13 devnull % cat venti.conf
475 bdf5b5cd 2005-07-13 devnull index main
476 bdf5b5cd 2005-07-13 devnull isect /tmp/disks/isect0
477 bdf5b5cd 2005-07-13 devnull isect /tmp/disks/isect1
478 bdf5b5cd 2005-07-13 devnull arenas /tmp/disks/arenas
479 eb5fbb97 2005-08-11 devnull bloom /tmp/disks/bloom
480 bdf5b5cd 2005-07-13 devnull mem 10M
481 bdf5b5cd 2005-07-13 devnull bcmem 20M
482 bdf5b5cd 2005-07-13 devnull icmem 30M
483 bdf5b5cd 2005-07-13 devnull %
484 bdf5b5cd 2005-07-13 devnull .EE
485 bdf5b5cd 2005-07-13 devnull .PP
486 a7f1ab29 2011-05-10 rsc Format the index sections, the arena partition,
487 a7f1ab29 2011-05-10 rsc the bloom filter, and
488 bdf5b5cd 2005-07-13 devnull finally the main index:
489 bdf5b5cd 2005-07-13 devnull .IP
490 bdf5b5cd 2005-07-13 devnull .EX
491 a7f1ab29 2011-05-10 rsc % venti/fmtisect isect0. /tmp/disks/isect0
492 a7f1ab29 2011-05-10 rsc % venti/fmtisect isect1. /tmp/disks/isect1
493 bdf5b5cd 2005-07-13 devnull % venti/fmtarenas arenas0. /tmp/disks/arenas &
494 eb5fbb97 2005-08-11 devnull % venti/fmtbloom /tmp/disks/bloom &
495 bdf5b5cd 2005-07-13 devnull % wait
496 bdf5b5cd 2005-07-13 devnull % venti/fmtindex venti.conf
497 bdf5b5cd 2005-07-13 devnull %
498 bdf5b5cd 2005-07-13 devnull .EE
499 bdf5b5cd 2005-07-13 devnull .PP
500 bdf5b5cd 2005-07-13 devnull Start the server and check the storage statistics:
501 bdf5b5cd 2005-07-13 devnull .IP
502 bdf5b5cd 2005-07-13 devnull .EX
503 bdf5b5cd 2005-07-13 devnull % venti/venti
504 bdf5b5cd 2005-07-13 devnull % hget http://$sysname/storage
505 bdf5b5cd 2005-07-13 devnull .EE
506 3aec33fe 2005-07-18 devnull .SH SOURCE
507 3aec33fe 2005-07-18 devnull .B \*9/src/cmd/venti/srv
508 bdf5b5cd 2005-07-13 devnull .SH "SEE ALSO"
509 d32deab1 2020-08-16 rsc .MR venti (1) ,
510 d32deab1 2020-08-16 rsc .MR venti (3) ,
511 d32deab1 2020-08-16 rsc .MR venti (7) ,
512 d32deab1 2020-08-16 rsc .MR venti-backup (8)
513 d32deab1 2020-08-16 rsc .MR venti-fmt (8)
514 bdf5b5cd 2005-07-13 devnull .br
515 bdf5b5cd 2005-07-13 devnull Sean Quinlan and Sean Dorward,
516 bdf5b5cd 2005-07-13 devnull ``Venti: a new approach to archival storage'',
517 bdf5b5cd 2005-07-13 devnull .I "Usenix Conference on File and Storage Technologies" ,
518 bdf5b5cd 2005-07-13 devnull 2002.
519 bdf5b5cd 2005-07-13 devnull .SH BUGS
520 bdf5b5cd 2005-07-13 devnull Setting up a venti server is too complicated.
521 bdf5b5cd 2005-07-13 devnull .PP
522 bdf5b5cd 2005-07-13 devnull Venti should not require the user to decide how to
523 bdf5b5cd 2005-07-13 devnull partition its memory usage.
524 3aec33fe 2005-07-18 devnull .PP
525 3aec33fe 2005-07-18 devnull Users of shells other than
526 d32deab1 2020-08-16 rsc .MR rc (1)
527 3aec33fe 2005-07-18 devnull will not be able to use the program names shown.
528 3aec33fe 2005-07-18 devnull One solution is to define
529 3aec33fe 2005-07-18 devnull .B "V=$PLAN9/bin/venti"
530 3aec33fe 2005-07-18 devnull and then substitute
531 3aec33fe 2005-07-18 devnull .B $V/
532 3aec33fe 2005-07-18 devnull for
533 3aec33fe 2005-07-18 devnull .B venti/
534 3aec33fe 2005-07-18 devnull in the paths above.