Skip to main content

Configuration

The VILLASnode configuration consists of a a single file.

For a collection of example configuration files see: https://github.com/VILLASframework/node/tree/master/etc/.

File format

VILLASnode currently supports two config file formats:

Note: Consider using the villas conf2json command to migrate your old configurations to JSON.

Top-level Structure

At the top level, the configuration file consists of these sections:

OpenAPI / JSON Schema Specification

There exists a formal description of the configuration file as a JSON Schema / OpenAPI 3.0 specification.

The remaining part of this subsection shows a HTML version of this schema rendered by Redoc:

required
object (Node list)

A list of nodes to/from which this instance sends/receives sample data.

Array of objects (Path list)
Default: []

A list of uni-directional paths which connect the nodes defined in the nodes list.

object (http)
object (Logging configuration)
hugepages
integer (Number of reserved hugepages)
Default: 100

The number of hugepages which will be reservered by the system.

See: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt

A value of zero will disable the use of huge pages.

stats
number (Statistics interval)
Default: 1

Specifies the rate at which statistics about the active paths will be periodically printed to the screen.

Setting this value to 5, will print 5 lines per second.

A line includes information such as:

  • Source and Destination of path
  • Messages received
  • Messages sent
  • Messages dropped
affinity
integer (Task/Process affinity mask)
Default: 0

Restricts the exeuction of the daemon to certain CPU cores. This technique, also called 'pinning', improves the determinism of the server by isolating the daemon processes on exclusive cores.

A value of 0 will not change the affinity of the process.

priority
integer
Default: 0

Adjusts the scheduling priority of the deamon processes. By default, the daemon uses a real-time optimized FIFO scheduling algorithm.

A value of 0 will not change the priority of the process.

idle_stop
boolean
Default: true
uuid
string <uuid> (Super-node UUID)
Default: "randomly generated"

Each VILLASnode instance is identified by a globally unique indentifier / UUID.

This UUID can be queried by the API.

If the setting is not provided, a UUID will be generated by hashing the active VILLASnode configuration. This ensures that restarting the VILLASnode instance with the identical configuration will yield always the same UUID.

seed
integer (Random number generator seed)
Default: 0

The seed for the random number generator used by the VILLASnode instance.

If the setting is not provided, a random seed of 0 will be used.

{
  • "nodes": {
    },
  • "paths": [ ],
  • "http": {
    },
  • "logging": {
    },
  • "hugepages": 100,
  • "stats": 1,
  • "affinity": 0,
  • "priority": 0,
  • "idle_stop": true,
  • "uuid": "randomly generated",
  • "seed": 0
}

Example

VILLASnode comes with a lot of existing configurations which can be used for inspiration: https://github.com/VILLASframework/node/tree/master/etc/examples

# Global configuration settings go here
stats = 2

# Webserver / API config
http = {
port = 8081
}

# Logging
logging = {
level = "debug
}

# Node definitions
nodes = {
test_node = {
in = {
signals = {
count = 12
type = "float"
}
}
}
}

# Path Mapping
paths = (
{
in = "test_node",
out = "test_node"
}
)