Giter Club home page Giter Club logo

wifi_energy_results's Introduction

Wifi Energy Results

Versão do NS3 3.29

Memory consumption increase

wifi_energy_results's People

Contributors

ggarciabas avatar

Watchers

James Cloos avatar  avatar

wifi_energy_results's Issues

EnergyModel Increase Memory Consumption - WifiRadioEnergyModel

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"

image

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);

Fast increase of memory:
image
image
image

When I increase the nodes

  // configure cli
  m_cli.Create(20);

Memory increase:
image
image
image
image
image
image
image
image

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.