Академический Документы
Профессиональный Документы
Культура Документы
State Key Laboratory of Software Development Environment, School of Computer Science and Engineering, Beihang University, Beijing 100191, China
School of Computer Science, University of Oklahoma, Norman, OK 73019-6151, USA
art ic l e i nf o
a b s t r a c t
Article history:
Received 10 November 2012
Received in revised form
1 March 2013
Accepted 8 March 2013
Available online 15 March 2013
Mobile applications are becoming increasingly ubiquitous and provide ever richer functionality on
mobile devices, while such applications drain increasingly more battery power of mobile devices.
Ofoading some parts of the application running on mobile devices onto remote servers/clouds is a
promising approach to extend the battery life of mobile devices. However, as data transmission of
ofoading causes delay and energy costs for mobile devices, it is necessary to carefully design application
partitioning/ofoading schemes to weigh the benets against the transmission delay and costs. Due to
bandwidth uctuations in the wireless environment, static partitionings in previous work are unsuitable
for mobile platforms with a xed bandwidth assumption, while dynamic partitionings result in high
overhead of continuous partitioning for mobile devices. Therefore, we propose a novel partitioning
scheme taking the bandwidth as a variable to improve static partitioning and avoid high costs of dynamic
partitioning. Firstly, we construct application Object Relation Graphs (ORGs) by combining static analysis
and dynamic proling to propose partitioning optimization models. Then based on our novel executiontime and energy optimization partitioning models, we propose the Branch-and-Bound based Application
Partitioning (BBAP) algorithm and Min-Cut based Greedy Application Partitioning (MCGAP) algorithm.
BBAP is suited to nding the optimal partitioning solutions for small applications, while MCGAP is
applicable to quickly obtaining suboptimal solutions for large-scale applications. Experimental results
demonstrate that both algorithms can adapt to bandwidth uctuations well, and signicantly reduce
application execution time and energy consumption by optimally distributing components between
mobile devices and servers.
& 2013 Elsevier Ltd. All rights reserved.
Keywords:
Mobile applications
Energy saving
Application partitioning
Bandwidth-adaptive
Weighted object relation graphs
1. Introduction
As mobile devices have become more powerful and affordable,
they are increasingly becoming the most popular computing
platform. However, as mobile devices have increasingly powerful
capabilities and ever richer functionality, battery capacity has
become the bottleneck for further proliferation of mobile applications (Banerjee et al., 2007; Li et al., 2012). Recently, computation
ofoading in the mobile computing environment, which ofoads
parts of application codes from mobile devices onto remote
servers, has become a promising approach to ease the energy
This work was supported by the Research Fund of the State Key Laboratory of
Software Development Environment under Grant no. BUAA SKLSDE-2012ZX-17, the
National Natural Science Foundation of China under Grant nos. 61170296 &
60873241 & 61190120, the Program for New Century Excellent Talents in University
under Grant no. NECT-09-0028.
1084-8045/$ - see front matter & 2013 Elsevier Ltd. All rights reserved.
http://dx.doi.org/10.1016/j.jnca.2013.03.007
335
As mobile devices are becoming the primary computing platform for many users, object-oriented application partitioning has
attracted considerable interest among researchers. Some solutions
mainly rely on middleware tools (Ou et al., 2007) or programmers
(Kemp et al., 2010; Cuervo et al., 2010) to make partitions. The
work of Ou et al. (2007) depends on the ofoading middleware to
provide runtime ofoading services for resource-constrained
mobile devices. Kemp et al. (2010) provides a computation offloading framework for Android systems, where programmers
decide the parts of codes to be ofoaded. Similarly, MAUI
(Cuervo et al., 2010) also requires programmers to annotate the
methods which can be executed remotely as REMOTABLE. These
solutions are limited since they depend upon middlewares or
programmers to accomplish application partitioning. Therefore,
automatic partitioning methods were proposed to determine
application partitioning. For example, CloneCloud (Chun et al.,
2011) conducts code ofoading automatically at the thread
granularity.
The object-oriented application partitioning problem can be
cast as the Object Relation Graph (ORG) partitioning problem
(Wang and Franz, 2008). In some previous work (Dahm, 2000;
Messer et al., 2002), ORGs are constructed via purely static analysis
or purely dynamic proling methods. As purely static analysis
(Dahm, 2000; Spiegel, 2002) constructs ORGs which cannot
provide accurate information of applications (such as loop counts
and conditional branches in the application), a meaningful partitioning can rarely be achieved. However, purely dynamic proling
methods (Messer et al., 2002; Bialek et al., 2004) generate more
accurate but signicantly complex ORGs with mass unnecessary
system library classes, incurring high overhead of partitioning for
mobile devices. Hence, we propose to combine static analysis and
dynamic proling to construct Weighted Object Relation Graphs
(WORGs) with high accuracy and a manageable size for mobile
application partitioning.
As mobile devices usually use a wireless channel for data
transmission with the bandwidth changing frequently, static
application partitioning solutions (Wang and Franz, 2008;
Diaconescu et al., 2003, 2005), which compute communication
costs ofine and adopt partitioning schemes ignoring bandwidth
uctuations, are unsuitable for mobile platforms. Therefore,
dynamic partitioning approaches (Xian et al., 2007; Chun and
Maniatis, 2010) were proposed to determine the application
partitioning in runtime. Xian et al. (2007) proposed to collect the
statistics of computation time and dynamically obtain the optimal
ofoading decisions online. Chun and Maniatis (2010) introduced
the notion of dynamic application partitioning between weak
devices and clouds to better support applications running on
diverse devices in different environments. However, there are
serious challenges on system support for dynamic partitioning
and it also results in high costs of determining the partitioning in
runtime. Targeting these problems, we propose execution-time/
energy-cost optimization partitioning models where the bandwidth is considered as a variable and two bandwidth-adaptive
application partitioning algorithms.
Figure 1 shows the workow of bandwidth-adaptive application partitioning. First of all, we construct the corresponding
Weighted Object Relation Graph (WORG) of the mobile application
via static analysis and dynamic proling. Then, taking bandwidth
changes into consideration, we build partitioning models for
execution-time/energy optimization. Based on the partitioning
336
337
Fig. 3. ORG and WORG of the Java example. (a) ORG and (b) WORG.
Table 1
Notations of partitioning models.
Labels
Parameters
n
xi
X
X
b (kb/s)
bl (kb/s)
Pbbl
Pc
XP
a
k
Wij (Byte)
tnli (s)
tnsi (s)
tij (s)
TX,b (s)
Ei (J)
Eij (J)
Pcpu (W)
Pw (mW)
EX,b (J)
TLocal (s)
ELocal (J)
wt
we
WX,b
Current bandwidth
The largest bandwidth value which is subject to Pbbl P c
Probability that the bandwidth is not less than bl
Threshold probability
Model solution space
Empirical constant to limit the upper bound of the model value WX,bl
Ratio of execution-time for a node running locally to running remotely
Transmission data between node i and node j when one runs on mobile devices and the other on servers
Local execution time of node i running on mobile devices
Remote execution time of node i running on servers
Transmission time between node i and node j
Execution time of partitioning X under the bandwidth of b
Energy consumption of node i running locally on mobile devices
Energy consumption of data communication between node i and j
CPU power of mobile devices
Sending and receiving power of Wi-Fi interfaces
Energy consumption of partitioning X under the bandwidth of b
Execution time when the whole application runs locally
Energy consumption when the whole application runs locally
Weight of execution time in the partitioning model
Weight of energy consumption in the partitioning model, satisfying wt we 1
Weighted model value of partitioning X under the bandwidth of b
X P fXjTX,bl TX opt
,bl 1 ag
b
where TX opt
,bl is the corresponding application execution time of
b
l
jxi xj j t ij
1i o jn
,bl 1 a. Since
width bbl , we have TX ,bTX ,bl TX opt
b
l
That is, when the bandwidth varies from the current value b to the
lower bandwidth bl, the optimal partitioning X can satisfy the
constraint condition in XP with the threshold probability of Pc.
338
1i o jn
jxi xj j Eij
locally, E , We .
Eij t ij P w
10
t ij
W ij =b
vi V 1 vj N 2
14
vi V 2 vj N L
wij
15
vi V 1 vj N 2
t ij W ij =b
vi V 2 vj NL
vi V 2 vj NL
16
vi V 2
11
t ij t ij
vi V 1 vj N 2
vi V 2
12
vi V 2
wij
17
vi V 1 vj N 2
where WX opt
,bl is the corresponding model value of the optimal
bl
partitioning X opt
under the bandwidth of bl. The empirical constant
bl
a (a > 0) limits the model value WX,bl to the upper bound
WX opt
,bl 1 a. With the bandwidth ranging from b to bl, just
bl
as it does for the execution time optimization model, it also holds
that
13
F we c,vi
vi V 2
wij
18
vi V1 vj N2
Therefore,
TX,b T Local FV 1 ,V 2
19
(2) For the energy optimization model, the difference from the
execution time optimization model of WORG construction is that,
we c,vi and wij are replaced by
we c,vi W ij =b P w t nli P cpu
20
wij W ij =b P w
21
vj N L
Eij Eij
vi V 1 vj V 2
22
vi V 2 vj NL
Eij
vi V 1 vj V 2
W ij =b P w
vi V 1 vj V 2
wij
vi V 2 vj NL
23
vi V 1 vj V 2
vi V 2 vj N L
24
vi V 2
vi V 2
wij
vi V 1 vj V 2
25
wij
26
vi V 1 vj N 2
27
339
then
we
have:
C 2b fvjvC b vSB g,
Proof. With
C 1b fvjvC b vC B g,
1
2
Sb fvjvSb vC B g, Sb fvjvSb vSB g, then we have
340
32
33
28
29
30
>p
Eb S1b ,C 1b p EB S1b ,C 1b
> p ES1b EB S1b ,S2b EB S1b ,C 2b
> ES1b Eb S1b ,S2b Eb S1b ,C 2b
T B S1b ,C 1b
34
31
35
Sb D SB
36
5. Evaluation
In this section, we present an evaluation of the performance of
ORG construction in Section 5.1 and the performance of partitioning algorithms in terms of execution time and energy consumption
in Section 5.2.
5.1. Construction of weighted object relation graph
In this subsection, we present the evaluation of ORG construction by comparing the performance of Purely Static Program
Analysis based Construction (PSPAC), Purely Dynamic Program
Analysis based Construction (PDPAC) and our Combined Static and
Dynamic Program Analysis based Construction (CSDPAC)
described in Section 3.2. PSPAC constructs ORGs with only the
static analysis method while PDPAC constructs ORGs with only the
dynamic proling. With the Soot framework and bytecode rewriting, we evaluate the performance of the ORGs constructed by
CSDPAC, PSPAC and PDPAC on a set of Dacapo Benchmarks. The
testbed is the ThinkPad X201i notebook with 3.0 GB memory,
2.53 GHz CPU frequency, and the Ubuntu10.10 operating system.
The benchmark suite is intended as a tool for Java benchmarking, which consists of a set of open source, real world applications
with non-trivial memory loads. We choose eight different benchmarks covering both small and large scale applications shown in
Table 2 to evaluate our ORG construction. Table 2 gives the
description of ORGs constructed by CSDPAC, PSPAC and PDPAC.
We can observe that ORGs constructed by CSDPAC and PSPAC are
smaller in size than those constructed by PDPAC. The reason is that
ORGs can be cut down into manageable size via static analysis of
CSDPAC and PSPAC. However, PDPAC obtains more application
information including mass unnecessary system library classes by
purely dynamic analysis, resulting in extremely complex ORGs and
high overhead of partitioning.
Table 3 shows the comparison of application's actual execution
time and predicted execution time by CSDPAC, PSPAC and PDPAC.
We predict application execution time according to application
Bytecode Instructions Count (BIC) (Binder and Hulaas, 2006). If the
Predicted Execution Time (PET) is closer to the Actual Execution
341
Table 2
ORG sizes comparison of CSDPAC, PSPAC and PDPAC.
Programs Classes Methods CSDPAC
avrora
h2
luindex
lusearch
pmd
sunow
tomcat
xalan
8812
10 264
6530
7812
12 673
9796
9760
11 074
22 240
14 494
8199
10 148
17 360
12 506
12 446
14 933
PSPAC
PDPAC
Nodes Edges
Nodes Edges
Nodes
200
4900
1027
1238
2312
2615
2718
1896
208
4912
1027
1238
2320
2615
2718
1896
5430
11 088
6199
7148
9360
8506
8246
9347
Edges
Table 3
Program AET and PET comparison of CSDPAC, PSPAC and PDPAC.
Programs AET
(ms)
avrora
h2
luindex
lusearch
pmd
sunow
tomcat
xalan
6414
34 964
7266
1887
5125
9733
7350
1443
CSDPAC
PSPAC
PDPAC
BIC
(byte)
360 846
6014
2 054 820 34 247
421 082
7018
115 208
1920
323 465
5391
580 381
9673
443 164
7386
76 680
1278
325 800
5430
665 280 11 088
371 940
6199
52 560
876
230 400
3840
404 460
6741
319 260
5321
31 380
523
PET
(ms)
BIC
(byte)
PET
(ms)
390 780
6513
2 146 866 35 781
454 983
7583
118 505
1975
321 660
5361
617 584 10 293
454 980
7583
98 826
1647
Table 4
Parameters of simulation testbed.
Parameters
Variables
Values
Pcpu
Pw
b
k
7
88
100
3
Table 5
Parameters of graphs constructed in our simulation.
GraphNames
Nodes
Edges
RandomGraph1
RandomGraph2
RandomGraph3
RandomGraph4
avrora
h2
luindex
lusearch
15
30
50
100
200
4900
1027
1238
60
350
948
3238
5430
11088
6199
7148
Table 6
Partitioning time of BBAP(s).
Programs
Model_T
Model_E
Model_W
RandomGraph1
RandomGraph2
RandomGraph3
RandomGraph4
avrora
lusearch
0.022
0.056
0.375
0.897
2.062
200
0.032
0.049
0.389
1.003
2.232
217
0.028
0.058
0.392
0.974
2.182
209
342
Fig. 4. Application execution time with different bandwidths by partitioning of BBAP, StoerWagner, Minimal and Local. (a) RandomGraph1, (b) RandomGraph2, (c) avrora
and (d) lusearch.
Fig. 5. Application energy consumption with different bandwidths by partitioning of BBAP, StoerWagner, Minimal and Local. (a) RandomGraph1, (b) RandomGraph2,
(c) avrora and (d) lusearch.
Time (AET), it means that the ORG is more accurate for application
partitioning. As shown in Table 3, as compared to PSPAC, the
predicted execution times of CSDPAC and PDPAC are closer to their
343
Fig. 6. Weighted model value with different bandwidths by partitioning of BBAP, StoerWagner, Minimal and Local. (a) RandomGraph1, (b) RandomGraph2, (c) avrora
and (d) lusearch.
Table 7
Comparison of average execution time and energy consumption (BBAP).
Programs
Execution time
Energy consumption
TR1 (%)
TR2 (%)
ER1 (%)
ER2 (%)
RG1
RG2
avrora
lusearch
25.89
18.80
32.16
28.67
70.88
50.50
25.23
30.06
23.93
21.99
30.64
26.97
25.59
24.96
32.23
55.10
Average
26.38
44.17
25.88
34.47
Table 8
Partitioning time of MCGAP(s).
GraphNames
Model_T
Model_E
Model_W
RandomGraph1
RandomGraph2
RandomGraph3
RandomGraph4
avrora
h2
lusearch
luindex
0.019
0.054
0.392
0.913
1.662
52.28
20.52
20.42
0.022
0.051
0.396
0.915
1.583
51.30
20.45
20.32
0.023
0.055
0.398
0.908
1.592
54.29
20.79
20.61
344
Table 9
Application execution time comparison of BBAP and MCGAP.
Programs
RandomGraph1
RandomGraph2
RandomGraph3
RandomGraph4
avrora
h2
lusearch
luindex
b 60 kb/s
b 20 kb/s
b 80 kb/s
B (ms)
M (ms)
B (ms)
M (ms)
B (ms)
M (ms)
17
71
105
167
4900
31 410
5693
1904
17
72
107
181
4950
31 771
5712
1995
1.000
1.014
1.019
1.084
1.010
1.011
1.003
1.048
12
40
70
113
3712
20 112
4392
1119
13
41
72
114
3716
20 143
4424
1135
1.083
1.025
1.029
1.009
1.001
1.002
1.007
1.014
11
33
62
97
3300
18 352
4087
1030
12
35
62
98.6
3324
18 553
4213
1072
1.091
1.061
1.000
1.016
1.007
1.011
1.031
1.041
Fig. 7. Application execution time with different bandwidths by partitioning of MCGAP, StoerWagner, Minimal and Local. (a) avrora, (b) lusearch, (c) luindex and (d) h2.
345
Fig. 8. Application energy consumption with different bandwidths by partitioning of MCGAP, StoerWagner, Minimal and Local. (a) avrora, (b) lusearch, (c) luindex and (d) h2.
Fig. 9. Weighted model value with different bandwidths by partitioning of MCGAP, StoerWagner, Minimal and Local. (a) avrora, (b) lusearch, (c) luindex and (d) h2.
346
Table 10
Comparison of average execution time and energy consumption (MCGAP).
Programs
Execution time
Energy consumption
TR3 %
TR3 %
ER4 %
ER4 %
avrora
lusearch
luindex
h2
30.67
27.83
20.54
28.92
23.59
29.24
51.20
45.71
31.18
26.96
14.12
50.07
32.75
55.09
53.66
42.87
Average
26.99
37.44
30.58
46.09
6. Conclusion
In this paper, we rst construct the WORGs of mobile applications by combining static analysis and dynamic proling methods.
To tackle the problem of bandwidth uctuations in a mobile
environment, we propose the optimization models in terms of
execution-time and energy-consumption for mobile application
partitioning based on the WORGs. We consider the bandwidth as a
variable and propose two bandwidth-adaptive application partitioning algorithms: BBAP and MCGAP. BBAP is applicable for
nding the optimal solutions for small applications, while MCGAP
is suited to quickly obtain the suboptimal solutions for large-scale
applications. Experimental results demonstrate that both algorithms adapt well to bandwidth uctuations, and effectively
reduce the energy consumption and execution time of mobile
applications.
References
Aderounmu GA. Performance comparison of remote procedure calling and mobile
agent approach to control and data transfer in distributed computing environment. Journal of Network and Computer Applications 2004;27(2):11329.
Banerjee N, Rahmati A, Corner MD, et al. Users and batteries: interactions and
adaptive energy management in mobile systems. In: Proceedings of the ninth
international conference on ubiquitous computing. Innsbruck, Austria;
September 2007. p. 21734.
Bialek R, Schneider JG, Yan J. Partitioning of Java application to support dynamic
updates. In: Proceedings of the 11th Asia-Pacic software engineering conference. Busan, Korea; November 2004. p. 61623.
Binder W, Hulaas J. Using bytecode instruction counting as portable CPU consumption metric. Electronic Notes in Theoretical Computer Science 2006;153
(2):5777.
Chun BG, Maniatis P. Augmented smartphone applications through clone cloud
execution. In: Proceedings of the eighth conference on hot topics in operating
systems. Monte Verita, Switzerland; May 2009. p. 15.
Chun BG, Maniatis P. Dynamically partitioning applications between weak devices
and clouds. In: Proceeding of the rst ACM workshop on mobile cloud
computing & services: social networks and beyond. San Francisco, CA, USA;
June 2010. p. 15.
Chun BG, Ihm S, Maniatis P, Naik M, Patti A. Clonecloud: elastic execution between
mobile device and cloud. In: Proceedings of the sixth conference on computer
systems. Salzburg, Austria; April 2011. p. 30114.
Cuervo E, Balasubramanian A, Cho D. MAUI: making smart phone last longer with
code ofoading. In: Proceedings of the eighth international conference on
mobile systems, applications, and services. San Francisco, California, USA; June
2010. p. 4962.
Dahm M. Doorastha: a step towards distribution transparency. In: Proceedings of
Java-Informations-Tage/Net.ObjectDays 2000. Erfurt, Germany; October 2000.
Diaconescu RE, Wang L, Franz M. Automatic distribution of Java Byte-code based on
dependence analysis. Technical report, University of California; 2003.
Diaconescu RE, Wang L, Mouri Z, et al. A compiler and runtime infrastructure for
automatic program distribution. In: Proceedings of the 19th IEEE international
parallel and distributed processing symposium. Denver, Colorado, USA; April
2005. p. 52a.
Kemp R, Palmer N, Kielmann T, et al. eyeDentify: multimedia cyber foraging from a
smartphone. In: Proceedings of the 11th IEEE international symposium on
multimedia. San Diego, California, USA; December 2009. p. 3929.
Kemp R, Palmer N, Kielmann T, et al. Cuckoo: a computation ofoading framework
for smartphones. In: Proceedings of the second international conference on
mobile computing, applications, and services, ad hoc and wireless networks.
Santa Clara, CA, USA; October 2010. p. 6281.
Kiran KR, Cecilia M, Mirco M, Peter JR. Sociablesense: exploring the trade-offs of
adaptive sampling and computation ofoading for social sensing. In: Proceedings of the 17th international conference on mobile computing and networking
(Mobicom'11). Las Vegas, Nevada, USA; September 2011. p. 1923.
Kremer U, Hicks J, Rehg J. A compilation framework for power and energy
management on mobile computers. In: Proceedings of international workshop
on languages and compilers for parallel computing. Cumberland Falls,
Kentucky, USA; August 2001.
Kumar K, Lu YH. Cloud computing for mobile users: can ofoading computation
save energy?. IEEE Computer 2010;43(4):516.
347