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:
- configs/*.xml: The society files.
- run/*.xml: The runtime files.
- run/logging.props: The Log4j logging configuration file.
- 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:
- A basic 3-agent “mesh” test:
- 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] – .
… - Optionally view the servlet at
http://localhost:8800/$A/mesh - Press CTRL-C to stop the run.
- 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.
- 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. - Press CTRL-C to stop the run.
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:
- configs/*.xml: The society files.
- run/*.xml: The runtime files.
- run/logging.props: The Log4j logging configuration file.
- 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:
- A basic 3-agent “mesh” test:
- 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] – .
… - Optionally view the servlet at
http://localhost:8800/$A/mesh - Press CTRL-C to stop the run.
- 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.
- 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. - Press CTRL-C to stop the run.