GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » FutureDAQ » FutureDAQ - Simulation » Ptolemy II perfomance
SystemC versus Ptolemy II perfomance [message #385 is a reply to message #369] Wed, 28 April 2004 11:17 Go to previous messageGo to previous message
Sergey Linev is currently offline  Sergey Linev
Messages: 13
Registered: April 2004
Location: GSI Darmstadt
occasional visitor
To be able compare Ptolemy and SystemC, I write a small program using SystemC classes.

I create TToken class, which similar meaning as in Ptolemy. This should be abstract class for data containers, which should be transferred between model components (actors).

To perform data exchange between components, three classes were introduced:
TTokenOut – output port for tokens
TTokenInp – input port for tokens
TToken_channel – data channel, connecting output port and input ports

In addition, I create TActor class, which can be used as base class for all model components.

To configure model, comparable with Ptolemy model, which I use in performance tests, I introduce three classes:
---TGenerator – generates double tokens with predefined time interval;
---TTimedDelay – just send input to output with defined delay
---TDiscard – delete all arrived tokens

From these components I construct very similar simulation, as I did before with Ptolemy. I configure chain of components, which start with TGenerator and stops by TDiscard modules, and in between arbitrary number of TTimedDelay actors can be inserted.

To compile this program, first SystemC 2.0.1 should be installed. Then test.tar.gz archive should be unpacked. In Makefile correct path to SystemC installation should be specify. Then “make all” command will create run.x executable. Two arguments should be specified to run program. First is number of TTimedDelay actors, second – duration of simulation. Makefile is modified to be used in Linux, but I see no problem to compile examples under another platforms. I am not sure, if SystemC works under cygwin, but it should works with MS VC compiler.

I run my tests on the same machine (Athlon 1800M+, 512 MB RAM, Debain 3.0, gcc 2.95.4), where I run Ptolemy tests. Results are:

------------------------------------------------------------------------ ----------------------------------------
> run.x 10 1000000

Create 10 delay actors
Execute done in 12 sec
Number of transactions = 10999955
Rate = 916663 trans/sec

> run.x 100 100000
Create 100 delay actors
Execute done in 14 sec
Number of transactions = 10095181
Rate = 721084 trans/sec

> run.x 1000 10000
Create 1000 delay actors
Execute done in 36 sec
Number of transactions = 9527192
Rate = 264644 trans/sec

> run.x 10000 10000
Create 10000 delay actors
Execute done in 283 sec
Number of transactions = 51726725
Rate = 182780 trans/sec
------------------------------------------------------------------------ ----------------------------------------

Memory usage (as reported by top):
10 actors – 0.9M
100 actors – 1.9M
1000 actors – 12 M
10000 actors – 182 M

Can be seen, that transaction rate in SystemC about 10 time faster than in Ptolemy II in case of small number of components (less than 100). If one use bigger number of actors in SystemC, it just introduce factor of 5 penalty, while in Ptolemy it is two or three orders of magnitude.

On my machine test with 10000 node Ptolemy finish in 6 hours and makes only 5000 transactions, which means 0.25 trans/sec speed.

Any comments?
  • Attachment: test.tar.gz
    (Size: 3.64KB, Downloaded 988 times)
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ptolemy Classic
Goto Forum:

Current Time: Tue Jun 25 10:46:45 CEST 2024

Total time taken to generate the page: 0.00987 seconds