venti (p9p) linux server

draft: true

tags: technology tutorial

give actual instruction please for running venti on vultr x alpine?

1. Install Plan 9 from User Space, following the instructions here

select an existing volume or create a virtual device on zfs:

might be nicer if we use lvm which is more standard. i can instruct above to use lvm to partition the system disk. the lvm devices can be used to hold the index and bloom filter partitions on a fast SSD and the log can live on vultr block storage.

zfs create -V 100G rpool/fossil
ls -l /dev/zvol/rpool/fossil

The bloom filter should be sized so that nhash × nblock <= 0.7 × b, where nblock is the expected number of blocks stored on the server and b is the bitmap size in bits. The false positive rate of the bloom filter when sized this way is approximately 2–nblock. Nhash less than 10 are not very useful; nhash greater than 24 are probably a waste of memory.

log: 200G

index: 10G (5% of log data)

bloom filter: 4G (2% of log data?)

i'd like some kind of equation for provisioning these.

example config

index main
isect /tmp/disks/isect0
isect /tmp/disks/isect1
arenas /tmp/disks/arenas
bloom /tmp/disks/bloom
mem 10M
bcmem 20M
icmem 30M
% venti/fmtisect isect0. /tmp/disks/isect0
% venti/fmtisect isect1. /tmp/disks/isect1
% venti/fmtarenas arenas0. /tmp/disks/arenas &
% venti/fmtbloom /tmp/disks/bloom &
% wait
% venti/fmtindex venti.conf
% venti/venti
% hget http://$sysname/storage