diff options
Diffstat (limited to '2019-Mascots.org')
| -rw-r--r-- | 2019-Mascots.org | 166 |
1 files changed, 104 insertions, 62 deletions
diff --git a/2019-Mascots.org b/2019-Mascots.org index c1d80eb..c518667 100644 --- a/2019-Mascots.org +++ b/2019-Mascots.org @@ -148,23 +148,6 @@ component, formatting, style, styling, insert \end{figure} #+END_EXPORT - The number of sensors is the dominant factor that leverage the energy consumption of the - IoT/Network part. Therefore, we varied the number of sensors in the Wifi cell to analyze its - impact. The figure \ref{fig:sensorsNumber} represents the energy consumption of each simulated - part. It is clear that the energy consume by the network is the dominant part. However, since the - number of sensors is increasing the energy consume by the network will become negligible face to - the energy consume by the sensors. In fact, deploying new sensors in the cell do not introduce - much network load. To this end, sensors energy consumption is dominant. - - #+BEGIN_EXPORT latex - \begin{figure} - \centering - \includegraphics[width=0.6\linewidth]{./plots/numberSensors-WIFINET.png} - \caption{Analysis of the variation of the number of sensors on the IoT/Network part energy consumption.} - \label{fig:sensorsNumber} - \end{figure} - #+END_EXPORT - Previous work \cite{li_end--end_2018} on similar scenario shows that increasing application accuracy impact strongly the energy consumption in the context of data stream analysis. However, in how case, application accuracy is driven by the sensing frequency and thus the transmit @@ -184,8 +167,32 @@ component, formatting, style, styling, insert #+END_EXPORT + The number of sensors is the dominant factor that leverage the energy consumption of the + IoT/Network part. Therefore, we varied the number of sensors in the Wifi cell to analyze its + impact. The figure \ref{fig:sensorsNumber} represents the energy consumption of each simulated + part. It is clear that the energy consume by the network is the dominant part. However, since the + number of sensors is increasing the energy consume by the network will become negligible face to + the energy consume by the sensors. In fact, deploying new sensors in the cell do not introduce + much network load. To this end, sensors energy consumption is dominant. + + #+BEGIN_EXPORT latex + \begin{figure} + \centering + \includegraphics[width=0.6\linewidth]{./plots/numberSensors-WIFINET.png} + \caption{Analysis of the variation of the number of sensors on the IoT/Network part energy consumption.} + \label{fig:sensorsNumber} + \end{figure} + #+END_EXPORT + ** Cloud Energy Consumption + In this End-To-End energy consumption study, cloud account for a huge part of the overall energy + consumption. According a report \cite{shehabi_united_2016-1} on United States data center energy + usage, the average Power Usage Effectiveness (PUE) of an hyperscale data center is 1.2. Thus, in + our analysis, all energy measurement on cloud server will account for this PUE. + + + *** Virtual Machine Size Impact ** End-To-End Consumption * Discussion [1 col] @@ -574,7 +581,11 @@ component, formatting, style, styling, insert #+BEGIN_SRC sh #!/bin/bash - whichLog="second-final" + whichLog="last" + + logsLocation="logs/g5k" + whichLog="${logsLocation}/${whichLog}" + logFile="$(dirname $(readlink -f $0))"/$whichLog/simLogs.txt @@ -617,6 +628,8 @@ component, formatting, style, styling, insert done #+END_SRC + #+RESULTS: G5K-mergeCSV + #+RESULTS: mergeCSV *** Final Plots @@ -709,68 +722,69 @@ component, formatting, style, styling, insert + Final plot: Energy cloud, network and sensors + #+BEGIN_SRC R :noweb yes :results graphics :file plots/final.png :session *R* + library("tidyverse") - #+BEGIN_SRC R :noweb yes :results graphics :file plots/final.png :session *R* - library("tidyverse") + # Load data + data=read_csv("./logs/g5k/last/data.csv") + data=data%>%filter(state=="sim",simKey=="nbSensors") + PUE=1.2 - # Load data - data=read_csv("./logs/g5k/second-final/data.csv") - data=data%>%filter(state=="sim",simKey=="nbSensors") + # Cloud + data10=data%>%filter(nbSensors==20)%>%mutate(energy=mean(energy)) %>% slice(1L) + data100=data%>%filter(nbSensors==100)%>%mutate(energy=mean(energy)) %>% slice(1L) + data300=data%>%filter(nbSensors==300)%>%mutate(energy=mean(energy)) %>% slice(1L) + dataCloud=rbind(data10,data100,data300)%>%mutate(sensorsNumber=nbSensors)%>%mutate(type="Cloud")%>%select(sensorsNumber,energy,type) + dataCloud=dataCloud%>%mutate(energy=energy*PUE) - # Cloud - data10=data%>%filter(nbSensors==20)%>%mutate(energy=mean(energy)) %>% slice(1L) - data100=data%>%filter(nbSensors==100)%>%mutate(energy=mean(energy)) %>% slice(1L) - data300=data%>%filter(nbSensors==300)%>%mutate(energy=mean(energy)) %>% slice(1L) - dataCloud=rbind(data10,data100,data300)%>%mutate(sensorsNumber=nbSensors)%>%mutate(type="Cloud")%>%select(sensorsNumber,energy,type) + approx=function(data1, data2,nbSensors){ + x1=data1$sensorsNumber + y1=data1$energy + x2=data2$sensorsNumber + y2=data2$energy - approx=function(data1, data2,nbSensors){ - x1=data1$sensorsNumber - y1=data1$energy + a=((y2-y1)/(x2-x1)) + b=y1-a*x1 - x2=data2$sensorsNumber - y2=data2$energy + return(a*nbSensors+b) - a=((y2-y1)/(x2-x1)) - b=y1-a*x1 + } - return(a*nbSensors+b) - } + simTime=1800 + # Network + data=read_csv("./logs/ns3/last/data.csv") + data=data%>%filter(simKey=="NBSENSORS") + dataC5=data%>%filter(sensorsNumber==5)%>% mutate(energy=networkEnergy/simTime) %>%select(energy,sensorsNumber) + dataC10=data%>%filter(sensorsNumber==10)%>%mutate(energy=networkEnergy/simTime) %>%select(energy,sensorsNumber) + dataNet=rbind(dataC5,dataC10)%>%mutate(type="Network") - simTime=1800 + # Sensors + dataS5=data%>%filter(sensorsNumber==5)%>% mutate(energy=sensorsEnergy/simTime) %>%select(energy,sensorsNumber) + dataS10=data%>%filter(sensorsNumber==10)%>%mutate(energy=sensorsEnergy/simTime) %>%select(energy,sensorsNumber) + dataS=rbind(dataS5,dataS10)%>%mutate(type="Sensors") - # Network - data=read_csv("./logs/ns3/last/data.csv") - data=data%>%filter(simKey=="NBSENSORS") - dataC5=data%>%filter(sensorsNumber==5)%>% mutate(energy=networkEnergy/simTime) %>%select(energy,sensorsNumber) - dataC10=data%>%filter(sensorsNumber==10)%>%mutate(energy=networkEnergy/simTime) %>%select(energy,sensorsNumber) - dataNet=rbind(dataC5,dataC10)%>%mutate(type="Network") + fakeNetS=tibble( + sensorsNumber=c(20,100,300,20,100,300), + energy=c(dataC10$energy,approx(dataC5,dataC10,100),approx(dataC5,dataC10,300),dataS10$energy,approx(dataS5,dataS10,100),approx(dataS5,dataS10,300)), + type=c("Network","Network","Network","Sensors","Sensors","Sensors") + ) - # Sensors - dataS5=data%>%filter(sensorsNumber==5)%>% mutate(energy=sensorsEnergy/simTime) %>%select(energy,sensorsNumber) - dataS10=data%>%filter(sensorsNumber==10)%>%mutate(energy=sensorsEnergy/simTime) %>%select(energy,sensorsNumber) - dataS=rbind(dataS5,dataS10)%>%mutate(type="Sensors") + fakeNetS=fakeNetS%>%mutate(sensorsNumber=as.character(sensorsNumber)) + dataCloud=dataCloud%>%mutate(sensorsNumber=as.character(sensorsNumber)) - fakeNetS=tibble( - sensorsNumber=c(20,100,300,20,100,300), - energy=c(dataC10$energy,approx(dataC5,dataC10,100),approx(dataC5,dataC10,300),dataS10$energy,approx(dataS5,dataS10,100),approx(dataS5,dataS10,300)), - type=c("Network","Network","Network","Sensors","Sensors","Sensors") - ) + data=rbind(fakeNetS,dataCloud)%>%mutate(sensorsNumber=as.character(sensorsNumber)) - fakeNetS=fakeNetS%>%mutate(sensorsNumber=as.character(sensorsNumber)) - dataCloud=dataCloud%>%mutate(sensorsNumber=as.character(sensorsNumber)) - data=rbind(fakeNetS,dataCloud)%>%mutate(sensorsNumber=as.character(sensorsNumber)) + data=data%>%mutate(sensorsNumber=fct_reorder(sensorsNumber,as.numeric(sensorsNumber))) - - data=data%>%mutate(sensorsNumber=fct_reorder(sensorsNumber,as.numeric(sensorsNumber))) - - ggplot(data)+geom_bar(position="dodge2",colour="black",aes(x=sensorsNumber,y=energy,fill=type),stat="identity")+ - xlab("Sensors Number")+ylab("Power Consumption (W)")+guides(fill=guide_legend(title="Part")) - ggsave("plots/final.png",dpi=80) + ggplot(data)+geom_bar(position="dodge2",colour="black",aes(x=sensorsNumber,y=energy,fill=type),stat="identity")+ + xlab("Sensors Number")+ylab("Power Consumption (W)")+guides(fill=guide_legend(title="Part")) + ggsave("plots/final.png",dpi=80) #+END_SRC @@ -780,6 +794,34 @@ component, formatting, style, styling, insert + #+BEGIN_SRC R :results graphics :file plots/vmSize-cloud.png + library("tidyverse") + + # Load data + data=read_csv("./logs/g5k/last/data.csv") + data=data%>%filter(simKey=="nbSensors") + + dataI=data%>%filter(state=="IDLE")%>%group_by(nbSensors)%>%mutate(energy=mean(energy)) + dataS=data%>%filter(state=="sim")%>%group_by(nbSensors)%>%mutate(energy=mean(energy)) + + + data=rbind(dataI,dataS) + +# data1024=data%>%filter(vmSize==1024)%>%mutate(energy=mean(energy))# %>% slice(1L) +# data100=data%>%filter(nbSensors==100)%>%mutate(energy=mean(energy)) %>% slice(1L) + # data300=data%>%filter(nbSensors==300)%>%mutate(energy=mean(energy)) %>% slice(1L) + + ggplot(data,aes(x=time, y=energy,color=state)) + geom_point()+facet_wrap(~nbSensors) + + + + ggsave("plots/vmSize-cloud.png",dpi=80) + #+END_SRC + + #+RESULTS: + [[file:plots/vmSize-cloud.png]] + + * Emacs settings :noexport: # Local Variables: |
