balance.c File Reference
#include "magma.h"Defines | |
| #define | INCLUDE_FLARE_INTERNALS |
Functions | |
| uint64_t | actual_load (magma_node_t *node) |
| uint64_t | load_on_node (magma_node_t *node) |
| void | manage_underload () |
| void | manage_overload () |
| void * | balance (void *data) |
Define Documentation
| #define INCLUDE_FLARE_INTERNALS |
Function Documentation
| uint64_t actual_load | ( | magma_node_t * | node | ) |
Returns the actual load of node *node using logaritmic scale.
- Parameters:
-
node the node to be measured
- Returns:
- node load as unsigned 64bit integer
- Todo:
- Actually unused. Replaced by load_on_node() ??
| void* balance | ( | void * | data | ) |
This is the balancer thread function which periodically checks for lava network overall load and perform balancing on sibling vulcanos.
- Parameters:
-
data magma_node_t structure rappresenting this node, declared (void *) according to pthread specification
- Returns:
- NULL (result can be safely ignored)
| uint64_t load_on_node | ( | magma_node_t * | node | ) |
Calculate current load of given node using logarithmic scale.
- Parameters:
-
node node to be calculated
- Returns:
- load as unsigned 64bit integer
| void manage_overload | ( | ) |
manages overload. If a node has heavier load than sibling nodes can request to give some keys to leverage load profile.
- Todo:
- Still to be written.
| void manage_underload | ( | ) |
manages an underload situation. If a node has lighter load than sibling nodes can explicitly request some keys to leverage the load profile.
This file last modified Wednesday, 09-Jan-2008 20:02:19 CET