Team Members : Sanket Dangi (MT2009032) Team Lead Gaurav Kapoor(MT2009059) Deepthi Karnam(MT2009060) Sudha Mani(MT2009073) Celina Madhavan(MT2009075)

hopeacceptableSoftware and s/w Development

Oct 28, 2013 (3 years and 11 months ago)

90 views

Team Members :

Sanket

Dangi

(MT2009032) Team Lead

Gaurav

Kapoor
(MT2009059)

Deepthi Karnam(MT2009060)

Sudha

Mani
(MT2009073)

Celina
Madhavan
(MT2009075)

Clients

Master

Server Cluster


Reference :

Energy Efficient Real Time Heterogeneous Server Clusters by
Cosmin


Rusu,Alexendre

Ferrerira,Claudio

Scordino,Aaron

Watson,Rami

Melham


Identifying User processes…………………………..………..……
DONE


Identifying CPU idle % and send system to hibernation if it crosses
some threshold………………………………………………….…….
DONE


Setting up wakeup alarm in BIOS……………………………….…
DONE


WakeonLan

Configuration…………………………………………..
DONE


Energy Consumption Calculation in different modes…………
DONE


Port Filtering and Storing Traffic in Database……………….…
DONE


Traffic Pattern Recognition Algorithm
-
kNN

Algorithm……….
DONE


Hibernation Decision depending on Traffic Pattern and Energy
Consumption Calculation………………………………
YET TO BE DONE


Scalability of the Solution………………………………
YET TO BE DONE


ROUTER

THIS LAPTOP ACTS AS THE MASTER


AND GETS THE REQUESTS FROM THE CLIENT


AND FORWARDS IT TO THE SERVERS

THIS LAPTOP ACTS AS A CLIENT


FROM WHICH THE TRAFFIC IS

GENERATED

THIS LAPTOP ACTS AS SERVER 1

WHICH COLLECTS THE PACKETS GENERATED

BY THE CLIENT AND FORWARDED BY

MASTER
AND DISPLAYS THE COUNT OF PACKETS


GENERATED

THIS LAPTOP ACTS AS SERVER 2

AND IS SENT INTO HIBERNATION

AND WAKES UP WHEN A CERTAIN

NUMBER OF PACKETS ARE FORWARDED

TO IT FROM THE MASTER







Process

(Number of
User Process
in server)


1.
If there is no client processes running in
the server, then the server can be sent to
hibernation.


2.
Identifying CPU Idle % and send system
to hibernation using ACPI hibernation
script if it crosses some threshold limit


3.
Shell Script is used


4.
Commands Used:



ps



grep



wc



mpstat

Process

(Identifying
Idle CPU %)

Master

1.Depending upon Historical Pattern,
no. of active servers would be decided
and wakeup alarm will wakeup
server(s).


2.Alarm is set in BIOS. The alarm IRQ
(interrupt) is set


3.Shell Script is used


4.Files used:



“/sys/class/rtc/rtc0/wakealarm”



“/proc/driver/
rtc


Master

Servers

At set
alarm
time the
servers
wakeup

Master

Server

Key
generated


To establish Communication between Master and Server :



1. SSH configuration


2.
PasswordLess

Login by Generating RSA Key using
ssh
-
keygen

command



Testing of Previous Deliverables on client server architecture

Client1

Client n

Master

Active

Server

Server

No more requests
can be serviced by
the active server

When active
server can’t
service anymore
requests another
server is activated
using WOL

Requests




Assumptions: Wired LAN



Package Used:
wakeonlan



Command Used:

wakeonlan

<
MAC_Address
>










Energy Meter Specification:


MACO EM 08 single phase multifunction meter 1mpA 230V


The multifunction meter was used to measure the power consumed by a laptop in watts during
normal functioning, sleep mode, hibernation mode, and shutdown.


The energy consumed in
watthrs

by the laptop while going into hibernation and waking up was
also measured.


Based on the measurements we have arrived at the following conclusions


The laptop consumes less than a watt in sleep and hibernation modes. This was
measured as 3W and 1W for a desktop PC.


To save energy it is advisable to keep a server in idle mode for a period of 1.4
mins

when
a laptop is configured as a server rather than send it to hibernation.




Power

socket

V

A

KW

KWHr

MULTIFUNCTION

METER

80

Client 1

Client 2

If any request
hits, increment
RequestCounter

Clients

Master

Ports

20

Wait for Fixed
Duration(15
mins
)

Store
RequestCounter

in Database

Reset
RequestCounter

Packages Used: JDK6,MySql5.1,packETH(traffic
generator)


Libraries Used:
jpcap

library


Procedure:


1.Open Ethernet device for sniffing

2.Generate Random Traffic through
packETH

3.Capture Packets and Count for every fixed duration

4.Store count in database corresponding to that
duration


The data mining algorithm uses a pattern recognition technique proposed
by Taehyung Kim, Hyoungsoo Kim, Cheol Oh and Bongsoo Son in their
paper Traffic Flow Forecasting Based on Pattern Recognition to Overcome
Memoryless Property available at
http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=04197439


Since traffic flow is not completely random in nature, there should be
some patterns in which the past traffic flow repeats itself. This pattern
recognition technique, enables us to consider the past sequences of traffic
flow patterns to predict the future state.


Consider a discrete time
-
series
q
= {
q
1,
q
2, ...,
qn
} (e.g., 5 min. traffic
volumes) where
n
is the total number of points in the series.This is our
available historical data for say N days, which forms an estimation set.


The algorithm works as follows. We define a pattern size ‘l’ and search for
the pattern defined by {q
n
-
l
,q
n
-
l+1
, ….q
n
}

in the historical data for a
maximum number of ‘k’ nearest neighbours.


If a match is found at q
j

we predict the value of q
n+1

by taking the average
of q
j+1

for all the ‘k’ nearest neighbours.



The algorithm first takes a minimum value of ‘k’ and ‘l’ and predicts the
traffic for each q
n+1

in the estimation set based on the available q
n

values


The root mean squared error (RMSE) between the actual and predicted
values, for these choices of neighborhood size and pattern size,is calculated
for the entire estimation set.


The process is repeated incrementing ‘l’ upto a maximum size of l
max


The process is again repeated incrementing values of ‘k’ upto a maximum
of k
max
.(k
max
and l
max

are chosen by us)


The optimum values of ‘k’ and ‘l’ for the particular network is arrived at by
plotting ‘l’ versus RMSE for various ‘k’.


These optimum values of ‘k’ and ‘l’ are then used for predicting the pattern
for the (N+1)
th

day.


The pattern for the (N+1)
th

day is stored in a database and used by the
load balancing algorithm to take decisions on sending the servers to
hibernation.

MATCHING PATTERNS

START

SET k=1,l=1

For each
q
n

match the


pattern{
q
n
,….
q
n
-
l
} with



k’nearest

matches in

historical data (N days)

Find q
n+1

based

on the available

q
n

values for each

q
n

in the estimation set

Calculate RMSE

Increment ‘l’

is l< l
max
?

Increment ‘k’

is ‘k’<
k
max
?

yes

yes

Plot graph of ‘l’

versus RMSE

and find optimum

value of ‘k’ and ‘l’

Predict graph for

(N+1)
th

day

END

no

no

Client1

Client 2

Master

Web

Server 1

Web
Server 2

HTTP Request coming
to Master Server is
forwarded to Web
Server 1

Requests

Client n

If
requestcounter

exceeds
capacity of
webserver

1, WOL
signal sent and further
requests are forwarded to it



Iptables

used




Start port forwarding by editing /etc/
sysctl.conf

file


net.ipv4.ip_forward=1




For port
forwarding,use

command


iptables


t
nat


A PREROUTING

p
tcp


d <
source_ip
>
--
dport

<
port_no
>
-
j DNAT

-
to <
destination_ip
>:<
dest_port_no
>



a)
Decision Regarding whether to send a system into
hibernation or not?


While sending server to hibernation, historical traffic pattern and
energy consumption reading would be check and decision regarding
sending it to hibernation or not would be done.


b)
Scalability of solution



T
ry the solution for variable and Heterogeneous servers
.