|
Bugzilla – Full Text Bug Listing |
| Summary: | Red Queue Estimator spins when trying to compute queue average size under long idle times | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | l.salameh |
| Component: | network | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | l.salameh, tahiliani.nitk, tommaso.pecorella |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | Mac Intel | ||
| OS: | Mac OS | ||
I agree with Salameh. The patch works fine. Just tested it. - Mohit I agree with Salameh. The patch works fine. Just tested it. - Mohit Fixed - Worksforme means that the actual code shouldn't be changed. Thank you. FIXED! Pushed in changeset: 11876:f9a8116577d5 |
This is a performance bug. I have an experiment where I'm using Red Queues for web downloads. In the experiment I have idle times between resource downloads on the order of seconds. If I crank up the link rates and reduce the latency, the Estimator in the Red Queue spins for a long time trying to compute the average queue size during the idle time. Here is the patch, instead of using a while loop, use the pow function: --- a/src/network/utils/red-queue.cc Fri Feb 05 01:35:39 2016 +0000 +++ b/src/network/utils/red-queue.cc Wed Feb 10 13:07:15 2016 +0000 @@ -421,14 +421,8 @@ RedQueue::Estimator (uint32_t nQueued, uint32_t m, double qAvg, double qW) { NS_LOG_FUNCTION (this << nQueued << m << qAvg << qW); - double newAve; - - newAve = qAvg; - while (--m >= 1) - { - newAve *= 1.0 - qW; - } - newAve *= 1.0 - qW; + double newAve = qAvg * pow(1.0-qW, m); + newAve += qW * nQueued; // implement adaptive RED