CEN 591, Fall 2012 Performance evaluation of a network system using socket programming and empirical study Assigned: Mon. Nov. 12, Due: Mon. Nov. 26, 11:59PM

perchorangeΛογισμικό & κατασκευή λογ/κού

1 Δεκ 2013 (πριν από 3 χρόνια και 11 μήνες)

92 εμφανίσεις

CEN 591, Fall 2012

P
erformance
evaluation of a network system

using

socket
programming and

empirical study

Assigned:
Mon
. Nov.
12
, Due:
Mon
.

Nov
.
2
6
, 11:59PM


1
-
Introduction

In this assignment you’ll write
server
-
client programs that communicate

with each other using
TCP protocol

(through socket programming in C)
, and measure the system performance using
experiments in a realistic network environment
.

The objective is to become familiar

with
,
socket
programming,
parallel programming using
threads, the concept of ports, and perform empirical
study to evaluate

performance metrics such as throughput and
latency in a realistic system
.

2
-

Handout instruction


Start with downloading the HW4 folder from the blackboard under the item Course Docume
nt
\

HW4.zip.
The hw4
-
appendix.docx in this folder provides server/client example programs, the changes that
you need to make on those programs, and some hints to write routines for selecting files by the
client program.

The folder also includes 15 sample
image file
s

that you will use in your
experiments.


3
-

Instruction

You need to write two multithread applications, one for client side and one for server side
namely as client
-
node.c and server
-
node.c.
These programs do file transferring

using sockets
and TCP protocol
.
T
he client side program send
s

TCP request to receive a file

by sending its
name. The server side

program accesses a set of files,
receives the TCP request, and sends
the
file

per each request.
You can use pthread and socket

library to implement your programs.


The client program should be implemented such that
it
can generate various rate of request per
second
,

given as
an input parameter
.
According to the specified rate it should dynamically
generate
number of
thread
s per
second

by which a new request is sent.

The program should
receive the request and logs the turn
-
around time

of each request
, i.e., the time it takes from
sending the request up to receiving the whole file. It does not need to save the file
s
.


The server program is also a multithread application where it
generates

a thread to resolve a
request once a TCP request is received. It parses the request,
determines

the name of
the file and
sends

it back to the client side.

You can run both of the prog
rams in one machine by using loopback IP address i.e., 127.0.0.1


The set of files that the programs are transferring is provided in the
hw4 folder in the blackboard.


The running format of the files should be as follows:



./server
-
node portname

(
where
portname is an integer that your program
communicates through that)



./client
-
node portname R size
-
dist

(where R is the file transfer rate, size
-
dist is a string
and can be “uniform”, exponential” or “pareto”, refer the requirement
3

)



4
-

Requirements

1
-

Source code + makefile:

Note that TA will use
general.asu.edu

server to compile and
run your programs. You should submit (i)
two c files

i.e., client
-
node.c and server
-
side.c
which includes all of the required codes to run client and server program, (ii)
a

makefile

that produces executable file of these programs, and (iii)
a folder named “input”

which
consists the files that you programs are transferring them
. You should
use

1
5

files,
whose

size is as follows {
300B,
4
00B,
500B, 600B,700B 800B,900B, 1K, 2K,

5
K,
1
0K,
20
K
,
50K, 100K,
200K
}
,

files
are provided in the
HW4 folder
.

You need to put them in your
submission folder, such that your programs run without any configuration.

Your client
program should choose the file
s randomly (i.e., uniform, exponential
and parteo
)

2
-

File size distribution

and throughput
-
latency plot
.


Change the client program to get
the file size distribution as input. The distribution can be “uniform”, “exponential”, and
“Pareto”.
You need to implement
some routines that select files
such that the distribution
of transferred file sizes follows the given distribution (see section 3 in hw4
-
appendix.docs).

Run your programs for each of the given distribution
s

and various
request per seconds, and plot the throughput
-
latency of all of them.

Compare the results
and argue about them.

3
-

Design document:

In your report you should clearly describe the flow, functionality and
the algorithm you use for every procedure you implement. The description should make
clear the sender and receiver side funct
ionality and provide the corresponding FSM.

4
-

Validation technique you use to validate your implementation.
You should clearly
report the methodology (e.g., a test scenario) you used to test the validity of your code,
and support your claim using the results

you get.

5
-

(extra credit) Empirical study on the IMPACT lab’s platforms.

Repeat the
requirement 2 in the IMPACT lab’s platform (the details of how to access the platforms
will be posted in future)



5
-

Submission Instructions

You need to submit (i)
a single pdf document

which includes your report for all of the
requirements, (ii)
your source codes
, (iii)
a makefile
, and (iv)
all of the files that your code
needs them for compiling and running
. All of your files should be in one folder which is
named

as [ASUID]H
4

(e.g. 222222222H
4
). Zip your folder and submit it to the BB.


6
-

Grading criteria

Please note that if the programs you submit do not compile or run, your assignment won’t
be graded and you will get zero point for this homework.
Your
assignment is
evaluated
according to the following table.




Requirement

Points

(1)
Source code + Design documents +sample
output


50

(2) Latency
-
throughput for uniform, exponential
and pareto file
-
size distribution

25

(3 and 4)
Validation test of your
implementation

25

(5)
Empirical study on the IMPACT lab’s platforms

25

(bonus)


7
-

Logistics
This assignment must be done individually. All handins are electronic.
Clarifications and corrections will be posted to the blackboard.