<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Performance Test</TITLE
|
>Performance Test</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="Tests and Demonstrations"
|
TITLE="Tests and Demonstrations"
|
HREF="net-common-tests-and-demonstrations.html"><LINK
|
HREF="net-common-tests-and-demonstrations.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="Standalone Tests"
|
TITLE="Standalone Tests"
|
HREF="net-common-standalone-tests.html"><LINK
|
HREF="net-common-standalone-tests.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="Interactive Tests"
|
TITLE="Interactive Tests"
|
HREF="net-common-interactive-tests.html"></HEAD
|
HREF="net-common-interactive-tests.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="SECT1"
|
CLASS="SECT1"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="net-common-standalone-tests.html"
|
HREF="net-common-standalone-tests.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
>Chapter 36. Tests and Demonstrations</TD
|
>Chapter 36. Tests and Demonstrations</TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="net-common-interactive-tests.html"
|
HREF="net-common-interactive-tests.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><DIV
|
><DIV
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><H1
|
><H1
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><A
|
><A
|
NAME="NET-COMMON-PERFORMANCE-TEST">Performance Test</H1
|
NAME="NET-COMMON-PERFORMANCE-TEST">Performance Test</H1
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
><SPAN
|
><SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>tcp_echo</I
|
>tcp_echo</I
|
></SPAN
|
></SPAN
|
> - data forwarding program for performance test</PRE
|
> - data forwarding program for performance test</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
><B
|
><B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>tcp_echo</B
|
>tcp_echo</B
|
> is one
|
> is one
|
part of the standard performance test we use. The other parts are
|
part of the standard performance test we use. The other parts are
|
host programs <TT
|
host programs <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_source</TT
|
>tcp_source</TT
|
> and <TT
|
> and <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_sink</TT
|
>tcp_sink</TT
|
>.
|
>.
|
To make these (under LINUX) cd to the tests source directory in
|
To make these (under LINUX) cd to the tests source directory in
|
the eCos repository and type “<TT
|
the eCos repository and type “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>make -f make.linux</TT
|
>make -f make.linux</TT
|
>” -
|
>” -
|
this should build <TT
|
this should build <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_source</TT
|
>tcp_source</TT
|
> and <TT
|
> and <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_sink</TT
|
>tcp_sink</TT
|
>.</P
|
>.</P
|
><P
|
><P
|
>The LINUX program “<TT
|
>The LINUX program “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_source</TT
|
>tcp_source</TT
|
>” sends
|
>” sends
|
data to the target. On the target, “<TT
|
data to the target. On the target, “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_echo</TT
|
>tcp_echo</TT
|
>” sends
|
>” sends
|
it onwards to “<TT
|
it onwards to “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_sink</TT
|
>tcp_sink</TT
|
>” running
|
>” running
|
on LINUX. So the target must receive and send on all the data that <TT
|
on LINUX. So the target must receive and send on all the data that <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_source</TT
|
>tcp_source</TT
|
> sends
|
> sends
|
it; the time taken for this is measured and the data rate is calculated.</P
|
it; the time taken for this is measured and the data rate is calculated.</P
|
><P
|
><P
|
>To invoke the test, first start <TT
|
>To invoke the test, first start <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_echo</TT
|
>tcp_echo</TT
|
> on
|
> on
|
the target board and wait for it to become quiescent - it will report
|
the target board and wait for it to become quiescent - it will report
|
work to calibrate a CPU load which can be used to simulate real
|
work to calibrate a CPU load which can be used to simulate real
|
operating conditions for the stack.</P
|
operating conditions for the stack.</P
|
><P
|
><P
|
>Then on your LINUX machine, in one terminal window, invoke <TT
|
>Then on your LINUX machine, in one terminal window, invoke <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_sink</TT
|
>tcp_sink</TT
|
> giving
|
> giving
|
it the IP address (or hostname) of one interface of the target board.
|
it the IP address (or hostname) of one interface of the target board.
|
For example “<TT
|
For example “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_sink 10.130.39.66</TT
|
>tcp_sink 10.130.39.66</TT
|
>”.
|
>”.
|
<TT
|
<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_echo</TT
|
>tcp_echo</TT
|
> on the target
|
> on the target
|
will print something like “<TT
|
will print something like “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>SINK connection
|
>SINK connection
|
from 10.130.39.13:1143</TT
|
from 10.130.39.13:1143</TT
|
>” when <TT
|
>” when <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_sink</TT
|
>tcp_sink</TT
|
> is
|
> is
|
correctly invoked.</P
|
correctly invoked.</P
|
><P
|
><P
|
>Next, in another LINUX terminal window, invoke <TT
|
>Next, in another LINUX terminal window, invoke <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_source</TT
|
>tcp_source</TT
|
>,
|
>,
|
giving it the IP address (or hostname) of an interface of the target
|
giving it the IP address (or hostname) of an interface of the target
|
board, and optionally a background load to apply to the target while
|
board, and optionally a background load to apply to the target while
|
the test runs. For example, “<TT
|
the test runs. For example, “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_source
|
>tcp_source
|
194.130.39.66</TT
|
194.130.39.66</TT
|
>” to run the test with no
|
>” to run the test with no
|
additional target CPU load, or “<TT
|
additional target CPU load, or “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_source
|
>tcp_source
|
194.130.39.66 85</TT
|
194.130.39.66 85</TT
|
>” to load it up to 85% used.
|
>” to load it up to 85% used.
|
The target load must be a multiple of 5. <TT
|
The target load must be a multiple of 5. <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_echo</TT
|
>tcp_echo</TT
|
> on
|
> on
|
the target will print something like “<TT
|
the target will print something like “<TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>SOURCE
|
>SOURCE
|
connection from 194.130.39.13:1144</TT
|
connection from 194.130.39.13:1144</TT
|
>” when
|
>” when
|
tcp_source is correctly invoked.</P
|
tcp_source is correctly invoked.</P
|
><P
|
><P
|
>You can connect tcp_sink to one target interface
|
>You can connect tcp_sink to one target interface
|
and tcp_source to another, or both to the same interface.
|
and tcp_source to another, or both to the same interface.
|
Similarly, you can run <TT
|
Similarly, you can run <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_sink</TT
|
>tcp_sink</TT
|
> and <TT
|
> and <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>tcp_source</TT
|
>tcp_source</TT
|
> on
|
> on
|
the same LINUX machine or different ones. TCP/IP and ARP
|
the same LINUX machine or different ones. TCP/IP and ARP
|
look after them finding one another, as intended.</P
|
look after them finding one another, as intended.</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
><SPAN
|
><SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>nc_test_master</I
|
>nc_test_master</I
|
></SPAN
|
></SPAN
|
> - network characterization master
|
> - network characterization master
|
<SPAN
|
<SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>nc_test_slave</I
|
>nc_test_slave</I
|
></SPAN
|
></SPAN
|
> - network characterization slave</PRE
|
> - network characterization slave</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>These tests talk to each other to measure network performance.
|
>These tests talk to each other to measure network performance.
|
They can each run on either a test target or a LINUX host computer
|
They can each run on either a test target or a LINUX host computer
|
given some customization to your local environment. As provided, <TT
|
given some customization to your local environment. As provided, <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>nc_test_slave</TT
|
>nc_test_slave</TT
|
> must
|
> must
|
run on the test target, and <TT
|
run on the test target, and <TT
|
CLASS="LITERAL"
|
CLASS="LITERAL"
|
>nc_test_master</TT
|
>nc_test_master</TT
|
> must
|
> must
|
be run on a LINUX host, and be given the test target's
|
be run on a LINUX host, and be given the test target's
|
IP address or hostname.</P
|
IP address or hostname.</P
|
><P
|
><P
|
>The tests print network performance for various packet sizes
|
>The tests print network performance for various packet sizes
|
over UDP and TCP, versus various additional CPU loads on the target.</P
|
over UDP and TCP, versus various additional CPU loads on the target.</P
|
><P
|
><P
|
>The programs <TABLE
|
>The programs <TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="PROGRAMLISTING"
|
CLASS="PROGRAMLISTING"
|
><SPAN
|
><SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>nc6_test_slave</I
|
>nc6_test_slave</I
|
></SPAN
|
></SPAN
|
>
|
>
|
<SPAN
|
<SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>nc6_test_master</I
|
>nc6_test_master</I
|
></SPAN
|
></SPAN
|
></PRE
|
></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>
|
>
|
are additional forms which support both IPv4 and IPv6 addressing.</P
|
are additional forms which support both IPv4 and IPv6 addressing.</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="net-common-standalone-tests.html"
|
HREF="net-common-standalone-tests.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="net-common-interactive-tests.html"
|
HREF="net-common-interactive-tests.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>Standalone Tests</TD
|
>Standalone Tests</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="net-common-tests-and-demonstrations.html"
|
HREF="net-common-tests-and-demonstrations.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>Interactive Tests</TD
|
>Interactive Tests</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|