[ovs-dev] [PATCH v3 19/19] Documentation: Update DPDK doc with Keepalive feature.

Bhanuprakash Bodireddy bhanuprakash.bodireddy at intel.com
Fri Aug 4 08:08:06 UTC 2017


Keepalive feature is aimed at achieving Fastpath Service Assurance
in OVS-DPDK deployments. It adds support for monitoring the packet
processing cores(PMD thread cores) by dispatching heartbeats at regular
intervals. Incase of heartbeat misses additional health checks are
enabled on the PMD thread to detect the failure and the same shall be
reported to higher level fault management systems/frameworks.

The implementation uses OVSDB for reporting the datapath status and the
health of the PMD threads. Any external monitoring application can read
the status from OVSDB at regular intervals (or) subscribe to the updates
in OVSDB so that they get notified when the changes happen on OVSDB.

keepalive info struct is created and initialized for storing the
status of the PMD threads. This is initialized by main thread(vswitchd)
as part of init process and will be periodically updated by 'keepalive'
thread. keepalive feature can be enabled through below OVSDB settings.

    enable-keepalive=true
      - Keepalive feature is disabled by default.

    keepalive-interval="5000"
      - Timer interval in milliseconds for monitoring the packet
        processing cores.

When KA is enabled, 'ovs-keepalive' thread shall be spawned that wakes
up at regular intervals to update the timestamp and status of pmd cores
in keepalive info struct. This information shall be read by vswitchd thread
and written in to 'keepalive' column of Open_vSwitch table in OVSDB.

An external monitoring framework like collectd with ovs events support
can read (or) subscribe to the datapath status changes in ovsdb. When the state
is updated, the collectd shall be notified and will eventually relay the status
to ceilometer service running in the controller. Below is the high level
overview of deployment model.

        Compute Node            Controller            Compute Node

        Collectd  <----------> Ceilometer <-------->   Collectd

        OvS DPDK                                       OvS DPDK

        +-----+
        | VM  |
        +--+--+
       \---+---/
           |
        +--+---+       +------------+----------+     +------+-------+
        | OVS  |-----> |   ovsevents plugin    | --> |   collectd   |
        +--+---+       +------------+----------+     +------+-------+

        +------+-----+     +---------------+------------+     |
        | Ceilometer | <-- | collectd ceilometer plugin |  <---
        +------+-----+     +---------------+------------+

Performance impact
------------------
No noticeable performance or latency impact is observed with
KA feature enabled. The tests were run with 100ms KA interval
and latency is (Min:134,710ns, Avg:173,005ns, Max:1,504,670ns)
for Phy2Phy loopback test case with 100 unique streams.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy at intel.com>
---
 Documentation/howto/dpdk.rst | 90 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)

diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
index d7f6610..1ce49ba 100644
--- a/Documentation/howto/dpdk.rst
+++ b/Documentation/howto/dpdk.rst
@@ -413,6 +413,96 @@ For certain traffic profiles with many parallel flows, it's recommended to set
 
 For more information on the EMC refer to :doc:`/intro/install/dpdk` .
 
+.. _dpdk_keepalive:
+
+KeepAlive
+---------
+
+OvS KeepAlive(KA) feature is disabled by default. To enable KA feature::
+
+    $ ovs-vsctl --no-wait set Open_vSwitch . other_config:enable-keepalive=true
+
+The default timer interval for monitoring packet processing cores is 100ms.
+To set a different timer value, run::
+
+    $ ovs-vsctl --no-wait set Open_vSwitch . \
+        other_config:keepalive-interval="5000"
+
+The events comprise of core states and the last seen timestamps. The events
+are written in to keepalive info structure periodically by keepalive thread.
+
+The events in the keepalive info struct are retrieved by main(vswitchd) thread
+and updated in to keepalive column of Open_vSwitch table in OVSDB. Any external
+monitoring application can read the status from OVSDB at intervals or subscribe
+to the updates so that they get notified when the changes happen on OVSDB.
+`collectd <https://collectd.org/>`__ has built-in support for DPDK and provides
+a `ovs_events` and `ovs_stats` plugin that can be enabled to relay the datapath
+status and the PMD status to OpenStack service `Ceilometer
+<https://docs.openstack.org/developer/ceilometer/>`__.
+
+To install and configure `collectd`, run::
+
+    # Clone collectd from Git repository
+    $ git clone https://github.com/collectd/collectd.git
+
+    # configure and install collectd
+    $ cd collectd
+    $ ./build.sh
+    $ ./configure --enable-syslog --enable-logfile --with-libdpdk=/usr
+    $ make
+    $ make install
+
+`collectd` is installed in ``/opt/collectd`` by default. Edit the configuration
+file in ``/opt/collectd/etc/collectd.conf`` to enable logfile, dpdkevents
+and csv plugin::
+
+   LoadPlugin logfile
+   <Plugin logfile>
+       LogLevel debug
+       File "/var/log/collectd/collectd.log"
+       Timestamp true
+       PrintSeverity false
+   </Plugin>
+
+   <Plugin syslog>
+       LogLevel info
+   </Plugin>
+
+Enable `ovs_events` plugin and update the plugindetails as below::
+
+   LoadPlugin ovs_events
+
+   <Plugin ovs_events>
+     Port "6640"
+     Address "127.0.0.1"
+     Socket "/usr/local/var/run/openvswitch/db.sock"
+     SendNotification true
+     DispatchValues false
+   </Plugin>
+
+Enable `ovs_stats` plugin and update the plugindetails as below::
+
+   LoadPlugin ovs_stats
+
+   <Plugin ovs_stats>
+     Port "6640"
+     Address "127.0.0.1"
+     Socket "/usr/local/var/run/openvswitch/db.sock"
+     Bridges "br0"
+   </Plugin>
+
+Enable ``csv`` plugin as below::
+
+   LoadPlugin csv
+
+   <Plugin csv>
+       DataDir "/var/log/collectd/csv"
+       StoreRates false
+   </Plugin>
+
+With csv plugin enabled, *meter* or *gauge* file is created and timestamp
+and core status gets updated which are sent to ceilometer service.
+
 .. _dpdk-ovs-in-guest:
 
 OVS with DPDK Inside VMs
-- 
2.4.11



More information about the dev mailing list