lect3..ppt - 09/13/04 cis 4100 systems performance and evaluation lecture 4 by zornitza genova...

Post on 01-Jan-2016

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lect3..ppt - 09/13/04

CIS 4100 Systems Performance and Evaluation

Lecture 4

byZornitza Genova Prodanoff

ZGP002

Lecture Outline

Chapter 2:• Types of networks• Network protocols• Client/Server Model• Peer-to-Peer Model• Web services protocols

ZGP003

The client (process)

• Runs on a desktop• Makes requests for services• Executes a portion of the application code

The server (process)• Executes a set of functionally related services• Never initiates a message exchange with a client• Implements a queue to hold client requests as they arrive

Request-reply protocol: client sends requests and server replies

Queue of client requests at the server

Server throughput is the number of requests served per unit time

Client/Server Communication

ZGP004

Client/Server Communication (continued)

ZGP005

• Fig. 2.14a shows that if only one request is served at a time,

the resources at the server machine may be underutilized, the server throughput (number of requests served per time unit) may be low, and response time to clients will increase as the load on the server increases

• Fig. 2.14b shows that most servers create multiple processes or multiple threads of execution in a single process to handle the queue of incoming requests

Client/Server Communication (continued)

ZGP006

Client/Server Communication (continued)

ZGP007

• Using multiple threads or processes has an interesting

effect on response time as shown in Fig. 2.15.

• The figure shows two response time curves: one for an arrival rate of 2.5 requests/sec and the other for 3.6 requests/sec. It is assumed that each request uses 0.07 sec of CPU time and 0.2 sec of disk time.

Client/Server Communication (continued)

ZGP008

Client/Server Communication (continued)

ZGP009

• As the curves illustrate, when the number of threads

increases from one to two, the response time decreases because of the decrease in the time spent by a request waiting for an available thread.

• However, as the number of threads increases beyond this point, the additional time spent by a request contending for the same hardware resource dominates the decrease in thread waiting time, leading to a net increase in response time.

• The average number of active threads will not increase. When the number of threads becomes large enough, the thread waiting time becomes negligible (given a constant arrival rate)

• Response time does no longer vary with the number of threads

Client/Server Communication (continued)

ZGP0010

• Two-tier vs. three-tier model

• “Fat” vs. “thin” clients

• Use caches to relieve the server from some of the load. −If 30% of 900 requests are serviced by the cache, then

only (1-.30) x 900 = 630 requests are serviced by the server.

−Trade-offs are:−Updates of cache content are needed to maintain

consistency (a fresh copy of the files)−Overhead processing for misses: first check the cache

then request from server vs. request from server directly

Client/Server Communication (continued)

ZGP0011

Client/Server Communication (continued)

ZGP0012

Server Types:• File servers• Database servers• Application servers• Groupware servers• Object servers• Web servers• Software servers

Client/Server Communication (continued)

ZGP0013

• Hypertext Markup Language (HTML)

−Integrate images and other multimedia objects, as well as software applications

• Application layer protocol• Runs on top of TCP/IP

Hyper Text Transfer Protocol (HTTP)

ZGP0014

• HTTP 1.0 vs. HTTP 1.1

• HTTP 1.0−Allows for embedded documents in the HTML file−The client browser opens a separate connection with

the server for each requested file: html, image, etc.−Client does not need to wait for connection termination

before another connection request is sent−Images are downloaded transparent to user: HTTP

response, containing the URL for the image is parsed before a new connection request is made

Hyper Text Transfer Protocol (HTTP) (continued)

ZGP0015

• HTTP 1.1

−Allows for embedded documents in the HTML file−“Persistent connections”: The client browser opens a

(single) connection with the server for the html file. Then, embedded documents are requested within this same TCP connection

−Pipelined requests: multiple requests are sent without waiting for response (ACK)

−Pipelined HTTP 1.1 outperforms parallel connection based HTTP 1.0

Hyper Text Transfer Protocol (HTTP) (continued)

ZGP0016

ZGP0017

• Figure 2.17: HTTP 1.1 vs. HTTP 1.0

−HTTP 1.1. results in 3 RTTs (vs. 4 RTTs with HTTP 1.0)−Improving performance with HTTP 1.1−Reducing the number of packets sent −Better affect on network performance (less congestion)

• It has been shown that pipelined request based HTTP 1.1 outperforms HTTP 1.0 even if parallel TCP connections are initiated with HTTP 1.0

Hyper Text Transfer Protocol (HTTP) (continued)

ZGP0018

Peer-to-Peer Model

• Problems with C/S model−Server seen as a central node:

− Scalability − Reliability

• Peer-to-Peer model: a collaborative and distributed approach to computing

• A study conducted at a major company with 10,000 workstations

−75% of CPU cycles in the workstations or network nodes such as routers are idle

−50% of disk space is free

ZGP0019

Peer-to-Peer Model (continued)

• 10 billion MHz & 10,000 TB not utilized at the edges of the Internet (see openP2P.com)

• The size of the networks and the complexity/requirements from the protocols steadily increase

• Bandwidth consumption attributed to popular file sharing applications reaches 60% of the total Internet traffic

• Must be able to locate the resources efficiently

ZGP0020

• Peer-to-Peer model: sharing of resources available at the

edges of the Internet

• In a P2P system, distributed computing nodes of equal roles or capabilities exchange information directly with each other

• Resources could be content, storage, CPU-cycles, bandwidth

• P2P paradigm has many plausible characteristics:−Scalability−No centralized authority, −Robustness−Cooperation, sharing−Anonymity

Peer-to-Peer Model (continued)

ZGP0022

Routing Indexes

• No-indexing (Gnutella)• Centralized index (Napster)• Distributed index (FreeNet)

Peer-to-Peer Model (continued)

ZGP0023

Advantages of Peer-to-Peer model: • Performance gain with much less cost • Self-organization• Load balancing • Adaptation • Fault-tolerance• Mobile devices

Peer-to-Peer Model (continued)

ZGP0024

Open problems:• Locating and addressing • Caching of passing through objects• How to identify an Object• Network usage and participation

Peer-to-Peer Model (continued)

ZGP0025

• Queries propagate across nodes, each node does some

processing and uses resources

• Bandwidth: The average over a set of representative queries of the aggregate BW consumed (in bytes) over each edge on behalf of the query

• Processing: The average over a set of representative queries of the aggregate processing power consumed at each node on behalf of the query

Peer-to-Peer Model (continued)

ZGP0026

• Gnutella: BFS technique is used with depth limit of D, where

D= TTL of the message. At all levels < D query is processed by each node and results are sent to source and at level D query is dropped.

• Freenet: uses DFS with depth limit D. Each node forwards the query to a single neighbor and waits for a definite response from the neighbor before forwarding the query to another neighbor (if the query was not satisfied), or forwarding the results back to the query source (if query was satisfied).

Peer-to-Peer Model (continued)

ZGP0027

Services provided to users via the Web

Web service architecture:• Provider • Registry• Requester

• A service is an application available for use by requesters that fit the prerequisites specified by the service provider

• Web services can be composed with other services

• Services are deployed on the Web by service providers

Web Service Protocols

ZGP0028

Examples:• Stock Quotes• User Authentication• Payment Authorization• Airplane Ticket Purchase • Hotel Reservations

Web Service Protocols (continued)

ZGP0029

Automating:• Service Discovery• Service Execution• Service Composition• Service Interoperation

Web Service Protocols (continued)

ZGP0030

What is Web Service Discovery?

• Automatically locating services that perform given task and exhibit the requested properties

What is Web Service Composition and Interoperation?

• Includes selection of adequate Web services to perform a given task

Web Service Protocols (continued)

ZGP0031

Web Service Protocols (continued)

• Uniform service description format• Uniform service discovery protocols• Upper layers represent service interoperability protocols

ZGP0032

Simple Object Access Protocol (SOAP)• A World Wide Web Consortium (W3C) draft• Specifies how to use Extended Markup Language (XML) and

HTTP together• A uniform way of disseminating XML-encoded structured data

Web Service Protocols (continued)

ZGP0033

SOAP consists of three parts:• An envelop that defines a framework – specifies message

fields• A set of encoding rules – how to represent instances of

application defined data types• Syntax for remote procedure calls and responses -

SOAP results in no need to share a common programming language or distributed object infrastructure

Web Service Protocols (continued)

top related