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 bdf5b5cd 2005-07-13 devnull .IR 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 bdf5b5cd 2005-07-13 devnull .IR 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 bdf5b5cd 2005-07-13 devnull .IR 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 bdf5b5cd 2005-07-13 devnull .BI /set/ variable
245 bdf5b5cd 2005-07-13 devnull The current integer value of
246 bdf5b5cd 2005-07-13 devnull .IR variable .
247 bdf5b5cd 2005-07-13 devnull Variables are:
248 bdf5b5cd 2005-07-13 devnull .BR compress ,
249 bdf5b5cd 2005-07-13 devnull whether or not to compress blocks
250 bdf5b5cd 2005-07-13 devnull (for debugging);
251 bdf5b5cd 2005-07-13 devnull .BR logging ,
252 bdf5b5cd 2005-07-13 devnull whether to write entries to the debugging logs;
253 bdf5b5cd 2005-07-13 devnull .BR stats ,
254 bdf5b5cd 2005-07-13 devnull whether to collect run-time statistics;
255 bdf5b5cd 2005-07-13 devnull .BR icachesleeptime ,
256 bdf5b5cd 2005-07-13 devnull the time in milliseconds between successive updates
257 bdf5b5cd 2005-07-13 devnull of megabytes of the index cache;
258 bdf5b5cd 2005-07-13 devnull .BR arenasumsleeptime ,
259 bdf5b5cd 2005-07-13 devnull the time in milliseconds between reads while
260 bdf5b5cd 2005-07-13 devnull checksumming an arena in the background.
261 bdf5b5cd 2005-07-13 devnull The two sleep times should be (but are not) managed by venti;
262 bdf5b5cd 2005-07-13 devnull they exist to provide more experience with their effects.
263 bdf5b5cd 2005-07-13 devnull The other variables exist only for debugging and
264 bdf5b5cd 2005-07-13 devnull performance measurement.
265 bdf5b5cd 2005-07-13 devnull .TP
266 bdf5b5cd 2005-07-13 devnull .BI /set/ variable / value
267 bdf5b5cd 2005-07-13 devnull Set
268 bdf5b5cd 2005-07-13 devnull .I variable
269 bdf5b5cd 2005-07-13 devnull to
270 bdf5b5cd 2005-07-13 devnull .IR value .
271 bdf5b5cd 2005-07-13 devnull .TP
272 bdf5b5cd 2005-07-13 devnull .BI /graph/ name / param / param / \fR...
273 bdf5b5cd 2005-07-13 devnull A PNG image graphing the named run-time statistic over time.
274 bdf5b5cd 2005-07-13 devnull The details of names and parameters are undocumented;
275 bdf5b5cd 2005-07-13 devnull see
276 bdf5b5cd 2005-07-13 devnull .B httpd.c
277 bdf5b5cd 2005-07-13 devnull in the venti sources.
278 bdf5b5cd 2005-07-13 devnull .TP
279 bdf5b5cd 2005-07-13 devnull .B /log
280 bdf5b5cd 2005-07-13 devnull A list of all debugging logs present in the server's memory.
281 bdf5b5cd 2005-07-13 devnull .TP
282 bdf5b5cd 2005-07-13 devnull .BI /log/ name
283 bdf5b5cd 2005-07-13 devnull The contents of the debugging log with the given
284 bdf5b5cd 2005-07-13 devnull .IR name .
285 bdf5b5cd 2005-07-13 devnull .TP
286 bdf5b5cd 2005-07-13 devnull .B /flushicache
287 bdf5b5cd 2005-07-13 devnull Force venti to begin flushing the index cache to disk.
288 bdf5b5cd 2005-07-13 devnull The request response will not be sent until the flush
289 bdf5b5cd 2005-07-13 devnull has completed.
290 bdf5b5cd 2005-07-13 devnull .TP
291 bdf5b5cd 2005-07-13 devnull .B /flushdcache
292 bdf5b5cd 2005-07-13 devnull Force venti to begin flushing the arena block cache to disk.
293 bdf5b5cd 2005-07-13 devnull The request response will not be sent until the flush
294 bdf5b5cd 2005-07-13 devnull has completed.
295 bdf5b5cd 2005-07-13 devnull .PD
296 bdf5b5cd 2005-07-13 devnull .PP
297 bdf5b5cd 2005-07-13 devnull Requests for other files are served by consulting a
298 bdf5b5cd 2005-07-13 devnull directory named in the configuration file
299 bdf5b5cd 2005-07-13 devnull (see
300 bdf5b5cd 2005-07-13 devnull .B webroot
301 bdf5b5cd 2005-07-13 devnull below).
302 bdf5b5cd 2005-07-13 devnull .SS Configuration File
303 bdf5b5cd 2005-07-13 devnull A venti configuration file
304 bdf5b5cd 2005-07-13 devnull enumerates the various index sections and
305 bdf5b5cd 2005-07-13 devnull arenas that constitute a venti system.
306 bdf5b5cd 2005-07-13 devnull The components are indicated by the name of the file, typically
307 bdf5b5cd 2005-07-13 devnull a disk partition, in which they reside. The configuration
308 bdf5b5cd 2005-07-13 devnull file is the only location that file names are used. Internally,
309 bdf5b5cd 2005-07-13 devnull venti uses the names assigned when the components were formatted
310 bdf5b5cd 2005-07-13 devnull with
311 bdf5b5cd 2005-07-13 devnull .I fmtarenas
312 bdf5b5cd 2005-07-13 devnull or
313 bdf5b5cd 2005-07-13 devnull .I fmtisect
314 bdf5b5cd 2005-07-13 devnull (see
315 bdf5b5cd 2005-07-13 devnull .IR venti-fmt (8)).
316 bdf5b5cd 2005-07-13 devnull In particular, only the configuration needs to be
317 bdf5b5cd 2005-07-13 devnull changed if a component is moved to a different file.
318 bdf5b5cd 2005-07-13 devnull .PP
319 bdf5b5cd 2005-07-13 devnull The configuration file consists of lines in the form described below.
320 bdf5b5cd 2005-07-13 devnull Lines starting with
321 bdf5b5cd 2005-07-13 devnull .B #
322 bdf5b5cd 2005-07-13 devnull are comments.
323 a7f1ab29 2011-05-10 rsc .TF "\fLindex\fI name "
324 a7f1ab29 2011-05-10 rsc .PD
325 bdf5b5cd 2005-07-13 devnull .TP
326 bdf5b5cd 2005-07-13 devnull .BI index " name
327 bdf5b5cd 2005-07-13 devnull Names the index for the system.
328 bdf5b5cd 2005-07-13 devnull .TP
329 bdf5b5cd 2005-07-13 devnull .BI arenas " file
330 bdf5b5cd 2005-07-13 devnull .I File
331 bdf5b5cd 2005-07-13 devnull is an arena partition, formatted using
332 bdf5b5cd 2005-07-13 devnull .IR fmtarenas .
333 bdf5b5cd 2005-07-13 devnull .TP
334 bdf5b5cd 2005-07-13 devnull .BI isect " file
335 bdf5b5cd 2005-07-13 devnull .I File
336 bdf5b5cd 2005-07-13 devnull is an index section, formatted using
337 bdf5b5cd 2005-07-13 devnull .IR fmtisect .
338 eb5fbb97 2005-08-11 devnull .TP
339 eb5fbb97 2005-08-11 devnull .BI bloom " file
340 eb5fbb97 2005-08-11 devnull .I File
341 eb5fbb97 2005-08-11 devnull is a bloom filter, formatted using
342 eb5fbb97 2005-08-11 devnull .IR fmtbloom .
343 06466bd0 2005-07-24 devnull .PD
344 bdf5b5cd 2005-07-13 devnull .PP
345 bdf5b5cd 2005-07-13 devnull After formatting a venti system using
346 bdf5b5cd 2005-07-13 devnull .IR fmtindex ,
347 bdf5b5cd 2005-07-13 devnull the order of arenas and index sections should not be changed.
348 bdf5b5cd 2005-07-13 devnull Additional arenas can be appended to the configuration;
349 bdf5b5cd 2005-07-13 devnull run
350 bdf5b5cd 2005-07-13 devnull .I fmtindex
351 bdf5b5cd 2005-07-13 devnull with the
352 bdf5b5cd 2005-07-13 devnull .B -a
353 bdf5b5cd 2005-07-13 devnull flag to update the index.
354 bdf5b5cd 2005-07-13 devnull .PP
355 bdf5b5cd 2005-07-13 devnull The configuration file also holds configuration parameters
356 bdf5b5cd 2005-07-13 devnull for the venti server itself.
357 bdf5b5cd 2005-07-13 devnull These are:
358 a7f1ab29 2011-05-10 rsc .TF "\fLhttpaddr\fI netaddr "
359 bdf5b5cd 2005-07-13 devnull .TP
360 bdf5b5cd 2005-07-13 devnull .BI mem " size
361 bdf5b5cd 2005-07-13 devnull lump cache size
362 bdf5b5cd 2005-07-13 devnull .TP
363 bdf5b5cd 2005-07-13 devnull .BI bcmem " size
364 bdf5b5cd 2005-07-13 devnull block cache size
365 bdf5b5cd 2005-07-13 devnull .TP
366 bdf5b5cd 2005-07-13 devnull .BI icmem " size
367 bdf5b5cd 2005-07-13 devnull index cache size
368 bdf5b5cd 2005-07-13 devnull .TP
369 bdf5b5cd 2005-07-13 devnull .BI addr " netaddr
370 bdf5b5cd 2005-07-13 devnull network address to announce venti service
371 bdf5b5cd 2005-07-13 devnull (default
372 bdf5b5cd 2005-07-13 devnull .BR tcp!*!venti )
373 bdf5b5cd 2005-07-13 devnull .TP
374 bdf5b5cd 2005-07-13 devnull .BI httpaddr " netaddr
375 bdf5b5cd 2005-07-13 devnull network address to announce HTTP service
376 bdf5b5cd 2005-07-13 devnull (default
377 bdf5b5cd 2005-07-13 devnull .BR tcp!*!http )
378 bdf5b5cd 2005-07-13 devnull .TP
379 bdf5b5cd 2005-07-13 devnull .B queuewrites
380 bdf5b5cd 2005-07-13 devnull queue writes in memory
381 bdf5b5cd 2005-07-13 devnull (default is not to queue)
382 bdf5b5cd 2005-07-13 devnull .TP
383 bdf5b5cd 2005-07-13 devnull .BI webroot " dir
384 a7f1ab29 2011-05-10 rsc directory tree containing files for
385 a7f1ab29 2011-05-10 rsc .IR venti 's
386 a7f1ab29 2011-05-10 rsc internal HTTP server to consult for unrecognized URLs
387 bdf5b5cd 2005-07-13 devnull .PD
388 bdf5b5cd 2005-07-13 devnull .PP
389 bdf5b5cd 2005-07-13 devnull The units for the various cache sizes above can be specified by appending a
390 bdf5b5cd 2005-07-13 devnull .LR k ,
391 bdf5b5cd 2005-07-13 devnull .LR m ,
392 bdf5b5cd 2005-07-13 devnull or
393 bdf5b5cd 2005-07-13 devnull .LR g
394 bdf5b5cd 2005-07-13 devnull (case-insensitive)
395 bdf5b5cd 2005-07-13 devnull to indicate kilobytes, megabytes, or gigabytes respectively.
396 06466bd0 2005-07-24 devnull .PP
397 06466bd0 2005-07-24 devnull The
398 06466bd0 2005-07-24 devnull .I file
399 06466bd0 2005-07-24 devnull name in the configuration lines above can be of the form
400 06466bd0 2005-07-24 devnull .IB file : lo - hi
401 06466bd0 2005-07-24 devnull to specify a range of the file.
402 06466bd0 2005-07-24 devnull .I Lo
403 06466bd0 2005-07-24 devnull and
404 06466bd0 2005-07-24 devnull .I hi
405 06466bd0 2005-07-24 devnull are specified in bytes but can have the usual
406 06466bd0 2005-07-24 devnull .BI k ,
407 06466bd0 2005-07-24 devnull .BI m ,
408 06466bd0 2005-07-24 devnull or
409 06466bd0 2005-07-24 devnull .B g
410 06466bd0 2005-07-24 devnull suffixes.
411 06466bd0 2005-07-24 devnull Either
412 06466bd0 2005-07-24 devnull .I lo
413 06466bd0 2005-07-24 devnull or
414 06466bd0 2005-07-24 devnull .I hi
415 06466bd0 2005-07-24 devnull may be omitted.
416 06466bd0 2005-07-24 devnull This notation eliminates the need to
417 06466bd0 2005-07-24 devnull partition raw disks on non-Plan 9 systems.
418 bdf5b5cd 2005-07-13 devnull .SS Command Line
419 3aec33fe 2005-07-18 devnull Many of the options to Venti duplicate parameters that
420 3aec33fe 2005-07-18 devnull can be specified in the configuration file.
421 3aec33fe 2005-07-18 devnull The command line options override those found in a
422 3aec33fe 2005-07-18 devnull configuration file.
423 3aec33fe 2005-07-18 devnull Additional options are:
424 a7f1ab29 2011-05-10 rsc .TF "\fL-c\fI config"
425 a7f1ab29 2011-05-10 rsc .PD
426 bdf5b5cd 2005-07-13 devnull .TP
427 bdf5b5cd 2005-07-13 devnull .BI -c " config
428 bdf5b5cd 2005-07-13 devnull The server configuration file
429 bdf5b5cd 2005-07-13 devnull (default
430 bdf5b5cd 2005-07-13 devnull .BR venti.conf )
431 bdf5b5cd 2005-07-13 devnull .TP
432 bdf5b5cd 2005-07-13 devnull .B -d
433 bdf5b5cd 2005-07-13 devnull Produce various debugging information on standard error.
434 bdf5b5cd 2005-07-13 devnull Implies
435 bdf5b5cd 2005-07-13 devnull .BR -s .
436 bdf5b5cd 2005-07-13 devnull .TP
437 bdf5b5cd 2005-07-13 devnull .B -L
438 bdf5b5cd 2005-07-13 devnull Enable logging. By default all logging is disabled.
439 bdf5b5cd 2005-07-13 devnull Logging slows server operation considerably.
440 bdf5b5cd 2005-07-13 devnull .TP
441 cbc99e3e 2011-06-03 rsc .B -r
442 cbc99e3e 2011-06-03 rsc Allow only read access to the venti data.
443 cbc99e3e 2011-06-03 rsc .TP
444 bdf5b5cd 2005-07-13 devnull .B -s
445 bdf5b5cd 2005-07-13 devnull Do not run in the background.
446 bdf5b5cd 2005-07-13 devnull Normally,
447 bdf5b5cd 2005-07-13 devnull the foreground process will exit once the Venti server
448 bdf5b5cd 2005-07-13 devnull is initialized and ready for connections.
449 bdf5b5cd 2005-07-13 devnull .PD
450 bdf5b5cd 2005-07-13 devnull .SH EXAMPLE
451 bdf5b5cd 2005-07-13 devnull A simple configuration:
452 bdf5b5cd 2005-07-13 devnull .IP
453 bdf5b5cd 2005-07-13 devnull .EX
454 bdf5b5cd 2005-07-13 devnull % cat venti.conf
455 bdf5b5cd 2005-07-13 devnull index main
456 bdf5b5cd 2005-07-13 devnull isect /tmp/disks/isect0
457 bdf5b5cd 2005-07-13 devnull isect /tmp/disks/isect1
458 bdf5b5cd 2005-07-13 devnull arenas /tmp/disks/arenas
459 eb5fbb97 2005-08-11 devnull bloom /tmp/disks/bloom
460 bdf5b5cd 2005-07-13 devnull mem 10M
461 bdf5b5cd 2005-07-13 devnull bcmem 20M
462 bdf5b5cd 2005-07-13 devnull icmem 30M
463 bdf5b5cd 2005-07-13 devnull %
464 bdf5b5cd 2005-07-13 devnull .EE
465 bdf5b5cd 2005-07-13 devnull .PP
466 a7f1ab29 2011-05-10 rsc Format the index sections, the arena partition,
467 a7f1ab29 2011-05-10 rsc the bloom filter, and
468 bdf5b5cd 2005-07-13 devnull finally the main index:
469 bdf5b5cd 2005-07-13 devnull .IP
470 bdf5b5cd 2005-07-13 devnull .EX
471 a7f1ab29 2011-05-10 rsc % venti/fmtisect isect0. /tmp/disks/isect0
472 a7f1ab29 2011-05-10 rsc % venti/fmtisect isect1. /tmp/disks/isect1
473 bdf5b5cd 2005-07-13 devnull % venti/fmtarenas arenas0. /tmp/disks/arenas &
474 eb5fbb97 2005-08-11 devnull % venti/fmtbloom /tmp/disks/bloom &
475 bdf5b5cd 2005-07-13 devnull % wait
476 bdf5b5cd 2005-07-13 devnull % venti/fmtindex venti.conf
477 bdf5b5cd 2005-07-13 devnull %
478 bdf5b5cd 2005-07-13 devnull .EE
479 bdf5b5cd 2005-07-13 devnull .PP
480 bdf5b5cd 2005-07-13 devnull Start the server and check the storage statistics:
481 bdf5b5cd 2005-07-13 devnull .IP
482 bdf5b5cd 2005-07-13 devnull .EX
483 bdf5b5cd 2005-07-13 devnull % venti/venti
484 bdf5b5cd 2005-07-13 devnull % hget http://$sysname/storage
485 bdf5b5cd 2005-07-13 devnull .EE
486 3aec33fe 2005-07-18 devnull .SH SOURCE
487 3aec33fe 2005-07-18 devnull .B \*9/src/cmd/venti/srv
488 bdf5b5cd 2005-07-13 devnull .SH "SEE ALSO"
489 bdf5b5cd 2005-07-13 devnull .IR venti (1),
490 bdf5b5cd 2005-07-13 devnull .IR venti (3),
491 bdf5b5cd 2005-07-13 devnull .IR venti (7),
492 bdf5b5cd 2005-07-13 devnull .IR venti-backup (8)
493 bdf5b5cd 2005-07-13 devnull .IR venti-fmt (8)
494 bdf5b5cd 2005-07-13 devnull .br
495 bdf5b5cd 2005-07-13 devnull Sean Quinlan and Sean Dorward,
496 bdf5b5cd 2005-07-13 devnull ``Venti: a new approach to archival storage'',
497 bdf5b5cd 2005-07-13 devnull .I "Usenix Conference on File and Storage Technologies" ,
498 bdf5b5cd 2005-07-13 devnull 2002.
499 bdf5b5cd 2005-07-13 devnull .SH BUGS
500 bdf5b5cd 2005-07-13 devnull Setting up a venti server is too complicated.
501 bdf5b5cd 2005-07-13 devnull .PP
502 bdf5b5cd 2005-07-13 devnull Venti should not require the user to decide how to
503 bdf5b5cd 2005-07-13 devnull partition its memory usage.
504 3aec33fe 2005-07-18 devnull .PP
505 3aec33fe 2005-07-18 devnull Users of shells other than
506 3aec33fe 2005-07-18 devnull .IR rc (1)
507 3aec33fe 2005-07-18 devnull will not be able to use the program names shown.
508 3aec33fe 2005-07-18 devnull One solution is to define
509 3aec33fe 2005-07-18 devnull .B "V=$PLAN9/bin/venti"
510 3aec33fe 2005-07-18 devnull and then substitute
511 3aec33fe 2005-07-18 devnull .B $V/
512 3aec33fe 2005-07-18 devnull for
513 3aec33fe 2005-07-18 devnull .B venti/
514 3aec33fe 2005-07-18 devnull in the paths above.