Bug 2594

Summary: vht-wifi-network provides very low throughtput at MCS 6, 160 MHz, SGI
Product: ns-3 Reporter: sebastien.deronne
Component: wifiAssignee: sebastien.deronne
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs, tomh
Priority: P3    
Version: ns-3.26   
Hardware: All   
OS: All   
Attachments: patch to fix

Description sebastien.deronne 2016-12-19 15:21:05 UTC
MCS value		Channel width		short GI		Throughput
0			20 MHz			0			6.02696 Mbit/s
0			20 MHz			1			6.67699 Mbit/s
0			40 MHz			0			12.5049 Mbit/s
0			40 MHz			1			13.9228 Mbit/s
0			80 MHz			0			27.1401 Mbit/s
0			80 MHz			1			30.1807 Mbit/s
0			160 MHz			0			54.172 Mbit/s
0			160 MHz			1			59.9928 Mbit/s
1			20 MHz			0			12.0834 Mbit/s
1			20 MHz			1			13.4211 Mbit/s
1			40 MHz			0			25.1029 Mbit/s
1			40 MHz			1			27.9174 Mbit/s
1			80 MHz			0			54.2862 Mbit/s
1			80 MHz			1			60.1848 Mbit/s
1			160 MHz			0			106.122 Mbit/s
1			160 MHz			1			117.337 Mbit/s
2			20 MHz			0			18.1197 Mbit/s
2			20 MHz			1			20.1452 Mbit/s
2			40 MHz			0			37.7009 Mbit/s
2			40 MHz			1			41.8696 Mbit/s
2			80 MHz			0			80.4748 Mbit/s
2			80 MHz			1			89.1231 Mbit/s
2			160 MHz			0			155.603 Mbit/s
2			160 MHz			1			171.426 Mbit/s
3			20 MHz			0			24.1938 Mbit/s
3			20 MHz			1			26.9105 Mbit/s
3			40 MHz			0			50.2564 Mbit/s
3			40 MHz			1			55.7252 Mbit/s
3			80 MHz			0			106.337 Mbit/s
3			80 MHz			1			117.659 Mbit/s
3			160 MHz			0			203.998 Mbit/s
3			160 MHz			1			224.573 Mbit/s
4			20 MHz			0			36.3172 Mbit/s
4			20 MHz			1			40.3681 Mbit/s
4			40 MHz			0			74.6575 Mbit/s
4			40 MHz			1			82.6875 Mbit/s
4			80 MHz			0			156.113 Mbit/s
4			80 MHz			1			172.338 Mbit/s
4			160 MHz			0			293.788 Mbit/s
4			160 MHz			1			322.297 Mbit/s
5			20 MHz			0			48.4418 Mbit/s
5			20 MHz			1			53.7245 Mbit/s
5			40 MHz			0			98.584 Mbit/s
5			40 MHz			1			109.087 Mbit/s
5			80 MHz			0			203.76 Mbit/s
5			80 MHz			1			224.468 Mbit/s
5			160 MHz			0			376.058 Mbit/s
5			160 MHz			1			411.219 Mbit/s
6			20 MHz			0			54.3557 Mbit/s
6			20 MHz			1			60.2272 Mbit/s
6			40 MHz			0			110.299 Mbit/s
6			40 MHz			1			121.918 Mbit/s
6			80 MHz			0			227.186 Mbit/s
6			80 MHz			1			249.876 Mbit/s
6			160 MHz			0			415.705 Mbit/s
6			160 MHz			1			23.6273 Mbit/s

23.6273 Mbit/s is NOK, it should provides a much higher throughput (expected to be slightly higher than 415.705 Mbit/s!). 

I will investigate this issue, and check since which commit this problem occurs. I guess this has been introduced in ns-3-dev after ns-3.26 release.
Comment 1 sebastien.deronne 2016-12-23 08:02:52 UTC
Problem was still there in ns-3.26.
I am adding regression checks to avoid such issues in the future.
Comment 2 sebastien.deronne 2016-12-24 06:59:15 UTC
Reducing priority since it occurs only in this example
Comment 3 sebastien.deronne 2016-12-24 09:24:20 UTC
Created attachment 2714 [details]
patch to fix

Issue was in the throughput calculation itself and was caused by an out of bound multiplication using uint32_t, replaced in the patch by uint64_t to fix the bug.
Comment 4 sebastien.deronne 2016-12-24 09:26:11 UTC
Small change in the example, so it can be pushed now, it does not affect any part of the code. 

I will also add it in the regression run (but with a limited simulation time), with some checks on the first and last elements and verify throughput properly increases with MCS, channel width, GI, ...
Comment 5 Tom Henderson 2016-12-24 10:35:10 UTC
(In reply to sebastien.deronne from comment #4)
> Small change in the example, so it can be pushed now, it does not affect any
> part of the code. 
> 
> I will also add it in the regression run (but with a limited simulation
> time), with some checks on the first and last elements and verify throughput
> properly increases with MCS, channel width, GI, ...

Agreed, thanks.
Comment 6 sebastien.deronne 2016-12-27 03:32:01 UTC
Pushed in changeset 12473:1bee1229dc9e