analysis of offloading mechanisms in edge …energy profiling. in [9], a self-modeling paradigm,...

12
Analysis of offloading mechanisms in edge environment for an embedded application Monisha ChandruR .Ezhilarasie School of Computing, SASTRA Deemed University, Thanjavur. ABSTRACT In this world of random technological development, the most valuable and challenging parameter is the computation time of each and every process. When every task has to be automated or has to be controlled, the performance parameters like time, power, energy that are consumed should also be taken into account. Modern technologies indirectly mean high computation complexity which in turn means more power consumption. Many power profiling tools and algorithms are already being used for monitoring power utilization and for minimizing power consumption of processes, which are commonly found in android devices. But these tools have several shortcomings as they could not support many embedded applications and other computation intensive applications to the fullest extent. So the aim of the work is to offload the highly complex code segment and thereby reduce the power consumed by the process as a whole, to a greater extent.Thus, the overall power utilization could be reduced to a notable extent. Keywords: Power monitoring, power utilization, offloading, computational complexity. 1. INTRODUCTION In real-time scenario, when data handling is bulk and heavy, the existing data needs to be fragmented into smaller parts and handled using different hardware segments of the same device or different devices even. The data handling could even be performed by offloading a complex segment to cloud storage and retrieve the results back.Edge computing is a methodology in which the offloading of data is done to other local devices that are present nearby or connected to the existing device. This stands unique from cloud computing only in the space chosen for storage of offloaded data. The parameters chosen for this methodology are code size, code block priority, frequency of occurrence, transmission and reception latency, total cost of computation etc., Edge computing is a further advancement of cloud computing, where the cloud utilization cost is totally avoided and the entire processing is carried out using the localized and neighborhood devices in a system. The major scheme in edge computing is that the complex part or the repetitive part of code segment has to be offloaded based on the program or algorithmic design. When the handling of data becomes complex or heavy in localized devices, the problem arises about where to forward or process the data causing traffic. The concept that provides the solution for this problem is data offloading. Data offloading is an approach that is used to handle data that causes traffic, by carry forwarding to nearby hardware devices or any other connected devices. The data segment that has to be forwarded could be selected based on many parameters such as follows. The data could be subdivided into many simpler functional modules, and the module whose functional complexity is high could be placed in a separate device or the cloud, and that specific functional block could be iterated again and again in that device. Thus, the cost of execution could be reduced to a greater extent. This is the principle of offloading and the process carried out could be classified into two based on the storage space chosen for storing offloading contents such as Edge computing and Cloud computing. International Journal of Pure and Applied Mathematics Volume 118 No. 18 2018, 2329-2339 ISSN: 1311-8080 (printed version); ISSN: 1314-3395 (on-line version) url: http://www.ijpam.eu Special Issue ijpam.eu 2329

Upload: others

Post on 05-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

Analysis of offloading mechanisms in edge environment for an embedded application

Monisha ChandruR .Ezhilarasie

School of Computing, SASTRA Deemed University, Thanjavur.

ABSTRACT

In this world of random technological development, the most valuable and challenging parameter is

the computation time of each and every process. When every task has to be automated or has to be

controlled, the performance parameters like time, power, energy that are consumed should also be taken

into account. Modern technologies indirectly mean high computation complexity which in turn means more

power consumption. Many power profiling tools and algorithms are already being used for monitoring

power utilization and for minimizing power consumption of processes, which are commonly found in

android devices. But these tools have several shortcomings as they could not support many embedded

applications and other computation intensive applications to the fullest extent. So the aim of the work is to

offload the highly complex code segment and thereby reduce the power consumed by the process as a

whole, to a greater extent.Thus, the overall power utilization could be reduced to a notable extent.

Keywords: Power monitoring, power utilization, offloading, computational complexity.

1. INTRODUCTION

In real-time scenario, when data handling is bulk and heavy, the existing data needs to be

fragmented into smaller parts and handled using different hardware segments of the same device or

different devices even. The data handling could even be performed by offloading a complex segment to

cloud storage and retrieve the results back.Edge computing is a methodology in which the offloading of

data is done to other local devices that are present nearby or connected to the existing device. This stands

unique from cloud computing only in the space chosen for storage of offloaded data. The parameters

chosen for this methodology are code size, code block priority, frequency of occurrence, transmission and

reception latency, total cost of computation etc., Edge computing is a further advancement of cloud

computing, where the cloud utilization cost is totally avoided and the entire processing is carried out using

the localized and neighborhood devices in a system.

The major scheme in edge computing is that the complex part or the repetitive part of code segment

has to be offloaded based on the program or algorithmic design. When the handling of data becomes

complex or heavy in localized devices, the problem arises about where to forward or process the data

causing traffic. The concept that provides the solution for this problem is data offloading. Data offloading

is an approach that is used to handle data that causes traffic, by carry forwarding to nearby hardware

devices or any other connected devices. The data segment that has to be forwarded could be selected based

on many parameters such as follows. The data could be subdivided into many simpler functional modules,

and the module whose functional complexity is high could be placed in a separate device or the cloud, and

that specific functional block could be iterated again and again in that device. Thus, the cost of execution

could be reduced to a greater extent. This is the principle of offloading and the process carried out could be

classified into two based on the storage space chosen for storing offloading contents such as Edge

computing and Cloud computing.

International Journal of Pure and Applied MathematicsVolume 118 No. 18 2018, 2329-2339ISSN: 1311-8080 (printed version); ISSN: 1314-3395 (on-line version)url: http://www.ijpam.euSpecial Issue ijpam.eu

2329

Page 2: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

When the data is offloaded using edge computing methodologies, the efficiency measure is a must.

That could be performed by regulating and observing the power utilization of all the individual segments of

the code, and thus known as Power Profiling. Power profiling is a technique that pin points the individual

energy contribution of application components to the total budget of energy consumption. It is achieved by

analyzing and logging all the individual processes or threads running in the system whose power

consumption has to be profiled. It is performed in devices running on batteries, to extend the working

efficiency and functionality. This technique helps to improve the battery lifetime, and thus the lifetime of

the system or the device on which it is performed. It has found demanding growth in various fields like

mobile phones, laptops, personal computers, embedded devices, with a wide range of applications on each

field.

This paper is structured as follows. In Section 2, we get an overview of some of the existing works

and models. Section 3 describes the process underwent in detail and in Section 4, we have summarized all

the results obtained. Finally, we conclude in Section 5.

2. RELATED WORK

In [2], Smart Energy Monitoring System (SEMO) is a system in which the applications running in

the mobile devices are considered and their corresponding energy consumption is recorded. A proper

internal software based ad external software based implementation is done in [3] based on the analysis of

various methodologies. In [4], runtime power prediction is made by combining the online and offline

techniques in various embedded devices powered using a battery. In [5], power measurement is done by a

coin-sized board, which acts as a toolkit for NEAT. In [6], a tool named PowerMemo is devised which

could work for both for Linux systems and Dalvik VMs and provides an extended support [7] to the

developers for optimizing the energy efficiency to a greater extent.In [8], pTop, which is a tool to provide

real-time energy information, is considered to be simple and productive, thereby enabling process-level

energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy

model automatically without the assistance from any outside units. In [10], the energy consumption of

applications is determined by a regression model named as Time Energy Model (TEM). TEM logs various

parameters like performance and power consumption of the desired applications by using a time variable.

In [11], an integrated power model for Virtual Machines, named iMeter, is devised. It uses better

presumption and approximation when compared to the older power models. In [12], initially, model-driven

approach named System Power Optimization Tool (SPOT) is determined to provide emulated result of the

power consumption of mobile device. Next, the code is generated based on the emulated outcome thereby

simplifying the analysis process of the power statistics.

3. IMPLEMENTATION

The proposed concept of data offloading is implemented in embedded devices, as they are low-

power resource-constrained widely used devices that run on battery. A complex code task is considered, for

example, in this case, a Watershed Segmentation algorithm is considered, and it is compiled in an

embedded device, say Raspberry Pi. The compilation of the same algorithm is performed in various

possible combinations with the same code and the same hardware provided. Based on the energy utilization

of the task that is benchmarked against various possible combinations, corresponding energy pattern is

observed and thus the power consumption of the process is validated for every corresponding energy

pattern formed. As a result, a power model is designed and tested for various possible combinations of

input sizes and input pattern.

International Journal of Pure and Applied Mathematics Special Issue

2330

Page 3: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

The input pattern could be altered by performing processor pinning of individual task to individual

processor core of the embedded device. Also, the size of the image could be varied by sub-dividing a

complex image into many sub-images, and by testing the energy utilization pattern when a sub-image is

provided as input instead of the original complex image. Thus, the time consumed for the processing of

different patterns, viz., processor pinning, number of cores utilized, size of the image being serviced,

number of input images, pattern of similarities or dissimilarities in the image sizes of multiple inputs, etc.,

is tabulated and a perfect power schema is modelled.

Figure 1: EDGE COMPUTING GENERAL ARCHITECTURE

When a process is compiled directly, as in the usual case, it is referred to as floating compilation. In

such case, it’s the choice of the embedded device to select a particular processor core for the program

execution based on core availability or core priority or service priority or so on. Here, some of the cores

remain idle for a major period, thus this could be overcome by the process of Processor core pinning. When

the user takes the right to select the core in which the process is to be serviced, it is known as task pinning.

The user could perform pinning based on the requirement, application, or based on any priority algorithms

likely to be followed. In such methodology, the processing time, throughput and several other performance

parameters are likely to be improved by greater scales due to the maximum utilization of all the cores in the

processor.

Based on all the methodologies discussed, a comparative study is made by performing the

performance measures to calculate time consumed, energy discharge rate and power utilization in three

devices, which are,

DEVICE 1 - A laptop with intel i3 processor with 4 GB RAM

DEVICE 2 - A laptop with Pentium P600 processor with 3 GB RAM

DEVICE 3 - A Raspberry Pi 2 device (1 GB RAM)

The time consumption based on several possibilities is observed and tabulated across the image size

or the number of segments into which the image is sub-divided before the accomplishment of the process.

Table 1 shows the tabulated values and based on the analysis made from the tabulated values, graphs are

plotted for better interpretation of the results tabulated.

When the time consumed by an application/process is known and when the energy discharge rate of

the battery is also known, the power consumed by that application/process can be calculated as follows.

From the provided readings, the power utilized could be calculated as ‘Power = Energy discharge rate *

Time consumed’. Thus power could be calculated as 21.3 W * 29.7 ms/s = 632.61 mW / 0.6326 W.

International Journal of Pure and Applied Mathematics Special Issue

2331

Page 4: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

Based on the three different types of devices selected, the time and power consumption of a process

with the same input size is performed and tabulated as shown in Table 1. The inference could be obtained

that the time taken varies based on the number of segments used as the input size varies for each segment.

Table 1: TIME CONSUMED BY DIFFERENT DEVICES FOR DIFFERENT INPUT SIZES

NUMBER OF

SEGMENTS

DEVICE 1(Time-ms) DEVICE 2(Time-ms)

(Time in ms)

DEVICE 3(Time-ms)

(Time in ms)

Individual Total Individual Total Individual Total

2 Segment 1 7346 15117 22075 44981 125440 244415

Segment 2 7771 22906 118975

4 Segment 1 2705 10306 7414 28564 48528 165221

Segment 2 3117 8886 38975

Segment 3 2203 5940 36684

Segment 4 2281 6324 41034

6 Segment 1 1756 9398 3467 23452 26578 138492

Segment 2 1757 4823 19899

Segment 3 1734 4705 24231

Segment 4 1073 2642 23477

Segment 5 1742 4561 24189

Segment 6 1336 3254 20118

8 Segment 1 1038 9354 2355 23227 17566 136901

Segment 2 1267 3328 17556

Segment 3 1342 3468 16365

Segment 4 1340 3311 16895

Segment 5 921 1910 17762

Segment 6 1296 3234 15633

Segment 7 1188 3164 17562

Segment 8 962 2437 17562

International Journal of Pure and Applied Mathematics Special Issue

2332

Page 5: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

The tasks which are being executed will run by default in any core. Whereas, the other cores available in

the device would remain idle, thereby increasing the computational cost. So, the task can be subdivided and

pinned by code to specific cores, so that all the cores are utilized and computational cost is greatly reduced.

The difference in process execution with and withour core pinning provides drastic changes in results as in

Table 2. By manually pinning the task with different cores of the processor, the time consumed and its

corresponding power consumed could be greatly reduced by the process of offloading.

Table 2: TIME CONSUMED BY A DEVICE WITH & WITHOUT CORE PINNING

TIME TAKEN FOR EXECUTION IN

FLOATING MODE (ms)

NO OF CORES USED FOR PINNING

TIME TAKEN FOR EXECUTION WITH CORE PINNING (INDIVIDUAL) (ms)

7346 1 CORE 1 7348

7343 2 CORE 1 3649

CORE 2 3663

7347 3 CORE 1 1801

CORE 2 1815

CORE 3 3662

7352 4 CORE 1 1771

CORE 2 1752

CORE 3 1798

CORE 4 1781

The device considered, Raspberry Pi, has the capability to operate in two operating frequencies, viz.,

600MHz and 900MHz. The hardware is gradually shifted from normal operating frequency, i,e., 600MHz

to loaded operating frequency, i.e., 900MHz and the corresponding time taken is recorded.It is observed

that the device could not handle loads more than 85% in 900 MHz frequency mode, and thus leading to

complete hang down of the device. Thus, these ranges could not be used for real-time offloading of data.

Table 3: TIME CONSUMED BY A DEVICE AT DIFFERENT OPERATING FREQUENCIES

International Journal of Pure and Applied Mathematics Special Issue

2333

Page 6: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

CPU UTILIZATION

PERCENTAGE AT 600 MHz

OPERATING FREQUENCY

CPU UTILIZATION

PERCENTAGE AT 600 MHz

OPERATING FREQUENCY

TIME TAKEN IN

MILLISECONDS

(ms)

98.6% 0.4% 24415

83.19% 16.8% 22200

74.8% 25.2% 21972

70% 30% 21846

60% 40% 21961

55% 45% 21937

50% 50% 21788

45% 55% 21961

40% 60% 21771

35% 65% 21789

30% 70% 21992

25% 75% 21872

20% 80% 21988

15% 85% 21795

10% 90% ***

5% 95% ***

0% 100% ***

4. RESULTS AND DISCUSSION

Based on the results of Table 1, the graphs are plotted individually as per the figures 2,3,4 and 5. When

the number of input segments is two, the corresponding values could be plotted as a graph as shown in

figure 2.

International Journal of Pure and Applied Mathematics Special Issue

2334

Page 7: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

Figure 2: PLOT FOR TIME CONSUMED BY DEVICES WHEN INPUT=2 SEGMENTS

Correspondingly, based on the number of segments, the graph as shown in the following figures are

plotted. When the number of segments is four, six and eight, the corresponding graph plotted are

shown in figure 3,4 and 5 respectively.

Figure 3: PLOT FOR TIME CONSUMED BY DEVICES WHEN INPUT=4 SEGMENTS

SEGMENT 1 SEGMENT 2

DEVICE 3 125440 118975

DEVICE 2 22075 22906

DEVICE 1 7346 7771

7346 7771 0 0

22075 22906

0 0

125440 118975

0 0

020000400006000080000

100000120000140000160000180000

Tim

e ta

ken

in m

s

Number of segments of input image

DEVICE 1 DEVICE 2 DEVICE 3

SEGMENT 1 SEGMENT 2 SEGMENT 3 SEGMENT 4

DEVICE 3 48528 38975 36684 5

DEVICE 2 7414 8886 5940 6324

DEVICE 1 2705 3117 2203 2281

2705 3117 2203 22817414 8886

5940 6324

4852838975

36684

5

0

10000

20000

30000

40000

50000

60000

70000

Tim

e ta

ken

in m

s

Number of segments of input image

DEVICE 1 DEVICE 2 DEVICE 3

International Journal of Pure and Applied Mathematics Special Issue

2335

Page 8: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

Figure 4: PLOT FOR TIME CONSUMED BY DEVICES WHEN INPUT=6 SEGMENTS

Figure 5: PLOT FOR TIME CONSUMED BY DEVICES WHEN INPUT=8 SEGMENTS

When task pinning is done based on the number of cores involved for pinning, the values tabulated

before are plotted. Thus, from the graph, the inference can be made such that when the number of cores

pinned is more, the time consumed correspondingly is less and vice versa. Thus the time consumption and

the number of cores involved in the process are inversely proportional to each other, hence plotted.

SEGMENT 1 SEGMENT 2 SEGMENT 3 SEGMENT 4 SEGMENT 5 SEGMENT 6

DEVICE 3 26578 19899 24231 23477 24189

DEVICE 2 3467 4823 4705 2642 4561 3254

DEVICE 1 1756 1757 1734 1073 1742 1336

1756 1757 1734 1073 1742 13363467 4823 4705

26424561 3254

26578

1989924231

2347724189

0

0

5000

10000

15000

20000

25000

30000

35000

Tim

e ta

ken

in m

s

Number of segments of input image

DEVICE 1 DEVICE 2 DEVICE 3

SEGMENT 1

SEGMENT 2

SEGMENT 3

SEGMENT 4

SEGMENT 5

SEGMENT 6

SEGMENT 7

SEGMENT 8

DEVICE 3 17566 17566 16365 16895 17762 15633 17562

DEVICE 2 2355 3328 3468 3311 1910 3234 3164 2437

DEVICE 1 1038 1267 1342 1340 921 1296 1188 962

1038 1267 1342 1340 921 1296 1188 9622355 3328 3468 3311

19103234 3164 2437

17566 17566 16365 16895 17762 1563317562

0

0

5000

10000

15000

20000

25000

Tim

e ta

ken

in m

s

Number of segments of input image

DEVICE 1 DEVICE 2 DEVICE 3

International Journal of Pure and Applied Mathematics Special Issue

2336

Page 9: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

Figure 6: PLOT FOR TIME CONSUMED BY A DEVICE WITH & WITHOUT CORE PINNING

5. CONCLUSION

Thus, the complex or rogue applications that are serviced by a resource-constrained low-power device

running on battery could be identified and the corresponding power utilization could be observed and

tabulated. From the tabulated values, a plot is made to have a clear observation of the power analysis

and the unwanted power utilization could be identified. From the data obtained by providing variable

input sizes and by pinning the task to corresponding processor cores, a validated power model could

be obtained and constructed. With the power model, a clear analysis can be made to plan the processes

running in a device. This work could be further extended by offloading a more complex segment of

the code to a cloud structure and further the energy consumption can be reduced to a greater extent.

REFERENCES

[1] D. R. Chen and K. F. Chiang, “Cloud-based power estimation and power-aware scheduling for embedded systems,”

Comput. Electr. Eng., vol. 47, pp. 204–221, 2015.

[2] F. Ding, F. Xia, W. Zhang, X. Zhao, and C. Ma, “Monitoring energy consumption of smartphones,” Proc. - 2011 IEEE

Int. Conf. Internet Things Cyber, Phys. Soc. Comput. iThings/CPSCom 2011, pp. 610–613, 2011. [3] B. Kasprzak, J. Pękala, A. F. Stępień, and Z. Świerczyński, “Metrology and measurement systems,” Architecture, vol.

XVII, no. 4, pp. 537–547, 2010.

[4] C. Krintz, “A Run-Time , Feedback-Based Energy Estimation Model For Embedded Devices Selim Gurun,” 2006.

[5] N. Brouwers, M. Zuniga, and K. Langendoen, “NEAT: A Novel Energy Analysis Toolkit for Free-roaming

Smartphones,” Proc. 12th ACM Conf. Embed. Netw. Sens. Syst., pp. 16–30, 2014.

[6] S. L. Tsao, C. C. Kao, I. Suat, Y. Kuo, Y. H. Chang, and C. K. Yu, “PowerMemo: A power profiling tool for mobile

devices in an emulated wireless environment,” 2012 Int. Symp. Syst. Chip, SoC 2012, 2012.

CORE 1 CORE 2 CORE 3 CORE 4

PINNING MODE 1771 1752 1798 1781

FLOATING MODE 7352 0 0 0

Column1

1771 1752 1798 1781

7352

0 0 0

010002000300040005000600070008000

Tim

e ta

ken

fo

r ex

ecu

tio

n in

ms

Cores that are pinned

Chart Title

PINNING MODE FLOATING MODE Column1

International Journal of Pure and Applied Mathematics Special Issue

2337

Page 10: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

[7] T.K.Sethuramalingam, B.Nagaraj, " A Comparative Approach On PID Controller Tuning Using Soft Computing

Techniques", International Journal of Innovations in Scientific and Engineering Research (IJISER), Vol. 1, No. 12, pp.

460-465, 2014.

[8] T. Do, S. Rawshdeh, and W. Shi, “pTop : A Process-level Power Profiling Tool,” SOSP Work. Power Aware

Comput. Syst., no. Section 4, 2009. [9] M. Dong and L. Zhong, “Self-constructive high-rate system energy modeling for battery-powered mobile systems,”

MobiSys, p. 335, 2011.

[10] L. T. Duan, B. Guo, Y. Shen, Y. Wang, and W. L. Zhang, “Energy analysis and prediction for applications on

smartphones,” J. Syst. Archit., vol. 59, no. 10 PART D, pp. 1375–1382, 2013.

[11] H. Yang, Q. Zhao, Z. Luan, and D. Qian, “IMeter: An integrated VM power model based on performance profiling,”

Futur. Gener. Comput. Syst., vol. 36, pp. 267–286, 2014.

[12] C. Thompson, D. Schmidt, H. Turner, and J. White, “Analyzing mobile application software power consumption via

model-driven engineering,” Proc. 1st Int. Conf. Pervasive Embed. Comput. Commun. Syst., pp. 101–113, 2011.

International Journal of Pure and Applied Mathematics Special Issue

2338

Page 11: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

2339

Page 12: Analysis of offloading mechanisms in edge …energy profiling. In [9], a self-modeling paradigm, named Sesame, is capable of generating an energy model automatically without the assistance

2340