Re: [ovs-dev] [PATCH v2 6/6] Documentation: Update DPDK doc with Keepalive feature.

2017-04-27 Thread Bodireddy, Bhanuprakash
>>
>>    Compute NodeControllerCompute Node
>>
>> Collectd  <--> Ceilometer <>   Collectd
>>
>> OvS DPDK   OvS DPDK
>>
>>    +-+
>>    | VM  |
>>    +--+--+
>>   \---+---/
>>   |
>>    +--+---+   ++--+ +--+---+
>>    | OVS  |-> |dpdkevents plugin  | --> |   collectd   |
>>    +--+---+   ++--+ +--+---+
>>    |
>>  +--+-+ +---++ |
>>  | Ceilometer | <-- | collectd ceilometer plugin |  <---
>>  +--+-+ +---++
>
>You see all of this, right here ^^^ ? That's excellent. Put *that* in a doc. I
>would suggest 'Documentation/topics/dpdk/keepalive.rst'. You could include
>a reference to the below doc using something like the
>following:
>
>For information on how to use the keepalive feature, refer to
>:ref:`the HOWTO `.

I have plans to write a separate document with detail explanation on how this 
feature should be used with OpenStack. That also includes how this is 
integrated with ceilometer. But I will do the document as a separate patch once 
this feature gets accepted. 

>
>The only changes I'd make is to indent the diagram by four spaces and
>precede it with by '::' (to format as a literal block), and change the OVSDB
>settings overview piece to use definitions lists, which look like
>this:
>
>``keepalive=true``
>
>  Enable the keepalive feature. Defaults to false (disabled).
>
>This could be done as a separate patch unless you need to respin this series.

I will take this suggestion and do this if I have to send v3.

>
>> 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
>> 
>> ---
>>  Documentation/howto/dpdk.rst | 93
>> 
>>  1 file changed, 93 insertions(+)
>>
>> diff --git a/Documentation/howto/dpdk.rst
>> b/Documentation/howto/dpdk.rst index dc63f7d..e482166 100644
>> --- a/Documentation/howto/dpdk.rst
>> +++ b/Documentation/howto/dpdk.rst
>> @@ -400,6 +400,99 @@ If ``N`` is set to 1, an insertion will be
>> performed for every flow. If set to
>>
>>  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::
>
>s/OvS/OVS/
>s/KeepAlive(KA)/KeepAlive (KA)/
>
Ok.

>> +
>> +$ ovs-vsctl --no-wait set Open_vSwitch .
>> other_config: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="50"
>> +
>> +The events comprise of core states and the last seen timestamps. The
>> events
>> +are written in to shared memory region
>> ``/dev/shm/dpdk_keepalive_shm_name``.
>> +To write in to a different shared memory region, run::
>> +
>> +$ ovs-vsctl --no-wait set Open_vSwitch . \
>> +other_config:keepalive-shm-name="/"
>> +
>
>nit: I assume the '/' before '' was a typo. Drop that, if
>so.
It's not a typo. It is expected.

>
>> +The events in the shared memory block can be read by external
>> monitoring
>> +framework (or) applications. `collectd `__
>> has built-in
>> +support for DPDK and provides a `dpdkevents` plugin that can be
>> enabled to
>> +relay the datapath core status to OpenStack service `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
>> +
>
>I should have called this out first time, but I'm not sure we want to duplicate
>collectd's installation procedure as these things can change.
>We might be better of linking to installation docs. _However_, we do this
>already for DPDK so there is precedent. If you think we should keep them
>(and you likely do), I'd be happy to simply include a link to the installation 
>docs
>like so:

While I agree to this, collectd documentation is vast and users may be lost 
reading the installation.
I would mention the basic steps here and can point a link to the documentation 
as suggested so that they can refer to the documentation for any advanced 
debugging.

>
>

Re: [ovs-dev] [PATCH v2 6/6] Documentation: Update DPDK doc with Keepalive feature.

2017-04-27 Thread Stephen Finucane
On Wed, 2017-04-26 at 23:59 +0100, Bhanuprakash Bodireddy wrote:
> OvS DPDK 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 the failure shall be
> detected & reported to higher level fault management
> systems/frameworks.
> 
> The implementation uses POSIX shared memory object for storing the
> events that will be periodically read by monitoring framework. keep-
> alive feature can be enabled through below OVSDB settings.
> 
> keepalive=true
>    - Keepalive feature is disabled by default.
> 
> keepalive-interval="50"
>    - Timer interval in milliseconds for monitoring the packet
>  processing cores.
> 
> keepalive-shm-name="/dpdk_keepalive_shm_name"
>    - Shared memory block name where the events shall be updated.
> 
> 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 shared memory region.
> 
> An external monitoring framework like collectd(with dpdk plugin
> support) can read the core status updates from shared memory. When
> the core state is updated, the collectd shall relay the status to
> ceilometer service running in the controller. Below is the high level
> overview of deployment model.
> 
>    Compute NodeControllerCompute Node
> 
> Collectd  <--> Ceilometer <>   Collectd
> 
> OvS DPDK   OvS DPDK
> 
>    +-+
>    | VM  |
>    +--+--+
>   \---+---/
>   |
>    +--+---+   ++--+ +--+---+
>    | OVS  |-> |dpdkevents plugin  | --> |   collectd   |
>    +--+---+   ++--+ +--+---+
>    |
>  +--+-+ +---++ |
>  | Ceilometer | <-- | collectd ceilometer plugin |  <---
>  +--+-+ +---++

You see all of this, right here ^^^ ? That's excellent. Put *that* in a
doc. I would suggest 'Documentation/topics/dpdk/keepalive.rst'. You
could include a reference to the below doc using something like the
following:

For information on how to use the keepalive feature, refer to
:ref:`the HOWTO `.

The only changes I'd make is to indent the diagram by four spaces and
precede it with by '::' (to format as a literal block), and change the
OVSDB settings overview piece to use definitions lists, which look like
this:

``keepalive=true``

  Enable the keepalive feature. Defaults to false (disabled).

This could be done as a separate patch unless you need to respin this
series.

> 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
> 
> ---
>  Documentation/howto/dpdk.rst | 93
> 
>  1 file changed, 93 insertions(+)
> 
> diff --git a/Documentation/howto/dpdk.rst
> b/Documentation/howto/dpdk.rst
> index dc63f7d..e482166 100644
> --- a/Documentation/howto/dpdk.rst
> +++ b/Documentation/howto/dpdk.rst
> @@ -400,6 +400,99 @@ If ``N`` is set to 1, an insertion will be
> performed for every flow. If set to
>  
>  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::

s/OvS/OVS/
s/KeepAlive(KA)/KeepAlive (KA)/

> +
> +$ ovs-vsctl --no-wait set Open_vSwitch .
> other_config: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="50"
> +
> +The events comprise of core states and the last seen timestamps. The
> events
> +are written in to shared memory region
> ``/dev/shm/dpdk_keepalive_shm_name``.
> +To write in to a different shared memory region, run::
> +
> +$ ovs-vsctl --no-wait set Open_vSwitch . \
> +other_config:keepalive-shm-name="/"
> +

nit: I assume the '/' before '' was a typo. Drop
that, if so.

> +The events in the shared memory block can be read by external
> monitoring
> +framework (or) applications. `collectd `__
> has built-in
> +support for DPDK and provides a `dpdkevents` plugin that can be
> enabled to
> +relay the datapath core status to OpenStack service `Ceilometer
> +`__.
> +
> +To install and configure `collectd`, run::
> +