Tip

This is the documentation for the 21.07 version. Looking for the documentation of the latest version? Have a look here.

Statistics Segment

These commands configure the statistics segment parameters for the dataplane. This feature enables local access to dataplane statistics via shared memory.

See also

For more information on how to make use of this feature, see the VPP documentation for the example stat_client.

dataplane statseg heap-size <heap-size>[kKmMgG]

Size of shared memory allocation for stats segment, in bytes. This value can be suffixed with K (kilobytes), M (megabytes), or G (gigabytes) in upper or lowercase. Default value is 96M.

Note

This value may need to be increased to accommodate large amounts of routes in routing tables. The default value of 96M can safely accommodate approximately one million routes.

The statistics segment is used to maintain counters for routes, and when multiple worker threads are used, these counters are maintained in each thread. Each counter consumes 16 bytes, and there are two counters for each route. When computing these memory requirements, also keep in mind that the main thread counts in addition to each worker thread. For example, with two worker threads, there are actually three threads total.

The total memory required for route counters alone will be: <routes> * <threads> * 2 counters * 16 Bytes. Additionally, when new memory is being allocated, it must be in a contiguous segment approximately 1.5x the size calculated above. This can negatively impact memory allocation in cases where usage of the statistics segment has become fragmented after repeated allocations and reallocations. All these factors combined mean that when using a large number of routes with multiple worker threads, this value should be given a generous increase over expected normal values.

The dataplane may crash and state that it is out of memory if this value is set too low.

dataplane statseg per-node-counters enable

Enables per-graph-node performance statistics.

dataplane statseg socket-name <socket-name>

Absolute path to UNIX domain socket for stats segment. The default path is /run/vpp/stats.sock.

Logging

The following commands fine-tune how logging is performed by the dataplane.

dataplane logging default-log-level (alert|crit|debug|disabled|emerg|err|info|notice|warn)

This command defines the level of logging to include in the VPP log, which is an in-memory circular log buffer, or disabled to disable the log buffer. (Default: notice)

dataplane logging default-syslog-log-level (alert|crit|debug|disabled|emerg|err|info|notice|warn)

This command defines the level of logging to include when logging through syslog, or disabled to disable syslog logging. (Default: warning)

dataplane logging size <message-count>

Size of the messages queue for the in-memory circular log buffer. (Default: 512 messages)

dataplane logging unthrottle-time <seconds>

The amount of time between the last and current log messages, in seconds. If messages repeat more often, they are replaced with --- message(s) throttled ---. (Default: 3 seconds)