• No results found

Energy-aware offloading design

4.3 System Design

4.3.3 Energy-aware offloading design

We propose an energy-aware offloading algorithm to assist MADNet in making offloading decision. As illustrated in Algorithm 1, MADNet utilizes candidate APs APset suggested by ANT algorithm as the input for the

energy-aware offloading algorithm to select the most energy efficient WiFi AP APtarget for traffic offloading. For each execution of the algorithm, the

maximum saving Savemax is initialized to 0 and APtarget is set to ‘NULL’.

Regarding data transmission, WiFi is generally more energy efficient than 3G [130], but offloading mobile traffic to WiFi introduces extra en- ergy consumption, such as to obtain location information and to associate with the WiFi APs that are predicted to be available. MADNet performs traffic offloading only when using WiFi for transferring data (instead of through 3G networks) saves more energy than the extra energy consump-

Algorithm 1 Energy-Aware Offloading Algorithm.

Require: The candidate APs APset predicted by ANT algorithm.

Require: The power of data transfer P3G for 3G and PW for WiFi.

Require: The head and tail energy ET of 3G and Eoo for the offloading

related overhead.

1: for each AP ∈ APset do

2: Predict the throughput B3G for 3G network and estimate the off-

loading capacity CW and throughput BW of this AP .

3: Predict the prefetching capability F of this AP .

4: Calculate the WiFi offloading duration CW/BW and the time to re-

ceive the same amount of data through 3G network CW/B3G.

5: if F ≥ CW and the following inequality holds

ET + P3G· CW/B3G > k · Eoo+ PW · CW/BW (4.1)

then

6: if the saving gap (ET + P3G· CW/B3G− k · Eoo− PW · CW/BW)

is greater than the maximum saving Savemax

then

7: Update Savemax and APtarget for this AP

8: end if

9: end if

10: end for

11: Offload mobile data traffic to the selected APtarget.

tion overhead. For energy saving, Smart-Client only scans WiFi when it is necessary (i.e., guided by the Cellular-Agent).

We describe this requirement rigorously in the inequality (4.1) of Algo- rithm 1, where k is a parameter to accommodate measurement errors. For small values of k, the estimation errors may cause more energy consump- tion on smartphones due to offloading. On the other hand, we may lose some offloading opportunities if k is too large. For experiments, we set k to be 1.1 tentatively in order to investigate the gains of WiFi offloading.

The energy-aware offloading decision is affected by the throughput of 3G and WiFi networks. For the measurement study of Wiffler [5] in Amherst, the downlink median TCP throughput is 600 Kbps for 3G and 280 Kbps for WiFi. In this case, although offloading 3G traffic to WiFi networks can reduce 3G usage, it may cause more energy consumption on smartphones, as indicated in our measurement study (Section 4.2.1). In another mea- surement study by Deshpande et al. [102], WiFi offers substantially higher

median throughput than 3G, ∼2000 Kbps vs. ∼500 Kbps, respectively 9. For this scenario, WiFi-based offloading may potentially reduce the energy consumption of smartphones.

For calculating the energy saving, we need to know the predicted through- put of the 3G network B3G and the WiFi offloading capacity CW (i.e., the

number of bits we can offload to WiFi). Through an eight-month mea- surement study, Yao et al. [124] show strong correlation between cellular throughput and location for 3G HSDPA networks, and thus it is feasible to estimate 3G throughput for a specific location (e.g., WiFi offloading area) by using the history record of 3G throughput of the location. As pointed out in Wiffler [5], we can also estimate the offloading capacity and throughput of WiFi networks using existing work like BreadCrumbs [86].

Because MADNet utilizes prefetching to assist WiFi offloading, the maximum prefetching capability F for a WiFi AP is defined as the prod- uct of the prefetching duration and the available backhaul throughput of this WiFi AP (i.e., from server over Internet to AP). The prefetching dura- tion is the period from the moment WiFi-Agent starts to prefetch content according to the notification from Cellular-Agent till the expected time Smart-Client dissociates from the WiFi AP (i.e., moving away from the WiFi coverage). The value of F is maintained by Cellular-Agent for each MADNet-enabled WiFi AP. Cellular-Agent pulls such information from WiFi-Agent after every offloading session and records it for each specific Smart-Client. For bootstrapping, MADNet sets F to a pre-defined max- imum value. To better utilize the capacity of a WiFi link, the result of the offloading decision will be negative if this prefetching capability F is smaller than the estimated offloading capacity CW. In this case, MADNet

will still prefer using cellular connection.

To calculate the saved energy, we estimate the CW/B3G and CW/BW.

For bootstrapping, we use pre-defined historic values for CW, B3G, and

BW. MADNet updates those values by collecting them regularly from

WiFi-Agent and Smart-Client after every offloading session. Due to the radio resource control of cellular networks, after transmitting or receiving a packet the 3G radio stays at high power state and drops to low power only when the interface has been inactive for several seconds [130]. This state transition also introduces significant head (from low power to high at the beginning) and tail (from high power to low at the end) energy, which is considered as ET in (4.1) of Algorithm 1.

9

The contradictory results reported in the above studies may be caused by the fact that Wiffler [5] used an 802.11b radio for all the experiments, which limits the maximum PHY bitrate to be 11 Mbps.

Since it is important to keep the existing data flows uninterrupted to guarantee consistent service experience in traffic offloading, MADNet checks the workload status on Smart-Client for both offloading initia- tion and termination. For data flows sensitive to connectivity interruption, MADNet follows the principle in the initiation phase to keep using the ex- isting channel (e.g., 3G) until the ongoing flows complete and then offload new flows to the new channel. For flows that can tolerate connectivity inter- ruption, MADNet postpones the data transmission for a pre-defined delay tolerance threshold and then offloads the ongoing flows to the new channel once the connectivity is established. To terminate the offloading connection and switch back to 3G, MADNet adopts the ‘fast switching’ technique [5], which enables efficient connectivity switch to 3G when facing poor WiFi condition. In this regard, the prior research on handover mechanisms have provided guidance for seamless migration from one access network to an- other [55], [63]–[68], [81]–[84], which are valuable supplements to MADNet. We note that our approach assumes that 3G and WiFi interfaces keep at the same data reception power level during the data transfer. This is reasonable for 3G interfaces but conservative toward WiFi as the moving speed of an end user affects the power level of WiFi interfaces [19]. Our approach relies on the collected average values of CW and BW, and mainly

provides an estimation for the actual energy saving.

In a nutshell, MADNet avoids the offloading of mobile data traffic to WiFi networks in poor condition and enables smartphones to select the most energy efficient WiFi AP if possible. It adopts data prefetching at WiFi APs, which can further improve the utilization of WiFi access, thereby reducing energy consumption on smartphones. We also note that the per- formance of streaming applications is not affected by these offloading de- cisions, because when offloading is not possible or feasible (e.g., caused by incorrect mobility prediction) MADNet relies completely on cellular con- nection for data transfer.

4.4

Implementation and Experiments

We develop a prototype for our MADNet energy-aware offloading to explore the benefits of WiFi-based traffic offloading for smartphones, and evaluate its performance with smartphones in motion.