changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > ventivac / man/8/ventisrv

changeset 129: 636d77883598
parent: acd72dbb39ff
author: Mechiel Lukkien <>
date: Mon, 20 Aug 2007 14:24:44 +0200
permissions: -rw-r--r--
description: add option -I indexoffset to ventisrv. this allows it to start verifying the index file at the given offset. can be used to make it find and diagnose errors in the index/data file.
3 ventisrv \- venti server
5 .B ventisrv
6 [
7 .B -DcCqv
8 ] [
9 .B -I
10 .I indexoffset
11 ] [
12 .B -i
13 .I index
14 ] [
15 .B -d
16 .I data
17 ] [
18 .B -s
19 .I statsfile
20 ] [
21 .B -r
22 .I addr
23 ] [
24 .B -w
25 .I addr
26 ]
27 .I maxdatasize
28 .I meanblocksize
30 Ventisrv is a venti server that keeps scores partially in memory for fast lookups. A venti server is a write-once store for data blocks. The address of a block is the SHA-1
31 .I score
32 of that block along with a user-specified type. Using the score as address has two interesting properties. First, the address of the data can be used to verify the data are equal to those requested (this also means data "at" an address cannot be overwritten). Second, multiple writes of the same data can be detected by checking if the score (address) is already present; the data only has to be stored once. Since venti does not allow removal of blocks, a venti server can be used as permanent archival storage server.
33 .PP
34 The scores of the blocks stored in the venti server are kept in memory only partially. When a request for a block comes in, all partial matches are determined, each specifying a block address in the data file. The block for each match is read from the data file and returned if the score in the block header is equal to the requested score. The number of bits kept in memory is the minimum number of bits required for a high probability (0.999) of resulting in a single match if the score is present. The required number of bits is determined from the arguments passed at startup.
35 .I Maxdatasize
36 is the maximum file size of the data file. Or, the last addressable block in the data file.
37 .I Meanblocksize
38 is the (expected) mean blocksize. These values are used to determine the number of storable blocks from which the amount of bits for the score is deduced. Note that the index file stores a fixed number of score bytes, so a ventisrv can be restarted with other values.
39 .PP
40 To determine the memory requirements for a ventisrv configuration, specify the
41 .B -q
42 option. It quits after initialisation and enables verbose output, before reading the index file, and thus prints the memory necessary for the configuration. If the system (e.g. emu) has too little heap memory available, a warning is printed.
43 .PP
44 Data blocks are stored in a normal, append-only file, specified with
45 .BR -d .
46 The blocks are prepended with a header that holds the size, score and type of the block, and the starting time of the connection that wrote the block. The index file is also a normal, append-only file, specified with
47 .BR -i ,
48 that only has headers: a part of the score, type and offset of the block header in the data file. At startup, the blocks for the last 128 headers in the index file are verified (the (partial) scores in the headers and actual scores are checked). With
49 .B -I
50 the byte offset in the index file to start verifying at can be set, it should be a multiple of 15, the index header size.
51 Missing headers are added from the data file to the index file if necessary. Thus, starting ventisrv after truncating the index file will regerenate it from the data file. Then the index file is read into memory (using only the minimum required bits).
52 .PP
53 .TP
54 .B -c
55 Compress blocks before writing. Implies
56 .BR -C .
57 Ventisrv does not compress by default because compression is slow.
58 .TP
59 .B -C
60 Make ventisrv accept compressed blocks in the data file, default is to not accept them. Implied by
61 .BR -c .
62 This uses an additional bit of memory per score.
63 .TP
64 .B -q
65 Quit just before reading the index and data files at startup. This is useful for learning how much memory is needed for the specified data file size and mean block size configuration.
66 .TP
67 .BI -I " indexoffset"
68 Offset in the index file to start verifying headers with the data file. Must be a multiple of 15, the index header size. With this option ventisrv can be used as a diagnostics tool for the index and data file.
69 .TP
70 .BI -i " index"
71 File to use as index file. Default is
72 .IR index .
73 .TP
74 .BI -d " data"
75 File to use as data file. Default is
76 .IR data .
77 .TP
78 .BI -s " statsfile"
79 File to serve statistics on. Default is
80 .IR /chan/ventisrvstats .
81 Each line starts with a space-padded 14 byte number followed by a space and a textual description. The last line is empty unless a write error has occurred, in which it contains the error message.
82 .TP
83 .B -D
84 Print (lots of) debug messages. Prints multiple lines per venti transaction.
85 .TP
86 .B -v
87 Be more verbose, especially at startup and when errors occur.
88 .TP
89 .BI -r " address"
90 Listen for read-only connections on
91 .IR address .
92 .TP
93 .BI -w " address"
94 Listen for connections on
95 .IR address .
96 If neither
97 .B -r
98 nor
99 .B -w
100 is specified, a default of
101 .I "-w net!*!venti"
102 is assumed.
103 .PP
104 Note that
105 .I ventisrv
106 does not authenticate connections and cannot use raw disks for storage.
108 .B /appl/cmd/ventisrv.b
110 .IR venti (1),
111 .IR vacget (1),
112 .IR vcache (1),
113 .IR venti (2),
114 .IR vacfs (4)
115 .SH BUGS
116 Bad data files have to be fixed manually, with diagostics from ventisrv.
117 .br
118 The index file can grow quite large, causing slow startup.
119 .br
120 Memory usage is calculated based on averages and guesses about dis memory needs.