Versão do NS3 3.29
Memory consumption increase
Simulações para analise o consumo médio de energia do AP.
Hello,
Mine simulation where I am using the WifiRadioEnergyModel together with the EnergyModel is with an increase memory consumption.
I have reduced the scenario and the number of nodes, inserted the WifiRadioEnergyModel just in one node and still it is having an increase memory consumption.
I am using the NS3.29 version, and attached those files in here and they can be found here too: https://github.com/ggarciabas/wifi_energy_results
I have created an EnergySource called uav-energy-source, just a reduced and modified structure from BasicEnergySource.
When I execute with the UavEnergySource the simulation is easily ended but, with a high memory consumption, but it ends!
file: test-bed.cc
/* Mine energy source */
UavEnergySourceHelper sourceHelper;
sourceHelper.Set("ScenarioName", StringValue(m_scenarioName));
sourceHelper.Set("UavEnergySourceInitialEnergy", DoubleValue(m_initialEnergyJ)); // Joules
EnergySourceContainer sources = sourceHelper.Install(m_uavs.Get(0)); // install source
// DynamicCast<UavEnergySource>(sources.Get(0))->Start(); --- not used in this simulation
// Energy sources
// EnergySourceContainer sources;
// BasicEnergySourceHelper basicSourceHelper;
// basicSourceHelper.Set ("BasicEnergySourceInitialEnergyJ", DoubleValue (m_initialEnergyJ));
// basicSourceHelper.Set ("BasicEnergySupplyVoltageV", DoubleValue (3.3));
// sources = basicSourceHelper.Install(m_uavs.Get(0));
// configure cli
m_cli.Create(20);
I have used the Valgrind, file massif_uav_source.out, but the htop tool showed approx 47% of memory (5.64GB)
Execution line: ./waf --run wifi_energy_results --command-template="valgrind --tool=massif %s --Protocol=1 --Scenario=1 --Seed=289265"
When I use the BasicEnergySource it reaches the 92% of memory and starts to use the swap memory.
With reduced nodes:
// configure cli
m_cli.Create(5);
and BasicEenrgySource:
/* Mine energy source */
// UavEnergySourceHelper sourceHelper;
// sourceHelper.Set("ScenarioName", StringValue(m_scenarioName));
// sourceHelper.Set("UavEnergySourceInitialEnergy", DoubleValue(m_initialEnergyJ)); // Joules
// sources = sourceHelper.Install(m_uavs.Get(0)); // install source
//// DynamicCast<UavEnergySource>(sources.Get(0))->Start(); --- not used in this simulation
// Energy sources
EnergySourceContainer sources;
BasicEnergySourceHelper basicSourceHelper;
basicSourceHelper.Set ("BasicEnergySourceInitialEnergyJ", DoubleValue (m_initialEnergyJ));
basicSourceHelper.Set ("BasicEnergySupplyVoltageV", DoubleValue (3.3));
sources = basicSourceHelper.Install(m_uavs.Get(0));
I have tried to use the valgrind tool but I got this error:
./waf --run wifi_energy_results --command-template="valgrind --tool=massif %s --Protocol=1 --Scenario=1 --Seed=289265"
Waf: Entering directory `/home/ggarciabas/ns3/build'
Waf: Leaving directory `/home/ggarciabas/ns3/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (2.281s)
==10565== Massif, a heap profiler
==10565== Copyright (C) 2003-2017, and GNU GPL'd, by Nicholas Nethercote
==10565== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==10565== Command: /home/ggarciabas/ns3/build/scratch/wifi_energy_results/wifi_energy_results --Protocol=1 --Scenario=1 --Seed=289265
==10565==
==10565==
==10565== Process terminating with default action of signal 11 (SIGSEGV)
==10565== Access not within mapped region at address 0x118EA000
==10565== at 0xD732BB1: ns3::Object::~Object() (object.cc:114)
==10565== by 0xC0A4AC1: ns3::EnergySourceContainer::~EnergySourceContainer() (energy-source-container.cc:45)
==10565== by 0x13DF5D: ns3::TestBed::ConfigureScenario() (test-bed.cc:389)
==10565== by 0x13459C: ns3::TestBed::Run() (test-bed.cc:129)
==10565== by 0x130F1B: main (main.cc:49)
==10565== If you believe this happened as a result of a stack
==10565== overflow in your program's main thread (unlikely but
==10565== possible), you can try to increase the size of the
==10565== main thread stack using the --main-stacksize= flag.
==10565== The main thread stack size used in this run was 8388608.
==10565==
Command ['valgrind', '--tool=massif', '/home/ggarciabas/ns3/build/scratch/wifi_energy_results/wifi_energy_results', '--Protocol=1', '--Scenario=1', '--Seed=289265'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
Running it under GDB no problems are found, just 50% of memory (~6GB):
./waf --run wifi_energy_results --command-template="gdb --args %s --Protocol=1 --Scenario=1 --Seed=289265"
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/ggarciabas/ns3/build/scratch/wifi_energy_results/wifi_energy_results...done.
(gdb) r
Starting program: /home/ggarciabas/ns3/build/scratch/wifi_energy_results/wifi_energy_results --Protocol=1 --Scenario=1 --Seed=289265
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Inferior 1 (process 10256) exited normally]
(gdb)
When I increase just 5 nodes
// configure cli
m_cli.Create(10);
When I increase the nodes
// configure cli
m_cli.Create(20);
I would like to know if someone already had this problem, because I have searched about this and found nothing.
If I remove the structure from the WifiRadioEnergyModel the simulation do not use 1% of memory.
This is a normal problem or am I doing some configuration wrong?
Thanks,
Best regards,
Giovanna Garcia.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.