Project

General

Profile

Keep-balance » History » Version 7

Tom Clegg, 03/16/2017 08:57 PM

1 6 Tom Clegg
h1. Keep-balance
2 1 Tom Clegg
3 6 Tom Clegg
Keep-balance enforces policies and generates reports about storage resource usage. It interacts with the [[Keep server]] and the metadata database (through the API server). Clients/users do not interact with keep-balance directly.
4 1 Tom Clegg
5 4 Tom Clegg
See also:
6
* [[Keep server]]
7
* [[Keep manifest format]]
8 6 Tom Clegg
* source:services/keep-balance
9 7 Tom Clegg
* http://doc.arvados.org/install/install-keep-balance.html
10 1 Tom Clegg
11 4 Tom Clegg
Responsibilities:
12 5 Tom Clegg
* Garbage collector: decide what is eligible for deletion (and some partial order of preference)
13
* Replication enforcer: copy and delete blocks in various backing stores to achieve desired replication level
14
* Rebalancer: move blocks to redistribute free space and reduce client probes
15 4 Tom Clegg
16 5 Tom Clegg
Example reports/queries:
17
* for managers: how much disk space is being conserved due to CAS
18
* for managers: how much disk space is occupied in a given backing store service
19
* for managers: how disk usage would be affected by modifying storage policy
20
* for managers: how much disk space+time is used (per user, group, node, disk)
21
* for users: when replication/policy specified for a collection is not currently satisfied (and why, for how long, etc) 
22
* for users: how much disk space is represented by a given set of collections
23
* for users: how much disk space can be made available by garbage collection
24
* for users: how soon they should expect their cached data to disappear
25
* for users: performance statistics (how fast should I expect my job to read data?)
26
* for ops: where each block was most recently read/written, in case data recovery is needed
27
* for ops: how unbalanced the backing stores are across the cluster
28
* for ops: activity level and performance statistics
29
* for ops: activity level vs. amount of space (how much of the data is being accessed by users?)
30
* for ops: disk performance/error/status trends (and SMART reports) to help identify bad hardware
31
* for ops: history of disk adds, removals, moves
32
33 4 Tom Clegg
Basic kinds of data in the index:
34
* Which blocks are used by which collections (and which collections are valued by which users/groups)
35 5 Tom Clegg
* Which blocks are stored in which services (local Keep, remote Keep, other storage service)
36 4 Tom Clegg
* Which blocks are stored on which disks
37
* Which disks are attached to which nodes
38 5 Tom Clegg
* Aggregate read/write activity per block and per disk (where applicable, e.g., block stored in local Keep)
39 4 Tom Clegg
* Exceptions (checksum mismatch, IO error)
40
41
h2. Implementation considerations
42
43
Overview
44 5 Tom Clegg
* REST service for queries
45
** All requests require authentication. Token validity verified against Metadata server, and cached locally.
46
* Subscribes to system event log
47
* Connects to metadata server (has a system_user token), at least periodically, to ensure eventual consistency with metadata DB's idea of what data is important
48
* Persistent database
49
* In-memory database
50 4 Tom Clegg
51
Distributed/asynchronous
52
* Easy to run multiple keep index services.
53
* Most features do not need synchronous operation / real time data.
54
* Features that move or delete data should be tied to a single "primary" indexing service (failover event likely requires resetting some state).
55
* Substantial disagreement between multiple index services should be easy to flag on admin dashboard.