Tuesday, September 15, 2020

Measuring packet drop rate in Mininet (SDN)



In order to measure the packet drop rate for TCP packets on mininet we don’t find such APIs to get these statistics. For example, if we sent more packets than the link’s bandwidth or the switch buffer size, some of the packets would be dropped, but we don’t get the statistics since the TCP is a reliable protocol and it will re-transmit the packet if it detects some packet has been dropped. Hence we don’t get the packet loss rate on the application view (iperf). 
To take it back to the application view, i.e. iperf, it makes more sense to talk about the “re-transmission rate” for TCP, while I searched through the link  https://www.reddit.com/r/networking/comments/3w2t8d/trying_to_understand_iperf3_logs/  i found that it suggested that IPERF3 will tell you the number of retransmitted packets (per interval, and total), but it does not show the total number of packets transmitted and received, but only bytes. Since, Iperf3 gets the re transmission information from the kernel via the function getsockopt so when the third parameter is “TCP_INFO”, kernel will return some metadata of the specific TCP connection which include the re transmission. SO we night use the TCP_INFO field to get the statistics.The code as follows:
#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>
#include <netinet/in.h>
#include <errno.h>

#include "iperf.h"
#include "iperf_api.h"
#include "iperf_locale.h"

/*************************************************************/
int
has_tcpinfo(void)
{
#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)) \
 && defined(TCP_INFO)
    return 1;
#else
    return 0;
#endif
}

/*************************************************************/
int
has_tcpinfo_retransmits(void)
{
#if defined(linux) && defined(TCP_MD5SIG)
    /* TCP_MD5SIG doesn't actually have anything to do with TCP
    ** retransmits, it just showed up in the same rev of the header
    ** file.  If it's present then struct tcp_info has the 
    ** tcpi_total_retrans field that we need; if not, not.
    */
    return 1;
#else
#if defined(__FreeBSD__) && __FreeBSD_version >= 600000
    return 1; /* Should work now */
#elif defined(__NetBSD__) && defined(TCP_INFO)
    return 1;
#else
    return 0;
#endif
#endif
}

/*************************************************************/
void
save_tcpinfo(struct iperf_stream *sp, struct iperf_interval_results *irp)
{
#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)) && \
 defined(TCP_INFO)
    socklen_t tcp_info_length = sizeof(struct tcp_info);

    if (getsockopt(sp->socket, IPPROTO_TCP, TCP_INFO, (void *)&irp->tcpInfo, &tcp_info_length) < 0)
 iperf_err(sp->test, "getsockopt - %s", strerror(errno));

    if (sp->test->debug) {
 printf("tcpi_snd_cwnd %u tcpi_snd_mss %u tcpi_rtt %u\n",
        irp->tcpInfo.tcpi_snd_cwnd, irp->tcpInfo.tcpi_snd_mss,
        irp->tcpInfo.tcpi_rtt);
    }

#endif
}

/*************************************************************/
long
get_total_retransmits(struct iperf_interval_results *irp)
{
#if defined(linux) && defined(TCP_MD5SIG)
    return irp->tcpInfo.tcpi_total_retrans;
#elif defined(__FreeBSD__) && __FreeBSD_version >= 600000
    return irp->tcpInfo.tcpi_snd_rexmitpack;
#elif defined(__NetBSD__) && defined(TCP_INFO)
    return irp->tcpInfo.tcpi_snd_rexmitpack;
#else
    return -1;
#endif
}

/*************************************************************/
/*
 * Return snd_cwnd in octets.
 */
long
get_snd_cwnd(struct iperf_interval_results *irp)
{
#if defined(linux) && defined(TCP_MD5SIG)
    return irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss;
#elif defined(__FreeBSD__) && __FreeBSD_version >= 600000
    return irp->tcpInfo.tcpi_snd_cwnd;
#elif defined(__NetBSD__) && defined(TCP_INFO)
    return irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss;
#else
    return -1;
#endif
}

/*************************************************************/
/*
 * Return rtt in usec.
 */
long
get_rtt(struct iperf_interval_results *irp)
{
#if defined(linux) && defined(TCP_MD5SIG)
    return irp->tcpInfo.tcpi_rtt;
#elif defined(__FreeBSD__) && __FreeBSD_version >= 600000
    return irp->tcpInfo.tcpi_rtt;
#elif defined(__NetBSD__) && defined(TCP_INFO)
    return irp->tcpInfo.tcpi_rtt;
#else
    return -1;
#endif
}

/*************************************************************/
/*
 * Return rttvar in usec.
 */
long
get_rttvar(struct iperf_interval_results *irp)
{
#if defined(linux) && defined(TCP_MD5SIG)
    return irp->tcpInfo.tcpi_rttvar;
#elif defined(__FreeBSD__) && __FreeBSD_version >= 600000
    return irp->tcpInfo.tcpi_rttvar;
#elif defined(__NetBSD__) && defined(TCP_INFO)
    return irp->tcpInfo.tcpi_rttvar;
#else
    return -1;
#endif
}

/*************************************************************/
/*
 * Return PMTU in bytes.
 */
long
get_pmtu(struct iperf_interval_results *irp)
{
#if defined(linux) && defined(TCP_MD5SIG)

Contextual Analysis in Talent Management


The use of contextual information which takes into account the holistic view of a worker is essential to foster a more engaged workforce and management team for the Company. Users expect the underlying data to give insight into the individual’s contributions and the overall impact to the company’s bottom line.
Application context passing to embedded reports for the application and the module to be specific is a unified approach for better information sharing within the Fusion Applications promoting equality of opportunity in the workplace. Contextual analysis provides immediately accessible and relevant contextualized reporting that can transform performance reviews across Organization. Organizations need to enable greater connectivity between the information in real-time reporting with other corporate information.
Questions employees care about most:
  • What and how should I develop to be more successful?
  • How am I doing? How do I fit into the bigger picture?
  • What is next step for me? What opportunities are available to re affirm strengths and align individual goals with purpose and direction.
Key result areas managers concern most:
  • Am I bringing the best of my direct reports?
  • Is my team engaged? Are we working towards vital priorities?
  • Ability to give feedback in the moment and surmount the limits to growth.
Problems organizational leaders face:
  • Adaptive challenges in talent development as well as culture change.
  • The gender imperative.
  • How work gets done and how performance is measured/rewarded.

Use of the simplest and most cost effective analytics will lead to a solid career conversation driving top performance.

  • Individual Potential to Improve and Grow
  • Long-term Goals Rating History
  • Sales Performance Goals
  • Pay for Performance Metric
  • Personal Qualities and Attributes

Analytics Maturity Framework to review the current state capabilities






  • Use the analytics maturity framework to drive interview questions
  • Identify the gaps in each of these areas and developed capabilities that will required for the future state
  • Use a simple evaluation scale to determine the current maturity level

Cost Comparison for Point-2-Point and Middle ware based integration



Point-to-point integration, also known as one-to-one integration is the simpler of the two integration models. Point-to-point integration is very tightly coupled and is used when a sender has to send a message to a single receiver (that is, a 1:1 relationship).
While adequate for simple integration, this model is quickly unmanageable for larger integration requirements because of the n(n-1) connections rule (also referred to as the n-squared problem).
As an example, assume that four different systems have to be integrated. This means that the total number of connections can be up to 12 (a bi-directional connection counts as two connections). This rarely happens in practice, but it does illustrate how quickly this integration model can become unmanageable with even a small number of systems. Hence, this model should be adopted when the number of systems that need to be adopted is fairly small.
Figure 1 illustrates how fast the number of connections can grow.



Figure 1  The n(n-1) rule for point-to-point integration
Another drawback of this model is that it’s fairly fragile. By its nature, point-to-point integration is used for synchronous communications. If the receiver is down, the entire system can fail (or at the very least, hang) because of the tight coupling between the sender and the receiver.
The tightly coupled nature of the point-to-point integration results in a ripple effect whenever there is a change or update in one system, thus impacting every other systems integrating with the system undergoing the change.
Following are the reasons why this model is harmful for infrastructure:
  • Exponential Increase in Complexity
  • Single Points Of Failure
  • No Course Of Action For Emergencies
  • Loss of Business Agility
  • Inflexible and Brittle
  • Expensive to maintain
  • Cannot implement new standards

Middle ware Integration

Middleware is application-independent software that provides services that mediate between applications. Middleware hides the complexities of the underlying operating system and network in order to facilitate the easy integration of new and legacy systems. This is a means for connecting clients to servers, clients to clients, and servers to servers without having to navigate through many operating systems, networks or resources server layers. There are two types of middleware, logical, that is related with how information moves through the organization and physical, that really moves the information and covers the technology used for this purpose.



P2P vs SOA Cost Comparison