Search This Blog

2012-11-01

Testing, Monitoring, and Improving Network Performance

This is more of a personal blog in order to remind me how to go about testing interface traffic rates and what to look for.

Using Ixia Instructions

  1. Grab your interfaces from ixia. If your have setup user accounts on ixia make sure you login so that you don't stomp over other peoples profiles.
    Multiuser > Login
    Type your username
  2. Find your ports on the chassis and take ownership
    Right click Port# and click "Take Ownership"
  3. Each interface will have packet streams that you'll want to configure
  4. If there are packet streams currently setup for the port you took ownership for you can right click on the stream and click "delete"
  5. Alt+S for a new stream
    1. Define how much traffic you want to send. For example you can pick a line rate using the scroll bar or choose a percentage of the max line rate.
    2. Configure your stream control (How you want to send your streams)
      1. Double click the stream > Stream Control
      2. You can also configure traffic sending amount here as well as other specific information regarding packets and gaps
      3. If you're troubleshooting packet loss vs. packet rate it might be a good idea to count the amount of packets. This can be done using the "Return to ID for Count" Setting under Stream Control tab.
      4. You can also choose how many packets you want to burst as well as how many of those bursts you want to send, and gaps between those streams.
    3. Setup your packet streams for each port ensuring that source and destination MAC addresses match.
      Double click the stream > Frame Data/DA/SA > Ensure that your destination address is the source address of your other port and vice versa
    4. Configure frame size:
      Double click the stream > Frame Data > Fixed > Change "Size" box to however big you want your frame size to be
    5. Pick your protocols
      Double click the stream > Frame Data/Protocols > (I usually select Ethernet II, IPv4, and TCP/IP just to get some basic data in our frame to represent actual traffic)
    6. Ensure you setup both sides of the Packet Stream
  6. In the left panel. Open up the "Global Views" dropdown > Statistics Views > New
    1. Add your ports to the statistics view (using the double arrows) to see packet statistics and to start sending traffic
    2. Statistics view will popup
      Note: you can switch to and from statistics view using "Ctrl+Tab"
  7. Clear current statistics on the port
    1. On the menu bar > statistics > Clear All Statistics
  8. Start your traffic
    1. On the menu bar > transmit > start traffic
Notes on Monitoring Traffic:
  • Frame Size plays a big role in how many packets your machine will be able to handle.
    • Small packet sizes (ex. 64 bytes) will take a lot of resources to process headers and there will be many more of them in a given time

Setting up a Bridge on FreeBSD to test Network throughput on a device.

  1. Load the kernel modules for bridging
    kldload bridge
    kldload if_bridge
  2. Configure the bridged interface to bond the two interfaces you will be passing traffic between
    ifconfig bridge0 create
    ifconfig bridge0 addm em2 addm em3 up
  3. I don't know if this is correct but you may need to add a value to sysctl as well to enable forwarding even if the destination MAC is not your machine:
    sysctl net.inet.ip.forwarding=1

Monitoring your Traffic

  1. Measure every part of the connection.
  2. Wherever you see packet drops it is likely the device prior to where you are seeing the drops that is actually dropping the packets.
  3. Monitoring switches is as easy as showing the interface, *nix boxes you can use netstat, vmware requires you to use
    esxtop then press 'n'
    to get to the network statistics for each vmnic or virtual interface
  4. Ensure you are not monitoring using tcpdump as that causes network overhead use the following command instead:
    netstat -dI (interface_name) -w(wait time in seconds)
    The above will show you interface drops (-d) for an interval in seconds (-w)

Improving Traffic Rates

Once I find out all of the factors involved in slow vs fast traffic rates I will post the details here.

Some of my guesses:

  • Increase processing power of packets
  • Increase packet size
  • Ensure you have appropriate NIC drivers for hardware and hosting software
  • Decrease time between sending packets
    • Send more packets in a shorter period of time

Reduce Traffic Dropping

Once I find out all of the factors involved in slow vs fast traffic rates I will post the details here.

Some of my guesses:
  • Increase packet buffer size (to a point) if your buffers are always too big they will just keep growing and cause a lot of latency
  • Increase time between sent/received packets so the host devices has time to process the packets
    • Send less packets in a shorter period of time

No comments:

Post a Comment