From bb4d7ab5331ed1a1e58b98ae1653e5a91786c742 Mon Sep 17 00:00:00 2001 From: Jaume Nin Date: Thu, 24 Nov 2011 12:05:35 +0100 Subject: [PATCH 1/3] Some profiling test refurbished, not final yet. Makefile fixed so it won't delete non autogenerated pdf and eps figures --- src/lte/doc/Makefile | 13 +++++++------ src/lte/doc/source/lte-profiling.rst | 13 ++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lte/doc/Makefile b/src/lte/doc/Makefile index 09c371187..c789ba04a 100644 --- a/src/lte/doc/Makefile +++ b/src/lte/doc/Makefile @@ -41,17 +41,18 @@ $(FIGURES)/lte-transmission.pdf_width = 3in $(FIGURES)/auvmobility-classes.pdf_width = 10cm $(FIGURES)/lte-interference-test-scenario.pdf_width = 4in -IMAGES_PNG = ${IMAGES_EPS:.eps=.png} \ - $(FIGURES)/fading_pedestrian.png \ +IMAGES_PNG = ${IMAGES_EPS:.eps=.png} + +IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf} + +IMAGES_OTHER = $(FIGURES)/fading_pedestrian.png \ $(FIGURES)/fading_vehicular.png \ - $(FIGURES)/fading_urban_3kmph.png -IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf} \ + $(FIGURES)/fading_urban_3kmph.png \ $(FIGURES)/fading_pedestrian.pdf \ $(FIGURES)/fading_vehicular.pdf \ $(FIGURES)/fading_urban_3kmph.pdf - -IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) +IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) $(IMAGES_OTHER) %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ diff --git a/src/lte/doc/source/lte-profiling.rst b/src/lte/doc/source/lte-profiling.rst index 1e809bdda..3f802df44 100644 --- a/src/lte/doc/source/lte-profiling.rst +++ b/src/lte/doc/source/lte-profiling.rst @@ -9,7 +9,7 @@ Overview and objectives *********************** -The main profiling objective is to assess the simulator performance on a broad set of situations. This evaluation provides reference values for simulation running times and memory consumption figures. Also, it helps identifying potential performance improvements or bottlenecks and checking that no scalability problems arise while increasing the number of eNodeB and the number of UEs attached to each eNodeB. +The main profiling objective is to assess the simulator performance on a broad set of scenarios. This evaluation provides reference values for simulation running times and memory consumption figures. It also helps to identify potential performance improvements and to check for scalability problems when increasing the number of eNodeB and the number of UEs attached to each eNodeB. In the following sections, a detailed description of the general profiling framework employed to perform this profiling study is introduced. It also introduces the details of the main tests performed and its results are evaluated. @@ -19,12 +19,11 @@ Framework description Simulation script ~~~~~~~~~~~~~~~~ -The simulation script used for all the results gathered in this documentation is located at ``src/lte/examples/lena-runtime-profiler.cc``. This script generated a squared grid topology, placing a eNodeB at the centre of the square. UEs attached to this node are scattered randomly across the square (using a random uniform distribution along X and Y axis). If *BuildingPropagationModel* is used +The simulation script used for all the results gathered in this documentation is located at ``src/lte/examples/lena-runtime-profiler.cc``. This script generated a squared grid topology, placing a eNodeB at the centre of the square. UEs attached to this node are scattered randomly across the square (using a random uniform distribution along X and Y axis). If *BuildingPropagationModel* is used, the squares are replaced by rooms. .. TODO: Insert figure picturing the geometry of the simulation. -RLC and MAC traces are enabled for all UEs and all eNodeBs and those traces are written to disk directly. The MAC scheduler used is *propotional fair* - +RLC and MAC traces are enabled for all UEs and all eNodeBs and those traces are written to disk directly. The MAC scheduler used is *propotional fair*. Simulation input parameters --------------------------- @@ -39,12 +38,12 @@ The *lena-runtime-profiler* simulation script accepts the following input parame Time measurement ~~~~~~~~~~~~~~~~ -Running time is measured using default Linux shell command **time**. This command counts the user time invested in the execution of a program. +Running time is measured using default Linux shell command **time**. This command counts how much user time the execution of a program takes. Perl script ~~~~~~~~~~~ -To simplify the process of running the profiling script for a wide range of values and collecting its data, a simple Perl script to automate the whole process has been developed. It is placed in ``src/lte/test/lte-test-run-time.pl``. It simply runs a batch of simulations with a range of parameters and stores the timing results in a CSV file called *times.csv*. +To simplify the process of running the profiling script for a wide range of values and collecting its timing data, a simple Perl script to automate the complete process is provided. It is placed in ``src/lte/test/lte-test-run-time.pl``. It simply runs a batch of simulations with a range of parameters and stores the timing results in a CSV file called *times.csv*. The range of values each parameter takes can be easily modified editing the script. Requirements ------------ @@ -72,7 +71,7 @@ The following results and figures had been obtained with LENA **changeset 1823cd Running time ~~~~~~~~~~~~ -This scenario, evaluates the running time in for a fixed simulation time (10s) increasing the number of UEs attached to each eNodeB and the number of planted eNodeBs in every scenario. Friis propagation model is used as a reference. +This scenario, evaluates the running time in for a fixed simulation time (10s) and Friis propagation mode increasing the number of UEs attached to each eNodeB and the number of planted eNodeBs in every scenario. .. _fig-runTime: From 04258894d62ab4d883ff8215fe0e1eb2299d54ac Mon Sep 17 00:00:00 2001 From: Marco Miozzo Date: Thu, 24 Nov 2011 12:23:33 +0100 Subject: [PATCH 2/3] Bug-fix LteEnbMac multiple DCI generation per UE --- src/lte/model/lte-enb-mac.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lte/model/lte-enb-mac.cc b/src/lte/model/lte-enb-mac.cc index 238a13463..908784358 100644 --- a/src/lte/model/lte-enb-mac.cc +++ b/src/lte/model/lte-enb-mac.cc @@ -694,12 +694,12 @@ LteEnbMac::DoSchedDlConfigInd (FfMacSchedSapUser::SchedDlConfigIndParameters ind it = m_rlcAttached.find (flow); NS_ASSERT_MSG (it != m_rlcAttached.end (), "rnti=" << flow.m_rnti << " lcid=" << (uint32_t) flow.m_lcId); (*it).second->NotifyTxOpportunity (ind.m_buildDataList.at (i).m_rlcPduList.at (j).at (k).m_size); - // send the relative DCI - Ptr msg = Create (); - msg->SetDci (ind.m_buildDataList.at (i).m_dci); - m_enbPhySapProvider->SendIdealControlMessage (msg); } } + // send the relative DCI + Ptr msg = Create (); + msg->SetDci (ind.m_buildDataList.at (i).m_dci); + m_enbPhySapProvider->SendIdealControlMessage (msg); } // Fire the trace with the DL information From 6776579be7ce29605856a748cbdf3d182d7f5407 Mon Sep 17 00:00:00 2001 From: Marco Miozzo Date: Thu, 24 Nov 2011 12:25:36 +0100 Subject: [PATCH 3/3] Bug-fix RrFfMacScheduler::DoSchedDlTriggerReq DCI TB size per multiple LCs --- src/lte/model/rr-ff-mac-scheduler.cc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/lte/model/rr-ff-mac-scheduler.cc b/src/lte/model/rr-ff-mac-scheduler.cc index ffd8fa127..f556aa734 100644 --- a/src/lte/model/rr-ff-mac-scheduler.cc +++ b/src/lte/model/rr-ff-mac-scheduler.cc @@ -394,10 +394,12 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched std::list::iterator it; m_rlcBufferReq.sort (SortRlcBufferReq); int nflows = 0; + int nTbs = 0; std::map lcActivesPerRnti; std::map ::iterator itLcRnti; for (it = m_rlcBufferReq.begin (); it != m_rlcBufferReq.end (); it++) { +// NS_LOG_INFO (this << " User " << (*it).m_rnti << " LC " << (uint16_t)(*it).m_logicalChannelIdentity); // remove old entries of this UE-LC if ( ((*it).m_rlcTransmissionQueueSize > 0) || ((*it).m_rlcRetransmissionQueueSize > 0) @@ -425,12 +427,13 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched else { lcActivesPerRnti.insert (std::pair ((*it).m_rnti, 1)); + nTbs++; } } } } - + if (nflows == 0) { return; @@ -439,10 +442,10 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched // Resource allocation type 0 (see sec 7.1.6.1 of 36.213) int rbgSize = GetRbgSize (m_cschedCellConfig.m_dlBandwidth); int rbgNum = m_cschedCellConfig.m_dlBandwidth / rbgSize; - int rbgPerFlow = rbgNum / nflows; - if (rbgPerFlow == 0) + int rbgPerTb = rbgNum / nTbs; + if (rbgPerTb == 0) { - rbgPerFlow = 1; // at least 1 rbg per flow (till available resource) + rbgPerTb = 1; // at least 1 rbg per TB (till available resource) } int rbgAllocated = 0; @@ -504,15 +507,16 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched } // group the LCs of this RNTI std::vector newRlcPduLe; - int totRbg = lcNum * rbgPerFlow; - int tbSize = (LteAmc::GetTbSizeFromMcs (newDci.m_mcs.at (0), totRbg * rbgSize) / 8); -// NS_LOG_DEBUG (this << "Allocate user " << newEl.m_rnti << " LCs " << (uint16_t)(*itLcRnti).second << " bytes " << tbSize << " PRBs " << totRbg * rbgSize << " mcs " << (uint16_t) newDci.m_mcs.at (0)); +// int totRbg = lcNum * rbgPerFlow; +// totRbg = rbgNum / nTbs; + int tbSize = (LteAmc::GetTbSizeFromMcs (newDci.m_mcs.at (0), rbgPerTb * rbgSize) / 8); + NS_LOG_DEBUG (this << "Allocate user " << newEl.m_rnti << " LCs " << (uint16_t)(*itLcRnti).second << " bytes " << tbSize << " PRBs " << rbgPerTb * rbgSize << " mcs " << (uint16_t) newDci.m_mcs.at (0)); uint16_t rlcPduSize = tbSize / lcNum; for (int i = 0; i < lcNum ; i++) { RlcPduListElement_s newRlcEl; newRlcEl.m_logicalChannelIdentity = (*it).m_logicalChannelIdentity; - //NS_LOG_DEBUG (this << "LCID " << (uint32_t) newRlcEl.m_logicalChannelIdentity << " size " << rlcPduSize); + NS_LOG_DEBUG (this << "LCID " << (uint32_t) newRlcEl.m_logicalChannelIdentity << " size " << rlcPduSize << " ID " << (*it).m_rnti); newRlcEl.m_size = rlcPduSize; newRlcPduLe.push_back (newRlcEl); it++; @@ -523,7 +527,7 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched } } uint32_t rbgMask = 0; - for (int i = 0; i < totRbg; i++) + for (int i = 0; i < rbgPerTb; i++) { rbgMask = rbgMask + (0x1 << rbgAllocated); rbgAllocated++; @@ -730,7 +734,7 @@ RrFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::Sched } uldci.m_tbSize = (LteAmc::GetTbSizeFromMcs (uldci.m_mcs, rbPerFlow) / 8); // MCS 0 -> UL-AMC TBD -// NS_LOG_DEBUG (this << " UE " << (*it).first << " startPRB " << (uint32_t)uldci.m_rbStart << " nPRB " << (uint32_t)uldci.m_rbLen << " CQI " << cqi << " MCS " << (uint32_t)uldci.m_mcs << " TBsize " << uldci.m_tbSize); + NS_LOG_DEBUG (this << " UE " << (*it).first << " startPRB " << (uint32_t)uldci.m_rbStart << " nPRB " << (uint32_t)uldci.m_rbLen << " CQI " << cqi << " MCS " << (uint32_t)uldci.m_mcs << " TBsize " << uldci.m_tbSize); uldci.m_ndi = 1; uldci.m_cceIndex = 0; uldci.m_aggrLevel = 1;