changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > ventivac / man/8/ventisrv

changeset 111: 8fd6132b12be
parent: aadfbb30227e
child: acd72dbb39ff
author: Mechiel Lukkien <>
date: Fri, 17 Aug 2007 17:27:01 +0200
permissions: -rw-r--r--
description: some more about ventisrv design. remove unused ticker function. mention that there is no auth or raw disk support in manual page.
3 ventisrv \- venti server
5 .B ventisrv
6 [
7 .B -DcCqv
8 ] [
9 .B -i
10 .I index
11 ] [
12 .B -d
13 .I data
14 ] [
15 .B -s
16 .I statsfile
17 ] [
18 .B -r
19 .I addr
20 ] [
21 .B -w
22 .I addr
23 ]
24 .I maxdatasize
25 .I meanblocksize
27 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
28 .I score
29 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.
30 .PP
31 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.
32 .I Maxdatasize
33 is the maximum file size of the data file. Or, the last addressable block in the data file.
34 .I Meanblocksize
35 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.
36 .PP
37 To determine the memory requirements for a ventisrv configuration, specify the
38 .B -q
39 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.
40 .PP
41 Data blocks are stored in a normal, append-only file, specified with
42 .BR -d .
43 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
44 .BR -i ,
45 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). 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).
46 .PP
47 .TP
48 .B -c
49 Compress blocks before writing. Implies
50 .BR -C .
51 Ventisrv does not compress by default because compression is slow.
52 .TP
53 .B -C
54 Make ventisrv accept compressed blocks in the data file, default is to not accept them. Implied by
55 .BR -c .
56 This uses an additional bit of memory per score.
57 .TP
58 .B -q
59 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.
60 .TP
61 .BI -i " index"
62 File to use as index file. Default is
63 .IR index .
64 .TP
65 .BI -d " data"
66 File to use as data file. Default is
67 .IR data .
68 .TP
69 .BI -s " statsfile"
70 File to serve statistics on. Default is
71 .IR /chan/ventisrvstats .
72 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.
73 .TP
74 .B -D
75 Print (lots of) debug messages. Prints multiple lines per venti transaction.
76 .TP
77 .B -v
78 Be more verbose, especially at startup and when errors occur.
79 .TP
80 .BI -r " address"
81 Listen for read-only connections on
82 .IR address .
83 .TP
84 .BI -w " address"
85 Listen for connections on
86 .IR address .
87 If neither
88 .B -r
89 nor
90 .B -w
91 is specified, a default of
92 .I "-w net!*!venti"
93 is assumed.
94 .PP
95 Note that
96 .I ventisrv
97 does not authenticate connections and cannot use raw disks for storage.
99 .B /appl/cmd/ventisrv.b
101 .IR venti (1),
102 .IR vacget (1),
103 .IR vcache (1),
104 .IR venti (2),
105 .IR vacfs (4)
106 .SH BUGS
107 There are no tools for data recovery or consistency checking of the data file.
108 .br
109 The index file can grow quite large, causing slow startup.
110 .br
111 Memory usage is calculated based on averages and guesses about dis memory needs.