please help: NS3 Parallel/Distributed Emulation

234 views
Skip to first unread message

Musti Aref

unread,
Jun 28, 2017, 11:40:45 AM6/28/17
to ns-3-users
Hello everyone,

I'm working with ns3-26 realtime implementation (LTE + LXC network scenario) with Best-Effort synchronization.

On a single (virtual) machine with the following hardware, I'm able to run up to 10 LXC Containers with each connected to one UE.                                                            
Architecture:               x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:                Little Endian
CPU(s):                     4
On-line CPU(s) list:    0-3
Thread(s) per core:     1
Core(s) per socket:    4
Socket(s):                 1
NUMA node(s):          1
Vendor ID:                 GenuineIntel
CPU family:               6
Model:                       61
Model name:              Intel Core Processor (Broadwell)
Stepping:                   2
CPU MHz:                 3396.066
BogoMIPS:                6792.13
Virtualization:             VT-x
Hypervisor vendor:     KVM
Virtualization type:     full
L1d cache:               32K
L1i cache:                32K
L2 cache:                 4096K
NUMA node0 CPU(s):  0-3

Recently I get access to better machine with 32 hardware cores and i want to make use of the Parallel/Distribution capability of NS3. 
I know that do to small lookahead, rank partitioning over wireless is not supported. In my setup however nodes are decently seperated and don't move so no problem with handover either. 
My entention is to do the partition over the P2P-links between the eNBs and the PGW on the  S1 and X2 interface. 

The result should be: 
- Rank_0 contains ( RemoteHost + PGW ) 
- Rank_1 contains ( eNB_0 + ue_00 + ue_01 + ue_02 + ue_03 + .... ) 
- Rank_2 contains ( eNB_1 + ue_10 + ue_11 + ue_12 + ue_13 + .... ) 
....and so on

My question:
I need emulation in distributed NS3 with Null Message synchronization:

To use NS3 Emulation with BestEffort, i have to set 
GlobalValue::Bind ("SimulatorImplementationType", StringValue ("ns3::RealtimeSimulatorImpl")); Config::SetDefault("ns3::RealtimeSimulatorImpl::SynchronizationMode",EnumValue(RealtimeSimulatorImpl::SYNC_BEST_EFFORT));

To use distributed NS3 with NullMessage i have to set 
GlobalValue::Bind ("SimulatorImplementationType",StringValue ("ns3::NullMessageSimulatorImpl"));

But the last line will overwrites the attribute SimulatorImplementationType and i'm back to (offline) simulation not Emulation mode. 

So how to initialize Emulation in Distributed NS3 ???


BR
Musti

pdbarnes

unread,
Jun 28, 2017, 7:47:33 PM6/28/17
to ns-3-users
If you don't need to interoperate with a real system the easiest thing would be to just use the DistributedSimulatorImpl, either the YAWNS or null message variant.

If you need to interact with a real network you could try using the RealtimeSimulatorImpl on each of the partitions.

If that doesn't work (because the virtual time skew between ns-3 instances is too great) you'll need something like the "distributed real time" simulator implementation done by Ken Renard several years ago. I don't think he ever released the source, unfortunately. I'll ping him and see if he can contribute to this discussion.

Peter

Musti Aref

unread,
Jun 29, 2017, 9:05:52 AM6/29/17
to ns-3-users
Thanks Peter,


If you need to interact with a real network you could try using the RealtimeSimulatorImpl on each of the partitions.


If this work it would be greate. But how can i tell each partition to run in Realtime-Implementation? Could you give me an example how to do this .  

If that doesn't work (because the virtual time skew between ns-3 instances is too great) you'll need something like the "distributed real time" simulator implementation done by Ken Renard several years ago. I don't think he ever released the source, unfortunately. I'll ping him and see if he can contribute to this discussion.


This would be very helpful.

BR
Musti

pdbarnes

unread,
Jul 10, 2017, 5:55:31 PM7/10/17
to ns-3-users


On Thursday, June 29, 2017 at 6:05:52 AM UTC-7, Musti Aref wrote:

If you need to interact with a real network you could try using the RealtimeSimulatorImpl on each of the partitions.


If this work it would be greate. But how can i tell each partition to run in Realtime-Implementation? Could you give me an example how to do this .  

You launch a separate ns-3 instance in each VM, selecting real time by one of these methods:

$ NS_GLOBAL_VALUE="SimulatorImplementationType=RealtimeSimulatorImpl" ./waf --run <script>


$
./waf --run "<script> --SimulatorImplementationType=RealtimeSimulatorImpl"

The first form will always work; the second form works if your script uses CommandLine.

Peter
Message has been deleted

Eva Chen

unread,
Dec 18, 2017, 1:08:12 AM12/18/17
to ns-3-users
Hi,

I have tried on this "--SimulatorImplementationType=RealtimeSimulatorImpl" argument with running test, but I got this error message

$ ./waf --run "first --SimulatorImplementationType=RealtimeSimulatorImpl"
'build' finished successfully (1.610s)
assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName: RealtimeSimulatorImpl not found", file=../src/core/model/type-id.cc, line=817
terminate called without an active exception

$ ./waf --run first
'build' finished successfully (1.602s)
At time 2s client sent 1024 bytes to 10.1.1.2 port 9
At time 2.00369s server received 1024 bytes from 10.1.1.1 port 49153
At time 2.00369s server sent 1024 bytes to 10.1.1.1 port 49153
At time 2.00737s client received 1024 bytes from 10.1.1.2 port 9


I have googled it but little discussed this error, and I still don't know how to fix it.
May I ask for some advice?

thanks!!!

pdbarnes於 2017年7月11日星期二 UTC+8上午5時55分31秒寫道:
Reply all
Reply to author
Forward
0 new messages