Sripatum University IS516 การสื่อสารคอมพิวเตอร์และเครือข่าย Information Science Institute of Sripatum University

Download Report

Transcript Sripatum University IS516 การสื่อสารคอมพิวเตอร์และเครือข่าย Information Science Institute of Sripatum University

Information Science Institute of Sripatum University
IS516
Computer Communication and Networks
ื่ สารคอมพิวเตอร์และเครือข่าย
การสอ
Asst.Dr.Surasak Mungsing
[email protected]
[email protected]
http://www.spu.ac.th/teacher/surasak.mu
Sripatum University
1
SPU
Lecture 08
Network Performance
2
Information Science Institute of Sripatum University
Types of Information (1/2)

Audio
• CD audio quality: 44000smp/sec, each
sample using 16 bits
• 16 bits * 44000smp/sec = 1.41mbps to
transmit clearly

Data
• Digital data is binary: uses 1s and 0s to
represent everything
• Data encoded in strings i.g. ASCII
3
SPU
Information Science Institute of Sripatum University
Types of Information (2/2)

Image
• Common Raster Formats; JPEG, GIF
• Common Document Formats: PDF, Postscript, (Both
include text and graphics)
• More pixels=better quality=larger size
• More compression=reduced quality=increased speed
• “Lossy” gives from 10:1 to 20:1 compression
• “Lossless” gives less than 5:1
• Format (vector vs bitmapped/raster) affects size and
therefore bandwidth requirements

Video
•
•
Sequences of images over time
Significantly higher bandwidth requirements in order to
send images (frames) quickly enough
4
SPU
Information Science Institute of Sripatum University
ิ ธิภาพบนระบบเครือข่าย
ปัญหาเกีย
่ วก ับประสท


ความค ับคง่ ั ของข้อมูลเนือ
่ งจากการใชง้ านเกินขีด
ความสามารถของทร ัพยากรทีม
่ ี
้ ป
การใชอ
ุ กรณ์ตอ
่ พ่วงหลายชนิดทีไ่ ม่สมดุลก ัน

ปัญหา “Broadcast storm” อ ันเนือ
่ งจากการกาหนด
ค่าพารามิเตอร์สาหร ับการควบคุมผิดพลาดในการ
ื่ สารแบบกระจายข่าว
สอ

ปัญหาการ “Restart” โฮสภายหล ังจากทีร่ ะบบไฟฟ้า
่ ภาพปกติ
กล ับคืนสูส
5
SPU
Information Science Institute of Sripatum University
้ วบคุมการ
ปัญหาการนาโปรโตคอลแบบเก่ามาใชค
ื่ สารในระบบเครือข่ายความเร็วสูงมาก
สอ
Boston
้
การใชระบบ
เครือข่าย
ความเร็วสูงมาก
อาจทาให ้เกิด
การสง่ ข ้อมูลทีม
่ ี
ประสอทธิภาพ
ตา่ มากได ้
San Diego
สมมุตฝ
ิ ่ ายรับมี buffer 64KB ความเร็วในการสง่ ข ้อมูล 1 Gbps (จาก San
Diego ไปยัง Boston) ระยะเวลาในการสง่ ข ้อมูลถึงผู ้รับ 20 ms
(a) ทีเ่ วลา t = 0, (b) เมือ
่ เวลาผ่านไป 500 μsec, (c) เมือ
่ เวลาผ่านไป 20 msec,
(d) เมือ
่ เวลาผ่านไป 40 msec
6
SPU
Information Science Institute of Sripatum University
้ วบคุมการสอ
ื่ สาร
ปัญหาการนาโปรโตคอลแบบเก่ามาใชค
ในระบบเครือข่ายความเร็วสูงมาก (2/2)
การสง่ ข ้อมูลสง่ ข ้อมูล 64 KB ด ้วยความเร็วในการสง่ ข ้อมูล 1 Gbps เสร็จ
ื่ สารและผู ้สง่
ในเวลา 0.5 ms แพ็กเก็ต TPDU ทัง้ หมดจึงอยูใ่ นสายสอ
จะต ้องหยุดสง่ จนกว่าจะได ้รับอนุญาตจากผู ้รับ
ระยะเวลาในการสง่ ข ้อมูลจากผู ้สง่ ไปถึงผู ้รับ 20 ms (TPDU ตัวแรก
เดินทางไปถึง)
้
ต ้องใชเวลา
40 ms นับตัง้ แต่เริม
่ ต ้นการทางาน แพ็กเกตตอบรับตัวแรก
เดินทางไปถึงผู ้สง่ ซงึ่ จะสามารถสง่ ข ้อมูลชุดที่ 2 ออกมาได ้
ื่ สารถูกใชงานเพี
้
จะเห็นได ้ว่า สายสอ
ยง 0.5 ms จากเวลาทัง้ หมด 40 ms
้
ื่ สาร
หรือประมาณ 1.25% เท่านัน
้ อีก 98.5% คือเวลาทีไ่ ม่ได ้ใชสายส
อ
เลย
7
SPU
Information Science Institute of Sripatum University
Bandwidth-Delay Product




้
ิ ธิภาพของ
เป็ นตัวเลขทีน
่ ามาใชในการพิ
จารณาประสท
เครือข่าย
คานวณจากผลคูณของ bandwidth มีหน่วยเป็ น bps กับ
ระยะเวลาในการเดินทางของข ้อมูล 1 รอบ (หน่วยเป็ น
sec)
จากตัวอย่าง bandwidth-delay product มีคา่ 40 Mb ซงึ่
หมายความว่าผู ้สง่ จะต ้องสง่ ข ้อมูลขนาด 40 ล ้านบิต จึงจะ
ื่ สารดาเนินไปทีค
ทาให ้การสอ
่ วามเร็วสูงสุดตลอดเวลา นับ
จนกระทัง่ ข ้อมูลตอบรับของข ้อมูลชุดแรกเดินทางกลับ
มาถึงผู ้สง่
ิ ธิภาพการทางานจะอยูใ่ นระดับทีด
ประสท
่ เี มือ
่ หน ้าต่าง
ื่ สาร (window) ของผู ้รับมีขนาดเท่ากับค่าของ
สอ
bandwidth-delay product
8
SPU
Information Science Institute of Sripatum University
Network Performance


้
Response Time – เวลาทีร่ ะบบใชในการ
ตอบสนองเมือ
่ ได ้รับข ้อมูลนาเข ้า
Throughput – ปริมาณงานทีค
่ อมพิวเตอร์ทา
ได ้ในชว่ งเวลทีก
่ าหนด
9
SPU
Information Science Institute of Sripatum University
Response Time

การตอบสนองของผู ้ใช ้ (User response time)

การตอบสนองของระบบ (System response time)

้
เวลาทีใ่ ชในการส
ง่ ข ้อมูลผ่านเครือข่าย (Network
transfer time - throughput)
10
SPU
Information Science Institute of Sripatum University
Response Time Requirements
11
SPU
Information Science Institute of Sripatum University
Bandwidth Requirements
What
happens
when
bandwidth is
insufficient?
How
long does
it take to
become
impatient?
Is
data
communicatio
n ever “fast
enough”?
12
SPU
Information Science Institute of Sripatum University
Response time range

มากว่า 15 วินาที
•

้
้ ได ้กับ
การตอบสนองทีใ่ ชเวลานานมากกว่
า 15 วินาทีแทบจะใชไม่
การสนทนาโต ้ตอบกัน หรือแม ้แต่การรอคาตอบจากการสอบถามต่อ
ครัง้ ยิง่ ถ ้าเป็ นคนเร่งรีบแล ้วดูเหมือนว่าจะรับไม่ได ้เลย ถ ้ามีความ
้
ล่าชาในการตอบสนองมากถึ
งระดับนี้ ผู ้ออกแบบระบบจะต ้อง
ออกแบบให ้สามารถเปลีย
่ นไปทากิจการอืน
่ ได ้ในระหว่างรอการ
ตอบสนองของกิจกรรมทีผ
่ า่ นมา
มากกว่า 4 วินาที
•
้
โดยทั่วไปแล ้วการตอบสนองทีใ่ ชเวลามากกว่
า 4 วินาทีดเู หมือนจะ
นานเกินไปสาหรับกิจกรรมกับเจ ้าหน ้าทีร่ ับสายในการให ้ข ้อมูลเพือ
่
แก ้ปั ญหา เนือ
่ งจากเจ ้าหน ้าทีจ
่ ะไม่สามารถระลึกถึงข ้อสนทนา
้
สนทนาได ้อย่างครบถ ้วน ความล่าชาในการตอบสนองระดั
บนีน
้ ับว่า
เป็ นอุปสรรคอย่างยิง่ ต่อการแก ้ปั ญหาและมักทาให ้เกิดอาการ
หงุดหงิดในการให ้ข ้อมูล แต่ถ ้าการสนทนาประเด็นหลักๆครบถ ้วน
แล ้ว เวลาในชว่ งเวลา 4-15 วินาทีนน
ี้ ับว่าพอรับได ้
13
SPU
Information Science Institute of Sripatum University
Response time range (cont.)

2 -4 วินาที
•

้
การตอบสนองทีใ่ ชเวลานานกว่
า 2 วินาทีถอ
ื ว่าเป็ นอุปสรรคต่อ
้
การสนทนากับเจ ้าหน ้าทีร่ ับสายทีต
่ ้องใชสามาธิ
ในการทางานสูง
การต ้องรอคอยเป็ นเวลา 2-4 วินาทีด
่ เู หมือนว่าจะนานเกินไป
้ ถ
สาหรับผู ้ใชที
่ ก
ู หน่วงไว ้แต่อย่ในอารมณ์ต ้องการให ้การสนทนา
ิ้ โดยเร็ว แต่ชว่ งเวลาทีร่ อคอยนีก
เสร็จสน
้ ็สามารถเป็ นทีย
่ อมรับได ้
ถ ้าได ้พูดประเด็นสาตัญบางประการไปบ ้างแล ้ว
น้อยกว่า 2 วินาที
•
้
เมือ
่ ผู ้ใชปลายทางต
้องจดทาข ้อมูลจากการตอบสนองโดยระบบ
หลายๆครัง้ ระยะเวลาในการตอบนองจะต ้องเร็ว ยิง่ ข ้อมูลที่
จะต ้องจดจามีมาก ก็ยงิ่ ต ้องการเวลาตอบสนองน ้อยกว่า 2 วินาที
สาหรับกิจกรรมทีต
่ ้องมีการวางแผนอย่างละเอียด การตอบสนอง
ของระบบก็จะต ้องถูกจากัดไว ้ทีไ่ ม่เกิน 2 วินาที
14
SPU
Information Science Institute of Sripatum University
Response time range (cont.)

ไม่ถงึ 1 วินาที (Subsecond response time)
•

้
สาหรับงานทีต
่ ้องใชความคิ
ดมากบางประเภท โดยเฉพาะงาน
้
ประเภท graphics นัน
้ ต ้องการเวลาทีใ่ ชในการตอบสนองเร็
วมาก
้ ้นานๆ
เพือ
่ ดึงดูดความสนใจของผู ้ใชไว
ไม่ถงึ 0.1 วินาที
•
การตอบสนองของการกดคียบ
์ นแป้ นพิมพ์และเห็นตัวอักษรแสดง
้
์ ลิ๊ กที่ object บนจอภาพต ้องการ
บนจอภาพ หรือการใชเมาส
ค
การตอบสนองเกือบจะโดยทันที นั่นคือ น ้อยกว่า 0.1 วินาที
15
SPU
Information Science Institute of Sripatum University
System Tuning



การใช ้ buffer ขนาดและ priority ของการ
ประมวลผลอย่างเหมาะสม
การกาหนดระยะเวลารอคอย (timeout) ให ้
เหมาะสม
้
ใชเทคนิ
คทีเ่ รียกว่า “piggyback”
16
SPU
Information Science Institute of Sripatum University
Basic Loop to improve network
performance
ิ ธิภาพการทางานตา่ เกินไป
เมือ
่ เครือข่ายมีประสท
ผู ้บริหารระบบ
ิ ธิภาพระบบ ซงึ่
จาเป็ นต ้องแก ้ไข สงิ่ แรกทีจ
่ ะต ้องทาคือการวัดประสท
ิ ธิภาพดังนี้
มีวงรอบการปรับปรุงประสท

ิ ธิภาพของพารามิเตอร์ตา่ งๆ
วัดประสท

ทาความใจปั ญหาทีเ่ กิดขึน
้

เปลีย
่ นแปลงค่าพารามิเตอร์ครัง้ ละ 1 ตัว
วงรอบการทางานนีจ
้ ะต ้องกระทาซา้ ไปเรือ
่ ยๆจนกว่า
ิ ธิภาพของระบบจะอยูใ่ นเกณฑ์ทพ
ประสท
ี่ อใจหรือแน่ใจว่า
ระบบอยูใ่ นภาวะทีด
่ ท
ี ส
ี่ ด
ุ แล ้ว
17
SPU
Information Science Institute of Sripatum University
Simulation Result
Response as a function of load.
18
SPU
Information Science Institute of Sripatum University
System Design for Better Performance
Rules:

ความเร็วของ CPU สาคัญมากกว่าความเร็วของเครือข่าย

ลดการนับแพ็กเกตชว่ ยลดเวลาการทางานของซอฟต์แวร์

ทาการสลับสายให ้น ้อยทีส
่ ด
ุ

ทาสาเนาข ้อมูลให ้น ้อยทีส
่ ด
ุ Minimize copying.

คุณสามารถจ่ายเพือ
่ เพิม
่ ค่า bandwidth แต่ไม่สามารถจ่าย
เพือ
่ ลดความล่าชา้

การหลีกเลีย
่ งสภาวะคับคัง่ ดีกว่าการแก ้ไข

หลีกเลีย
่ งการใช ้ timeout
19
SPU
Information Science Institute of Sripatum University
TCP Congestion Control
(a) เครือข่ายความเร็วสูงสง่ ข ้อมูลให ้ผู ้รับความจุตา่
(b) เครือข่ายความเร็วตา่ 20
สง่ ข ้อมูลให ้ผู ้รับความจุสงู
SPU
Information Science Institute of Sripatum University
System Design for Better Performance
Context switches ทางาน 4 ครัง้ เพือ
่ จัดการกับแพ็กเก็ตหนึง่ ด ้วย
user-space network manager.
21
SPU
Information Science Institute of Sripatum University
Fast TPDU Processing
The fast path from sender to receiver is shown with a heavy
line.

The processing steps on this path are shaded.
ต้องมีการตรวจสอบว่า (1) ระบบมีสถานะการทางานเป็ น established
หรื อไม่ (2) ไม่มีฝ่ายใดต้องการยกเลิกการสื่ อสาร (3) เป็ นแพ็กเกต TPDU เต็ม
ขนาด (4) ฝ่ ายผูร้ ับยังคงมีพ้นื ที่สาหรั22บรับข้อมูล
SPU
Information Science Institute of Sripatum University
ความต้องการโปรโตคอลความเร็วสูง
Computing speed

ื่ สารมีความเร็วสูงมาก
สายสอ

โปรแกรมประยุกต์ทเี่ ป็ น multimedia
23
SPU
Information Science Institute of Sripatum University
Protocols for Gigabit Networks
Time to transfer and acknowledge a 1-megabit file over a 4000-km line.
24
SPU
Information Science Institute of Sripatum University
Gigabit Ethernet (GbE)

Transmitting Ethernet packets at a rate of a gigabit per second, defined by the IEEE 802.3z and 802.3ab
standards.

Initial standard for Gigabit Ethernet (802.3z) standardized by the IEEE in June 1998

802.3z is commonly referred to as 1000Base-X (where -X refers to either -CX, -SX, -LX, or (nonstandard) -ZX).

IEEE 802.3ab, ratified in 1999, defines Gigabit Ethernet transmission over unshielded twisted pair (UTP)
category5, 5e, or 6 cabling and became known as 1000Base-T.

Fiber Gigabit Ethernet has recently been overtaken by 10 Gigabit Ethernet , ratified by the IEEE in 2002
and provided data rates 10 times greater than that of Gigabit Ethernet
25
SPU
Information Science Institute of Sripatum University
Gigabit Ethernet packets
The Gigabit Ethernet data link layer encapulates packets with
a frame header (which includes MAC addresses and other
header information) and a 32-bit Frame Check Sequence
(FCS) before encoding to send them across the physical
(fiber or copper) medium
26
SPU
Information Science Institute of Sripatum University
Fiber Optic Gigabit Ethernet

1000BASE-SX
•
•
•

1000BASE-LX
•
•
•

operates over multi-mode fiber, using 850 nanometer, near
infrared (NIR) light wavelength
usually work over significantly longer distances
highly popular for intra-building links in large office buildings
using a long wavelength laser, wavelength 1270 to 1355 nm
work over a distance of up to 2 km over 9 µm singlemode fiber
can also run over multi-mode fiber with a maximum segment
length of 550 m
1000BASE-CX
•
•
connections over short distances (maximum of 25 meters per
segment) using copper cable (balanced shielded twisted pair)
succeeded by 1000BASE-T
27
SPU
Information Science Institute of Sripatum University
Copper Cabling Gigabit Ethernet

1000BASE-T
•
•
•

also known as IEEE 802.3ab, standard for Gigabit Ethernet
over copper wiring
requires, at a minimum, Category 5 cable, but Category 5e
("Category 5 enhanced") and Category 6 cable is often
recommended
requires all four pairs to be present
1000BASE-TX
•
•
reduced the cost of the required electronics by only using two
pair in each direction
required Category 6 cable
28
SPU
Information Science Institute of Sripatum University
29
SPU
การวัดประสิ ทธิภาพของเครื อข่ าย
30
Information Science Institute of Sripatum University
Network Performance Measurement
Why do it?

Capacity Planning -- Probably the #1 reason to do
this.

Assist operations provide information for the NOC
and engineering with data that can't be found from
the NMS

Value-added service -- providing reports to customers

Usage-based billing -- Not going to talk about this
much
31
SPU
Information Science Institute of Sripatum University
Basic Measurements

Bandwidth utilization -- particularly important for customers
-- A common cause of performance problems

Packets per second -- this is less important now, but more
on this issue

Round Trip Time (RTT) -- It's a good measurement for longterm trend analysis

RTT variance -- more on this later

Backbone packet loss

Reachability -- Why is packet loss occurring? (examining
ICMP responses)

Circuit Performance -- How are our carriers doing?

Bandwidth Utilization and Packets Per second --- MIB-II
variables are listed (except one)
32
SPU
Information Science Institute of Sripatum University
Why these measurements?
 Packet Counters
•

RTT
•

provides critical view of performance -- the end user will feel it.
Correlation can lead to the reasons for packet loss. The Ideal end result
will be the ability to predict this before it happens and act to prevent it.
Reachability
•

can be an indicator of standing queue and congestion, not just
distance
Backbone Packet Loss
•

are a good indicator of CPU utilization and does not require using
enterprise mibs.
polling all devices in less than 60 seconds (for 10,000 devices) is a
design criterion
Circuit performance
•
Track Circuit errors -- Degrading Circuits can be caught before they go
33
down hard
SPU
Information Science Institute of Sripatum University
Parameters Measured

Parameters measured are:




Bandwidth – Data transferred / time
Delay Time taken for data to transfer
(App level)
Packet Loss – Affects Throughput and Apps.
Preferred parameters



High Bandwidth
Small Delay
Low Packet loss
34
SPU
Information Science Institute of Sripatum University
Tools

Multi Router Traffic Grapher.

Measures…


load on network links (Edge-Routers).
Network Traffic.
System Load, Login Sessions, Modem
availability
Output….
 HTML,
 LIVE presentation.
 Graphical Images.


35
SPU
Information Science Institute of Sripatum University
National Laboratory for Applied Network Research
(NLANR) Tools

Autobuf / FTP


Iperf


Iperf is a TCP and UDP bandwidth testing tool, similar
in function to the traditional ttcp tool but nicer.
Multicast Beacon


Autotuning FTP client and server.
Beacon is a multicast diagnostic tool, showing packet
loss, delay, jitter, out-of-order packets, and duplicate
packets for a given multicast group.
Netlog

Netlog is a C library that can be linked into an existing
network application to provide instrumentation of network
performance.
36
SPU
Information Science Institute of Sripatum University
NLANR Tools

Network Tools from CAIDA
 A family of modules intended for pipeline use

Squid
 Squid is a high-performance proxy caching server
for web clients, supporting FTP, gopher, and HTTP
data objects. Unlike traditional caching software,
Squid handles all requests in a single, non-blocking,
I/O-driven process.

Tuning Network Performance from NCNE
 Tuning your high-performance connection

Viznet
 Java application to visualize network bandwidth
performance over time.
37
SPU
Information Science Institute of Sripatum University
ข้อควรระว ังเมือ
่ ทาการว ัดค่าต่างๆ

่ การวัด
ต้องแน่ใจว่าปริมาณการว ัดจะต้องมากพอ เชน

้ ็ นต ัวแทนทีแ
่ ควร
ต้องแน่ใจว่าต ัวอย่างทีใ่ ชป
่ ท้จริง เชน

้ ารจ ับเวลาในเกณฑ์หยาบ
ต้องระว ังเป็นพิเศษเมือ
่ ใชก

้ ในระหว่างการ
ต้องแน่ใจว่าไม่มเี หตุการณ์อน
ื่ เกิดขึน
ทดสอบ เชน่ การเร่งทางานสง่ ของนักศกึ ษาจานวนมาก หรือ
ระยะเวลาในการสง่ แพ็กเกต ควรกระทาเป็ นจานวนหลายแสนหรือ
หลายล ้านครัง้ แล ้วจึงคานวณหาค่าตัวแทนกลุม
่ ตัวอย่างด ้วยวิธก
ี าร
ทางสถิต ิ
ทาในวันและเวลาทีต
่ า่ งๆกันเพือ
่ จะได ้สะท ้อนให ้เห็นสงิ่ ทีเ่ กิดขึน
้ จริง
ของระบบ
อาจใชเ่ ทคนิคการทางานวนซ้าเป็ นจานวนหนึง่ ล ้านครัง้ แล ้วหา
ค่าเฉลีย
่ จากการจับเวลาตัง้ แต่ต ้นจนจบ
ในขณะทีม
่ ก
ี ารประชุมแบบ Video conference
38
SPU
Information Science Institute of Sripatum University
ข้อควรระว ังเมือ
่ ทาการว ัดค่าต่างๆ (ต่อ)

้ น่วยความจา cache ทาให้ผลการว ัด
การใชห
คลาดเคลือ
่ น การวัดค่าการเคลือ่ นย ้ายแฟ้ มข ้อมูลควรจะเลือกใช ้
แฟ้ มข ้อมูลทีม
่ ข
ี นาดใหญ่มาก จากนัน
้ ทาซ้าหลายๆครัง้ เพือ
่ นาค่าเฉลีย
่
้ มข ้อมูลทีม
ไปใช ้ ควรใชแฟ้
่ ข
ี นาดอย่างน ้อยสองเท่าของขนาด
หน่วยความจา cache

ั
ต้องมีความเข้าใจอย่างชดเจนในส
งิ่ ทีก
่ าล ังทาการว ัด

ต้องระว ังการคาดหว ังจากผลล ัพธ์ การจาลองผลทีใ่ ชข้ ้อมูล
้
การวัดระยะเวลาทีใ่ ชในการอ่
านข ้อมูลจากเครือ
่ งอืน
่ บนระบบเครือข่าย
นัน
้ ค่าทีเ่ กีย
่ วข ้องจะขึน
้ อยูก
่ บ
ั ชนิดของเครือข่ายทีใ่ ช ้ ระบบปฏิบต
ั ก
ิ าร
ื่ สาร โปรแกรมทีใ่ ชงานและอื
้
อุปกรณ์เครือข่ายการสอ
น
่ ๆ
ึ ว่าผลทีจ
น ้อยเกินไปอาจทาให ้เกิดความรู ้สก
่ ะเกิดจากการ prediction
จะเป็ นตาม trend ทีเ่ ป็ นผลจากการทดลอง
39
SPU
Information Science Institute of Sripatum University
Next Lecture:
Internet and Applications
40
SPU