Re: Some confusion about the implementation of PEDS in NS-3.

Skip to first unread message

Barnes, Peter D.

Dec 2, 2021, 5:42:37 PM12/2/21
to 郑 浩,
Hello Mr Zheng,

You are correct that parallelization in a discrete event simulation can be realized with threads as well as with multiple processes.  The two reasons to consider parallelization are: 

* Faster execution than a single thread of execution, and
* Execution of larger models, too big to fit in the memory of one machine.

Both threads and multi-process address the first goal; only multi-process distributed over multiple machines addresses the second goal.  Some PDES (parallel discrete event simulator) implementations use both, such as SST and Charades.  

I gave a pretty extensive tutorial on parallelization in ns-3 at the 2016 WNS3 workshop; slides and video are available.  ns-3 only supports multi-process parallelization. There are a couple of papers exploring that performance.[1] 

Guillaume Seguin did some work on using threads in ns-3 (blogpaperslides), but the results weren’t very satisfying (20% speedup with 8 threads).

I hope that helps,

[1] Distributed simulation with MPI in ns-3, Pelkey and Riley, WNS3 2010, paperslides

Performance of Distributed ns-3 Network Simulator, Nikolaev et al, SimuTools 2013, paper

Pushing the Envelope in Distributed ns-3 Simulations: One Billion Nodes, Nikolaev et al, WNS3-2015. paperslides

On Nov 4, 2021, at 5:23 AM, 郑 浩 <> wrote:

Hi Peter,
         I am a student in network research, and I am interested in the parallel execution of NS-3. I note that both OMNet++ and NS-3 implement the distributed feature by MPI (i.e., multi-process style).
I wonder if it is possible to implement it in a multi-threading style. In my view, it can be easier to support transparency and can reduce the synchronization overhead. So the question is that: 
               - what is the root cause of the realization through multi-process?

I used to implement parallel execution in the multi-threading style. But some "assert errors" occurred when the model running, it seems that the buffer mechanism try to prevent me from trying to use multithreading in ns-3.

Best wishes :)

Dr. Peter D. Barnes, Jr. CASC Division, B451 R2035
Lawrence Livermore National Laboratory Computation Directorate
7000 East Avenue, L-561 email:
P. O. Box 808 Voice:  (925) 422-3384
Livermore, California 94550

Reply all
Reply to author
0 new messages