MeshDemo

Cougaar “Mesh” Demos

NOTE: This file and all referenced files are included in the demo-mesh.zip latest Cougaar release.


This module contains the Cougaar “mesh” demos, which are designed for scalability and performance testing.

The mesh benchmark is similar to a distributed clock. At startup every peer sends a relay with a “1″ counter to all its peers. When a peer has received all the “1″s from its peers, that peer sends out a “2″. All peers run asynchronously but are effectively throttled by the slowest peer. No peer can get far ahead of any other peer; they are limited by the “distance” between one another. Note that, although the slowest peer is random, the aggregate throughput will be correct.

In a fully connected mesh, every peer lists all the peers in its “targets” parameter. This will create an “N^2″ connection topology. Other topologies (rings, trees, etc) are supported, as illustrated in the configs directory.

A peer will log a warning if it receives a duplicate counter, or if it has waited more than 30 seconds for an input counter. The plugins also support several other benchmark-friendly options:

  • A “maxIteration” for when the test should end.
  • A “bloatSize” to increase the relay message sizes.

Contents:

  1. configs/*.xml: The society files.
  2. run/*.xml: The runtime files.
  3. run/logging.props: The Log4j logging configuration file.
  4. src/org/cougaar/demo/mesh/*.java: The Java source code consists of:
    • A “mesh plugin”
    • A “mesh servlet”

Installation:

Please follow the same installation steps as in the “Hello World” example, substituting “mesh” for “hello”.

“Hello World” README is available in the “demo-hello.zip” produced by the nightly build:

Usage:

There are the following demos:

  1. A basic 3-agent “mesh” test:
  2. Run:
    cd $COUGAAR_RUNTIME_PATH
    cougaar $COUGAAR_SOCIETY_PATH/configs/BasicSociety.xml BasicRuntime.xml
    

    This should print:
    [MeshPlugin] – A: Parsed 2 targets: [B, C]
    [MeshPlugin] – A: Sending counter 1 to 2 targets
    [MeshPlugin] – B: Parsed 2 targets: [A, C]
    [MeshPlugin] – B: Sending counter 1 to 2 targets
    [MeshPlugin] – C: Parsed 2 targets: [A, B]
    [MeshPlugin] – C: Sending counter 1 to 2 targets
    [DOTS] – ++-+-+-+–+-
    [MeshPlugin] – B: Received 1 from C
    [MeshPlugin] – A: Received 1 from C
    [MeshPlugin] – A: Received 1 from B
    [MeshPlugin] – A: Will send counter 1 in 5 seconds
    [MeshPlugin] – C: Received 1 from A
    [MeshPlugin] – C: Received 1 from B
    [MeshPlugin] – C: Will send counter 1 in 5 seconds
    [MeshPlugin] – B: Received 1 from A
    [MeshPlugin] – B: Will send counter 1 in 5 seconds
    [DOTS] – .
    [MeshPlugin] – C: Sending counter 2 to 2 targets
    [DOTS] – +-+-
    [MeshPlugin] – B: Sending counter 2 to 2 targets
    [DOTS] – +-+-
    [MeshPlugin] – A: Sending counter 2 to 2 targets
    [MeshPlugin] – A: Received 2 from C
    [MeshPlugin] – A: Received 2 from B
    [MeshPlugin] – A: Will send counter 2 in 5 seconds
    [DOTS] – +-+-
    [MeshPlugin] – B: Received 2 from C
    [MeshPlugin] – B: Received 2 from A
    [MeshPlugin] – B: Will send counter 2 in 5 seconds
    [MeshPlugin] – C: Received 2 from B
    [MeshPlugin] – C: Received 2 from A
    [MeshPlugin] – C: Will send counter 2 in 5 seconds
    [DOTS] – .

  3. Optionally view the servlet at
    http://localhost:8800/$A/mesh
  4. Press CTRL-C to stop the run.
  • A benchmark 3-agent “mesh” test:
    1. Run:
      cd $COUGAAR_RUNTIME_PATH
      cougaar $COUGAAR_SOCIETY_PATH/configs/BasicSociety.xml BenchmarkRuntime.xml
      

      Note that the above runtime XML file has been modified to disable the logging output.

    2. Optionally view the servlet at
      http://localhost:8800/$A/mesh
      Note the high “relays-per-second” throughput, due to the “delayMillis=0″ setting in the society XML file.
    3. Press CTRL-C to stop the run.
  • More topologies tests: The benchmark can be configured into other topologies, such as rings, trees, etc. See configs/*.xml. The usage is similar to the above examples.
  • Cougaar “Mesh” Demos

    NOTE: This file and all referenced files are included in the demo-mesh.zip latest Cougaar release.


    This module contains the Cougaar “mesh” demos, which are designed for scalability and performance testing.

    The mesh benchmark is similar to a distributed clock. At startup every peer sends a relay with a “1″ counter to all its peers. When a peer has received all the “1″s from its peers, that peer sends out a “2″. All peers run asynchronously but are effectively throttled by the slowest peer. No peer can get far ahead of any other peer; they are limited by the “distance” between one another. Note that, although the slowest peer is random, the aggregate throughput will be correct.

    In a fully connected mesh, every peer lists all the peers in its “targets” parameter. This will create an “N^2″ connection topology. Other topologies (rings, trees, etc) are supported, as illustrated in the configs directory.

    A peer will log a warning if it receives a duplicate counter, or if it has waited more than 30 seconds for an input counter. The plugins also support several other benchmark-friendly options:

    • A “maxIteration” for when the test should end.
    • A “bloatSize” to increase the relay message sizes.

    Contents:

    1. configs/*.xml: The society files.
    2. run/*.xml: The runtime files.
    3. run/logging.props: The Log4j logging configuration file.
    4. src/org/cougaar/demo/mesh/*.java: The Java source code consists of:
      • A “mesh plugin”
      • A “mesh servlet”

    Installation:

    Please follow the same installation steps as in the “Hello World” example, substituting “mesh” for “hello”.

    “Hello World” README is available in the “demo-hello.zip” produced by the nightly build:

    Usage:

    There are the following demos:

    1. A basic 3-agent “mesh” test:
    2. Run:
      cd $COUGAAR_RUNTIME_PATH
      cougaar $COUGAAR_SOCIETY_PATH/configs/BasicSociety.xml BasicRuntime.xml
      

      This should print:
      [MeshPlugin] – A: Parsed 2 targets: [B, C]
      [MeshPlugin] – A: Sending counter 1 to 2 targets
      [MeshPlugin] – B: Parsed 2 targets: [A, C]
      [MeshPlugin] – B: Sending counter 1 to 2 targets
      [MeshPlugin] – C: Parsed 2 targets: [A, B]
      [MeshPlugin] – C: Sending counter 1 to 2 targets
      [DOTS] – ++-+-+-+–+-
      [MeshPlugin] – B: Received 1 from C
      [MeshPlugin] – A: Received 1 from C
      [MeshPlugin] – A: Received 1 from B
      [MeshPlugin] – A: Will send counter 1 in 5 seconds
      [MeshPlugin] – C: Received 1 from A
      [MeshPlugin] – C: Received 1 from B
      [MeshPlugin] – C: Will send counter 1 in 5 seconds
      [MeshPlugin] – B: Received 1 from A
      [MeshPlugin] – B: Will send counter 1 in 5 seconds
      [DOTS] – .
      [MeshPlugin] – C: Sending counter 2 to 2 targets
      [DOTS] – +-+-
      [MeshPlugin] – B: Sending counter 2 to 2 targets
      [DOTS] – +-+-
      [MeshPlugin] – A: Sending counter 2 to 2 targets
      [MeshPlugin] – A: Received 2 from C
      [MeshPlugin] – A: Received 2 from B
      [MeshPlugin] – A: Will send counter 2 in 5 seconds
      [DOTS] – +-+-
      [MeshPlugin] – B: Received 2 from C
      [MeshPlugin] – B: Received 2 from A
      [MeshPlugin] – B: Will send counter 2 in 5 seconds
      [MeshPlugin] – C: Received 2 from B
      [MeshPlugin] – C: Received 2 from A
      [MeshPlugin] – C: Will send counter 2 in 5 seconds
      [DOTS] – .

    3. Optionally view the servlet at
      http://localhost:8800/$A/mesh
    4. Press CTRL-C to stop the run.
  • A benchmark 3-agent “mesh” test:
    1. Run:
      cd $COUGAAR_RUNTIME_PATH
      cougaar $COUGAAR_SOCIETY_PATH/configs/BasicSociety.xml BenchmarkRuntime.xml
      

      Note that the above runtime XML file has been modified to disable the logging output.

    2. Optionally view the servlet at
      http://localhost:8800/$A/mesh
      Note the high “relays-per-second” throughput, due to the “delayMillis=0″ setting in the society XML file.
    3. Press CTRL-C to stop the run.
  • More topologies tests: The benchmark can be configured into other topologies, such as rings, trees, etc. See configs/*.xml. The usage is similar to the above examples.