Mobile Cloud Computing: Offloading Mobile Processing to the Cloud

,


Introduction
Lately, recent trends aim towards the integration of huge variety of functionality and applications within a mobile device, which means mobile devices are directly affected by two main factors: battery life limited by energy consumption and processing time limited by poor mobile resources. Additionally, the limited hardware capability in current mobile devices is an obstacle to supporting the increasing high-processing demands of the latest applications and of future developments.
Energy and response times are two key design considerations across a spectrum of computing solutions, from supercomputers and data centers to handheld phones and other mobile devices (Ranganathan, 2010). Low power consumption, energy efficiency and performance have been critical concerns for developing electronic devices such as personal computers and mobile devices, and this importance seems to be increasing (Miettinen, 2010).
While the most energy-efficient setup for many current mobile applications is local computing, there clearly are workloads that can benefit from moving to remote infrastructures (Miettinen, 2010) due to these workloads demand higher computing resources. An obvious solution to the resource constraint on mobile devices is to offload computation. Therefore, offloading mobile processing could mean an effective solution to overcome the limited resources on mobile phones. However, when using this approach, the critical aspect for mobile clients is the trade-off between energy consumed by computation and the energy consumed by communication (Miettinen, 2010). In addition, there are many concerns when offloading data to remote infrastructures such as data delivery, standard interface, trust, security, privacy (Mandeep, 2015) and reliability on the wireless network as well as on remote infrastructure service availability.
Currently, there is a new set of services being widely implemented in the computer field that are able to perform computing-intensive tasks remotely with a lower cost of energy consumption on the mobile system and a shorter response time, namely, Cloud Computing Services.

Android Mobile OS
Android, one of the most popular mobile operative systems powers hundreds of millions of mobile devices around the world. The mobile OS utilizes a Linux based kernel; it implements its permission based security model and most of its code is under Apache License. Unlike on other mobile operating systems like Apple's iOS, Palm's WebOS or Symbian, Android applications are written in Java and run in virtual machines (Brahler, 2010). Therefore, Android has a broad Java library support (Java.io, Java.security, Java.net, Java.sql). In addition, Android uses its own VM; the Dalvik VM, see Figure 1. The Dalvik VM manages garbage collection, memory in a per-app cap size and allows sharing core libraries through a methodology called The Zygote. The Zygote is an approach that enables both sharing of code across VM instances and providing fast startup time of new VM instances. The Zygote design assumes that there are a significant number of core library classes and corresponding heap structures used across many applications. Generally, these core library classes are read-only and are therefore a good candidate for preloading and sharing across processes. In other words, this is data and classes that most applications use but never modify. These characteristics are exploited to optimize sharing of this memory across processes (Ehringer, 2010).

Amazon EC2
Amazon EC2 is an IaaS cloud service that provides resizable computing capacity in Amazon Web Services Cloud (AWS). EC2 allows launching as many virtual machines as needed, configure security and networking, and manage storage. EC2 enables to scale up or down to handle changes in requirements or spikes in popularity, reducing needs to forecast traffic, see Figure 2. Amazon EC2 provides a web-based interface that allows users to configure their environment, virtual machines, operative systems, memory, storage and even the data center location so virtual machines can be deployed closer to the service target. Amazon EC2 also supports several instance types including micro, high CPU, high memory, cluster GPU, cluster compute, high memory cluster and high I/O instances (Bhagavathi, 2013).

Microsoft Windows Azure
Azure is an Internet-scale cloud computing and services platform hosted in datacenters created by Microsoft Corp. An open and flexible cloud platform that provides a web-based console that allows user to create and manage cloud services, virtual machines as well as to configure networking, create security policies, administer storage, replication and so on, see Figure 3. It delivers a 99.95% monthly SLA and enables to build and run highly available applications without focusing on the infrastructure (Microsoft, 2013). A significant difference between Amazon EC2 and Windows Azure is that Azure has built in a network load balancer and resiliency to hardware failure. In this paper, we evaluate offloading two different workloads to two public cloud-computing platforms; Amazon EC2 and Microsoft Windows Azure as well as it is evaluated the performance when using Wi-Fi and 4G as communication links. On the cloud platform sides, small, medium and large VM instance types were created on both Amazon EC2 and Microsoft Windows Azure for performing these workloads and collecting information on response times and energy consumption on a mobile phone.
The remaining sections in the paper discuss the related works in section II, our experimentation in section III followed by results discussion in section IV and conclusions in section V.

Efficiency of Mobile Clients in Cloud Computing
Miettinen et al. in 'Energy efficiency of mobile clients in cloud computing' discussed the potential saving of mobile clients energy when offloading certain mobile workloads to the cloud. They also discussed the trade-off between energy consumed by computation and the energy consumed by the additional communication. They showed how the trade-offs are highly sensitive to the exact characteristics of the workload and data communication patterns.

Benefits of Offloading Mobile Computation
Kumar et al. in 'Cloud Computing for Mobile Users: Can Offloading Computation Save Energy?' stated that mobile cloud computing can enhance the computing capability of mobile systems and it is a possible solution for extending battery. They also discuss some factors in which mobile cloud computing may not be beneficial: privacy and security, and reliability and dependency on the wireless network and the cloud service.

Advances in Mobile Cloud Computing
Mirzoev et al. in 'Advances in Mobile Cloud Computing' stated that current mobile devices run high computation applications that tend to head up and drain battery power sooner. Additionally, they discussed that by allowing mobile devices to offload heavy processing to cloud systems, they can mimic traditional computer performance and enable devices to use less battery power, increase uptime and improve response times. Therefore, this computer framework dramatically improves the overall mobile computing experience.

Virtual Cloud Computing Provider for Mobile Devices
Huerta-Canepa et al. presented the guidelines for a framework to create virtual mobile cloud computing providers. They showed the feasibility of a new scheme of sharing mobile resources to perform common workloads among different mobile users. The power of this approach increases when there is a high availability of nearby devices with common goals/activities.

Workloads
We used two different workloads on three different experiments in order to determine their suitability to be offloaded to the cloud. Since the decision whether or not offload processing to the cloud depends mainly on two different workload characteristics; see Figure 4. We designed one light-communication / intensive-computation and one intensive-communication / intensive-computation workload. We executed three experiments, collected data and analyzed it in order to determine the suitability of offloading intensive-computation workloads to cloud computing providers.

Light-Communication/Intensive-Computation Workload
In this study, the Android app calculates the next prime number of a given Java long number (64KB) on both, phone and cloud platforms. The algorithm used locally is the same used on the Java server application running on the both cloud providers.
This workload was designed due the data to be transmitted to the cloud has not significant size, but computing a next prime number of a large number it is a computing-intensive process. Response times and energy consumption measures were collected in order to be compared and analyzed.

Intensive-Communication/Intensive-Computation Workload
In this study, a text file was generated by a developed Java application. The file structure consists in 16-characters alphanumerical indexes randomly generated next to their pairs a regular Java integer number www.ccsenet.org/cis Computer and Information Science Vol. 9, No. 1; 2016 ordered ascending. The Android app performs a sequential search algorithm which finds the matching pair for a given file index in this big text file on both phone and clouds platforms. The 16-characters alphanumeric file indexes were intentionally created to make the processing of comparing the given index to each file index a more computing-intensive process.
This workload was designed due the data to be transmitted to the cloud or performed locally is more communication-intensive as well as computing-intensive. Response times and energy consumption measures were collected in order to be compared and analyzed.

Methodology
This research evaluated the performance on a mobile device; a Samsung S3 phone, and two different cloud computing providers; Amazon EC2 and Microsoft Windows Azure as platforms for data-intensive computation.
The study performs and analyzes three experiments in order to determine the suitability of offloading certain workloads to the cloud. This research is done by obtaining response times and energy consumption on the mobile device when performing two different kinds of workloads; light-communication / intensive-computation and intensive-communication / intensive-computation. These studies reflect what workload characteristics are more suitable to offload to the cloud.

Local vs. Remote Processing Comparison
In this study, the mobile app performed both workloads locally on the Android mobile phone as well as it offloaded them to three different VMs sizes on both Amazon EC2 and Windows Azure. Response times and energy consumption measurements were both collected while performing local and remote processing.
Based on these measurements, T-Test statistical analysis was performed in order to determine what kinds of workloads are more suitable to be offloaded to the cloud.
The mobile phone specifications and Cloud Computing providers VMs specifications are shown in Table 1, 2 and 3.

.2 Mobile Memory Saturation Breakpoint
The goal of this study was to find a breakpoint where the mobile app could not handle workloads due their size exceeds the app memory heap size assigned by the Dalvik VM. This was performed by varying intensive-communication / intensive-computation workloads to a large VM on Amazon EC2 using both Wi-Fi and 4G. The workloads consisted in different data file size (1MB, 10MB, 25MB, 42.5MB and 45MB)

Amazon EC2 vs. Microsoft Windows Azure
The goal of this study was to compare response times and energy consumption measurements collected by offloading mobile workloads to Amazon EC2 and Microsoft Windows Azure. Based on these measurements, T-Test statistical analysis was performed in order to determine what cloud platform performed better.

Metrics
Response times were measured in milliseconds for each experiment. Locally speaking, it is time it took the mobile app while performing the assigned task. Remotely, it is the time it took from offloading the assigned workload, processing it and obtaining the result back from the cloud provider. The final response time measurements are an average of performing the experiment five times under similar conditions in order to obtain a more accurate value.
Energy consumption values were measured in mAh for each experiment. Locally speaking it is the energy consumed by the app while performing the assigned task. Remotely, it is the energy consumed by the app when offloading the assigned workload, processing it and obtaining the result back from the cloud provider. The final energy consumption measurements are an average of performing the experiment five times under similar conditions in order to obtain a more accurate value.

Results Analysis and Discussion
The previous studies captured fair amount of data for analysis, comparison and to determine what kinds of workloads are more suitable to be offloaded to more powerful computing platforms. A statistical analysis was performed on the obtained results using the T-TEST.
In the first study, T-TEST consumed two datasets as inputs; one for Local execution and one for Amazon EC2 or Windows Azure for both response times and energy consumptions on each VM size.
In the second study, T-TEST consumed two datasets as inputs; one for Amazon EC2 and one for Windows Azure for both response times and energy consumptions on each VM size. The result of this test is a p-value where p < 0.05 indicates statistically significant difference between data sets.

Light Communication / Intensive Communication
While most of the p values are not significant (p>0.05) for overall data set when comparing local computation with Amazon EC2 and Azure, there is a significant difference in computing time and energy consumption when the workload is more computing-intensive. This is supported by collected data as well as for the plotted graphics, as seen in Figures 5 and 6. The reason is that there is a communication penalty in response times and energy consumption when offloading this kind of workload to both cloud computing platforms using Wi-Fi or 4G. Results indicated that it is up to 28 times faster and it saves up to 37 times more energy on the mobile phone when the workload is more computing-intensive and it is offloaded to either cloud platform, see Table IV.
The results indicate the suitability of the cloud for computing-intensive workloads. Most of the p values are significant (p<0.05) for overall data set when comparing local computation with Amazon EC2 and Azure. Only when using 4G and small virtual machines the P-values are not significant due this poor configuration. Therefore, there is a significant difference in computing time and energy consumption when offloading this kind of workloads, see Figures 7 and 8. After using Wi-Fi and a large VM on EC2, the response time is up to 1.6 times faster and there is a 53% of energy saving on the mobile device, See Table V. The results indicate the suitability of the cloud for computing-intensive workloads.

Mobile Memory Saturation Breakpoint
After offloading a varying intensive-communication / intensive-computation workload to Amazon EC2 using Wi-Fi and 4G, a breakpoint found shows that there are certain workload sizes not suitable to be offloaded due loading them into memory could exceed the assigned memory heap size causing that the app crashes. After transmitting different file sizes, the results show that the app performs well when transmitting file sizes below 42.5 MB over any communication link, see Figure 9. When trying to transmit files over 42.5 MB the app misbehave; it crashes due it reaches its memory heap size. Moreover, when the app tries to allocate more memory the Android memory manager kills the app throwing an out of memory error. Therefore, the memory heap size assigned by the Dalvik VM for an app is a very important factor when deciding to offload certain workload.
Additionally, it is vital to clarify that heap size is device-dependent and the Dalvik VM increases it on demand until it reaches its maximum assigned memory size. Although it is possible to manually set the maximum heap size in runtime it is strongly not recommended due it may degrade the overall system performance as well as turn other apps to become unstable.

Amazon EC2 and Microsoft Windows Azure
While most of the p values are not significant (p>0.05) for overall data set when comparing Amazon EC2 to Microsoft Windows Azure, there is a slightly significant difference in computing time and energy consumption when offloading to Amazon EC2,see Figures 10,11,12 and 13.
Based on the previous measurements, Microsoft Windows Azure response times are slightly higher than the ones on Amazon EC2. Therefore, it also means that energy consumption tends to be higher when performing processing on Microsoft Windows Azure.

Wi-Fi vs. 4G
After collecting and analyzing all the previous response times and energy consumption measures offloading workloads to both cloud providers using Wi-Fi and 4G, the outcome was that Wi-Fi produces significant better response times and saves more energy compared to using 4G for the two different intensive-communication workloads on both cloud computing platforms, see Table VI . The reason is that transmission time over Wi-Fi takes less than transmitting over 4G.

Conclusions
This paper benchmarked the benefits in response times and energy consumption when offloading mobile computing-intensive workloads to Amazon EC2 and Windows Azure using Wi-Fi and 4G network technologies. Therefore, two different workloads impacting the possible decision were used to determine the suitability of offloading processing.

Local vs. Remote Processing Comparison
There appeared to be a significant benefit in response time and energy consumption when processing computing-intensive workloads on the cloud due these remote platforms can be performed them faster no matter the trade-off between energy consumed by computation and the energy consumed by communication. Additionally, it is vital to remark that the workload size is a determining factor when deciding whether or not offloads, no due the transmission time, but for the constraint given for the assigned memory heap size that doesn't allow allocating more memory than the assigned by the Dalvik VM per app. Although it is possible to manually set the maximum heap size in runtime it is strongly not recommended due it may degrade the overall system performance as well as turn other apps to become unstable.

Amazon EC2 vs. Microsoft Windows Azure
While the T-Test statistical analysis didn't determine any significant difference between Amazon EC2 and Windows Azure for overall data set there appeared to be slightly better response time and energy consumption in Amazon EC2 compared to Windows Azure.

Wi-Fi vs. 4G
There appeared to be that Wi-Fi produces significant better response times and saves more energy compared to using 4G for the two different intensive-communication workloads on both cloud computing platforms. The reason is that transmission time over Wi-Fi takes less than transmitting over 4G.
For future work this research can be taken as base to execute similar tests on different cloud providers, more powerful VMs, mobile devices, mobile OS, and more computing-intensive workloads. This research can also be used as reference for developing a middleware interface that automatically and transparently makes the decision whether or not offload mobile processing using the conclusions of this research as start point.

Copyrights
Copyright for this article is retained by the author(s), with first publication rights granted to the journal.
This is an open-access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).