Wireless Throughput Testing Guide

https://supportforums.cisco.com/document/12455331/wireless-throughput-testing-guide


Introduction

This document describes the steps to correctly perform throughput Wireless speed testing.

Testing the maximum speed that can be achieved over Wireless networks will be depending on a variety of factors that will be discussed in this article.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

The information in this document is based on these software and hardware versions:

  • Cisco Wireless LAN Controller 2504 - Version 7.6.130.0
  • Cisco Wireless Lightweight 3702 Access Point in FlexConnect Local Switching mode.
  • Gigabit Cisco Ethernet Switch - Cisco IOS 12.2.55
  • MacBook Pro Retina 2014 with Broadcom BCM43xx Chipset - OS X
  • Gigabit Ethernet Wired Laptop - Windows XP

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Configure

Network Diagram

Network Diagram

Preparing the test environment

The most crucial and important step to obtain accurate and correct Wireless throughput testing is the setup on which you are going to perform the test. There are a lot of things to take into consideration when performing such a test and the variables can influence the results dramatically

Before laying out the setup and how to prepare it, let us have a quick look at the different wireless protocols and announced speeds that they can achieve:

  • 802.11b: The 802.11b standard has a maximum raw data rate of 11 Mbit/s.
  • 802.11g: It operates at a maximum physical layer bit rate of 54 Mbit/s exclusive of forward error correction codes, or about 22 Mbit/s average throughput.
  • 802.11a: It operates in the 5 GHz band with a maximum net data rate of 54 Mbit/s, plus error correction code, which yields realistic net achievable throughput in the mid-20 Mbit/s.
  • 802.11n: It operates at a maximum net data rate of 600 Mbit/s. Channel width support of up to 40 Mhz.
  • 802.11ac Wave 1: It operated at a maximum net data rate of 1300 Mbit/s. Channel width support of up to 80Mhz.
  • 802.11ac Wave 2: to be release will be support channel with of up to 160 Mhz.

In this document we are going to test 802.11ac Wave1.

Below are the steps to correctly setup a Wireless throught test environment:

1) Prepare the Wireless Client: Whether you are going to test with a Laptop, a PC with Wireless NIC or with a Handheld phone or tablet. The first thing that you need to look at is the Wireless chipset. If you want to test 802.11ac, then you need to make sure that the chipset is 802.11ac capable. You need to look at the chipset vendor and ensure you are having the latest drivers installed. Having the latest drivers installed does not mean that you are bug-free. 802.11ac is in Wave 1 and different manufacturers are continuously working towards improving the speeds that their chipsets are able to achieve.

In case you are using a USB WIFI 802.11ac NIC card, then you need to make sure that the port on which you have plugged the USB NIC card is USB3. For example: USB 1.0 specified data rates of 1.5 Mbit/s (Low-Bandwidth) and12 Mbit/s (Full-Bandwidth). USB 2.0 was released in April 2000 (now called "Hi-Speed"), adding higher maximum signaling rate of 480 Mbit/s (due to bus access constraints the effective throughput is limited to 35 MB/s or 280 Mbit/s). While USB 3.0 was released in November 2008. The standard defines a new SuperSpeed mode with a signaling speed of 5 Gbit/s and, due to encoding overhead, usable data rate of up to 4 Gbit/s.

So for example, in case you want to test 802.11ac or 802.11n with a USB NIC Card plugged to a USB1 port then your test is invalid because your throughput is going to drop on the USB port itself.

2) Prepare the Access Point and its mode: In this example we are using the Cisco 3700 802.11ac AP. The AP will be connected to a Gigabit Ethernet 1000Mbit/s switchport. This is eventually very important, because if we plug the AP to a 10/100Mbit/s switchport then our 802.11ac test will be invalid. The throughput will drop on the AP switchport connection.

AP operational mode is also important. In this guide we have configured the AP in flexConnect Local Switching mode. This is done in order to terminate the Wireless Client traffic against which we will measure the throughput on the local Switch itself. In case the AP is operating in Local Mode, then the obtained throughput will rely on the Network Cloud between the AP and the WLC. In case there is a single point or connection that is congested or rate limiting is applied then our throughput results will return invalid. Make sure that no FlexACL or any other features that could interfere on Packet forwarding is interfering in the test.

3) Prepare the switch: In this example we are using an 8 ports Gigabit Ethernet Cisco Switch on which we have connected our 3700 AP, our 2504 WLC and our Server against which we will be simulating some traffic. All devices are connected via Gigabit Ethernet in Full duplex mode at 1000Mbit/s. There is no ACLs, rate-limiting, policing applied.

4) Prepare the Server: We do see in TAC customers getting wrong speed results because they ran a Wireless speedtest against the internet and reporting issues about the low Wireless throughput results they got. As highlighted previously on this document, throughput is depending on where the traffic is going to travel. In case you are testing 802.11ac against the internet then you need to ensure that between your test Client and test Server (on the internet) you are having 1000 Mit/s connections end to end without any congestion. That is eventually impossible. You will very rarely be able to achieve real 802.11ac results on the internet unless if the Internet server you are testing against has been Fiber connected with you.

5) Choose the WIFI Channel: Since we are testing 802.11ac speeds here, we are going to go with 80 Mhz channel width. We have ran a quick channel scan in our environment to make sure we are using the four least congested channels for this test and we have chosen channels 36, 40, 44 and 48. In Europe these channels are DFS free so that is also a plus to achieve most stability while running the tests. We are going to test in real life office environment and we are not going to test in shielded room to avoid too optimistic results which do not relate with real-life deployments and applications.

6) Choose the SSID: 802.11ac (and 802.11n) are only supported on open or AES encrypted SSIDs. For our test and in order not to compromise any security, we have configured an SSID with WPA2+AES and preshared Key management. WMM is enabled on the SSID. We also checked scan defer for all priorities and not just 4,5,6 under the advanced tab on the SSID to avoid off-channel scanning to interfere and affect our testing results.

7) Choose the IP addressing Layout: In our test we will have everything on a flat VLAN. Meaning the AP, the WLC, the Wireless Client and the Wired Server are all on the same VLAN for simplicity and to avoid any potential routing or switching issues that go beyond the purpose of this document and to keep it simple. We also keep this on a flat VLAN to exclude any NPU related processing on the switch itself outside of the Wireless speed benchmarking.

8) Choose the testing tool: In this test we are making use of IPerf which is a freeware application that can run under a variety of operating systems such as Windows, MAC OS and Linux. The application requires two machines where one acts as a listening Server and one as a sending Client. IPerf generates traffic from the Client side towards the Server side and the results are displayed on how much traffic we were able to send under a specific time window and what throughput was achieved.

You might be curious to choose another application like FTP for your testing. Or Windows file sharing. There is an important detail to highlight here. FTP relies on the disk read/write speed as well while Iperf does not since it is traffic handling on the NIC itself. So in case you are having some really old IDE type Hard Drive on your Server side results will be affected in a negative way. Windows file sharing also can have varying speeds depending on Microsoft proprietary file transfer protocol which lower down the speeds in certain cases. So the bottom line for this is to use IPerf for throughput testing.

9) Choose the AP location: Consider a normal distance between your wireless client and the Access Point. Ideally this should be around 2 meters (6 feet) with clear line of sight between the test client and the AP. Avoid having obstacles or metal plates between your wireless Client and your AP. Last but not Least ensure the AP have the correct number of Antennas plugged in and make sure that on the Radio configuration page, all Antennas have been selected

10) Pay attention to cables: Using good ethernet cables would make a lot of difference. So be sure that the cables you are using are in good shape. And ensure the cable is having 8 pins connected and not just 4.

11) Calibrate the switch ports: It is a big plus if you can calibrate and benchmark the switch ports on which you are going to perform the Wireless throughput test. So in case you have your Iperf Server on Gig0/1 and you FlexConnect 802.11ac AP on Gig0/2. Then disconnect the AP from Gig0/2 and plug in another PC with Gigabit connection. Run the Iperf test first of all on Wired end-to-end so you can benchmark the maximum you expect to get without any Wireless being involved. If you see something like 80Mbps then you know there is already something wrong even before making use of Wireless.

Begin the test

1) Download IPerf and install it on both the wireless Client and the Wired Server.

2) Connect the Wireless Client to the test SSID and ensure that it has connected with 802.11ac speed .

Connection Information

 

3) On the Server PC from Command prompt run this command:

Iperf ­-s ­w 1024k

4) On the Client run this command:


iperf -c <ip address of Server> -w 1024k -t 30

Example:

$ ./iperf -c 192.168.1.184 -t 30 -w 1024k -P 5
------------------------------------------------------------
Client connecting to 192.168.1.184, TCP port 5001
TCP window size: 1.00 MByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
[  4] local 192.168.1.185 port 61778 connected with 192.168.1.184 port 5001
[  8] local 192.168.1.185 port 61782 connected with 192.168.1.184 port 5001
[  7] local 192.168.1.185 port 61781 connected with 192.168.1.184 port 5001
[  5] local 192.168.1.185 port 61779 connected with 192.168.1.184 port 5001
[  6] local 192.168.1.185 port 61780 connected with 192.168.1.184 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-30.0 sec   283 MBytes  79.2 Mbits/sec
[  7]  0.0-30.0 sec   265 MBytes  74.0 Mbits/sec
[  6]  0.0-30.0 sec   282 MBytes  78.9 Mbits/sec
[  8]  0.0-30.0 sec   152 MBytes  42.5 Mbits/sec
[  5]  0.0-30.0 sec   262 MBytes  73.2 Mbits/sec
[SUM]  0.0-30.0 sec  1.21 GBytes   348 Mbits/sec

 5) The results we got in our tests for 802.11ac was around 400Mbit/s ~ 450Mbit/s

Below we will highlight some snapshots and pictures form our configuration:

 

Home page of WLC

 

Screen Shot 2014-10-09 at 14.03.17.png

Screen Shot 2014-10-09 at 14.04.37.png

Screen Shot 2014-10-09 at 14.05.05.png

Screen Shot 2014-10-09 at 14.05.31.png

Screen Shot 2014-10-09 at 13.55.34.png

Screen Shot 2014-10-09 at 13.56.18.png

Screen Shot 2014-10-09 at 13.56.53.png

More Information

How to Improve Performance

Channel utilization—Network analyzers report channel utilization in percentage of time spent transmitting and receiving frames. This helps to measure the potential variance in speed due to distance from an access point. This will help monitor and see for example, if a channel is fully occupied transmitting at 1Mbps under ideal conditions would perform at 0.94Mbps under 100% utilization.

The physical medium used in wireless as well dictates the performances. Using 802.11g or 802.11a over 802.11b offers much higher throughputs, often up to 30 mbps over 802.11b where a 6mpbs radio capacity is divided between all the associated stations.

Cell Sizes—It is recommended to shrink the cell sizes to have the clients as closer to the APs as possible. This will benefit the data rates at which the client can connect to the AP. This can be done by reducing the power levels on the AP to the lowest.

Shrinking cell size also decreases co-channel interference. If using RRM, the APs should pick channels dynamically per the deployment. However, if implementing dynamic channel assignment, ensure that you do not have two APs at high power levels on the same channel right next to each other.

Protection also causes throughput hit.

Reference


### 回答1: 在PyTorch中,可以使用`torch.utils.data.DataLoader`类和`torch.utils.data.Dataset`类来计算数据集的throughput。假设我们有一个数据集`my_dataset`,通过以下步骤计算数据集的throughput: 1. 创建`DataLoader`对象: ``` from torch.utils.data import DataLoader batch_size = 64 data_loader = DataLoader(my_dataset, batch_size=batch_size) ``` 2. 迭代数据集并计算throughput: ``` import time start_time = time.time() for batch_idx, (data, target) in enumerate(data_loader): # 在这里执行模型的前向传播和反向传播操作 # ... if (batch_idx + 1) % 10 == 0: elapsed_time = time.time() - start_time throughput = batch_size * 10 / elapsed_time print(f'Throughput: {throughput:.2f} samples/s') start_time = time.time() ``` 在上面的代码中,我们迭代数据集并执行模型的前向传播和反向传播操作。在每个epoch的末尾,我们计算通过10个batch所传输的数据量,并根据传输时间计算throughput。通过这种方式,我们可以得到数据集的throughput,以便评估我们的模型性能。 ### 回答2: PyTorch是一种基于Python的开源机器学习框架,其中包含了计算图、自动微分、并行计算等功能。在PyTorch中,通过计算图,可以构建各种神经网络模型,并进行前向传播和反向传播计算,以训练和优化模型。 在计算中,吞吐量(throughput)是指单位时间内完成的任务数量。对于PyTorch来说,通过一些技巧和优化可以提高模型的训练速度和计算效率,进而提高吞吐量。 首先,可以使用异步计算来提高吞吐量。通过将计算任务划分为多个子任务,可以在同一时间段内执行多个计算步骤,从而利用硬件资源的并行性。PyTorch提供了多线程和多进程的机制,可以在CPU和GPU之间进行任务划分和调度,实现异步计算,提高吞吐量。 其次,可以使用混合精度计算来提高吞吐量。混合精度计算是指在计算过程中,将部分数据使用较低精度(如半精度浮点数)进行计算,以减少运算量和内存占用。PyTorch中提供了自动混合精度计算的工具,可以自动优化模型和参数的精度,从而提高计算效率和吞吐量。 此外,还可以使用分布式训练来提高吞吐量。通过将模型和数据划分为多个部分,分发到多个计算设备上进行并行训练,可以大幅提高训练速度和吞吐量。PyTorch提供了分布式训练的工具和接口,可以方便地在多台机器或多个GPU上进行模型训练。 综上所述,通过使用异步计算、混合精度计算和分布式训练等技术和优化手段,可以提高PyTorch模型的计算效率和训练速度,从而提高吞吐量。这些方法可以根据具体需求和硬件资源进行选择和调整,以达到最优的性能表现。 ### 回答3: 在PyTorch中,可以通过多种方式计算模型的throughput(吞吐量)。通过计算throughput,可以衡量模型在处理输入数据时的速度。 一种计算throughput的常用方法是计算每秒处理的样本数。首先,需要确定一个时间窗口,在该窗口内统计模型处理的样本数量。然后,通过除以时间窗口的长度(以秒为单位),即可得到每秒处理的样本数。 在PyTorch中,可以使用torch.cuda.Event类来测量时间。可以在开始处理输入数据之前创建一个torch.cuda.Event对象,并在处理完成后记录结束时间。然后,可以使用elapsed_time()方法计算时间差。 以下是一个示例代码,用于计算模型的throughput: ```python import torch import time # 处理输入的函数 def process_input(input): # 模型处理输入的逻辑 pass # 创建cuda事件 start_event = torch.cuda.Event(enable_timing=True) end_event = torch.cuda.Event(enable_timing=True) # 定义数据样本大小和时间窗口长度 batch_size = 32 window_size_sec = 5 # 创建输入数据 inputs = torch.randn(batch_size, 3, 224, 224).cuda() # 开始测量时间 start_event.record() # 处理输入数据 for i in range(window_size_sec): process_input(inputs) # 结束测量时间 end_event.record() torch.cuda.synchronize() # 计算时间差 elapsed_time_ms = start_event.elapsed_time(end_event) # 每秒处理的样本数量 throughput = batch_size * window_size_sec / (elapsed_time_ms / 1000) print(f"模型的吞吐量为: {throughput} samples/sec") ``` 在上述代码示例中,我们首先通过torch.cuda.Event创建了两个CUDA事件对象,分别用于记录开始时间和结束时间。然后,我们定义了数据样本的大小和时间窗口的长度。接下来,我们通过torch.randn方法创建了输入数据,并将其移动到GPU上进行处理。 然后,我们使用start_event.record()记录开始时间,使用process_input函数处理输入数据。为了模拟真实情况,我们通过循环多次处理输入数据,以达到时间窗口的长度。 最后,我们使用end_event.record()记录结束时间,并使用torch.cuda.synchronize()确保测量时间的准确性。然后,我们使用start_event.elapsed_time(end_event)方法计算时间差。 最后,我们通过每秒处理的样本数量公式(样本数量=批量大小 * 时间窗口长度)计算throughput,将结果打印出来。 通过以上方法,我们可以计算出PyTorch模型的throughput,以衡量其处理输入数据的速度。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值