Tải bản đầy đủ (.pdf) (13 trang)

Bài giảng Computer organization performance - Đại học Tôn Đức Thắng

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (386.83 KB, 13 trang )

COMPUTER ORGANIZATION

Performance


Computer Performance:




Thời gian đáp ứng (hoặc thời gian thực hiện).


“thời gian giữa lúc bắt đầu và việc hoàn thành một nhiệm vụ”



Mất bao lâu để chạy một công việc?



Tôi phải đợi bao lâu để truy vấn cơ sở dữ liệu.?

Throughput


“ tổng số lượng công việc thực hiện xong trong một thời gian nhất 
định.“




Có bao nhiêu việc mà máy có thể chạy cùng một lúc?



Có bao nhiêu việc được kết thúc?



Nếu chúng tôi nâng cấp một máy tính với một bộ xử lý 
mới, chúng ta cải thiện những gì?



Nếu chúng ta thêm một bộ xử lý bổ sung cho hệ thống, 
những gì chúng tôi  đãcải thiện?


CPU Performance:
Chúng tôi sẽ sử dụng "n times faster", có nghĩa là cả hai tăng hiệu suất 
và giảm xuống thời gian thực hiện.



Đối với một số chương trình đang chạy trên 
máy X,.
Performance X = 1 / Execution time X



"X là n times faster hơn Y"

Performance X  / Performance Y = n




Performance ­ Execution 
Time:
Elapsed Time (response or execution time)

Tổng thời gian để hoàn thành một nhiệm vụ đếm tất cả mọi 
thứ (các quá trình khác đang chạy, đĩa và truy cập bộ nhớ, I / 
O, vv).
Thời gian CPU
◦ không đếm để chờ I / O hoặc thời gian chạy các chương trình 
khác.
◦ có thể được chia vào trong thời gian hệ thống và thời gian sử 
dụng.







User CPU time
◦ thời gian dành cho người dùng chương trình 
System CPU time
◦ thời gian dành cho hệ điều hành thực hiện nhiệm vụ đại diện 
cho chương trình.



Clock cycles:


Thời gian đáp ứng:
thời gian đáp ứng: Thời gian đáp ứng là tốc độ 
của các viên nén trên một điểm ảnh thay đổi từ 
màu đen sang màu trắng rồi thay đổi từ màu 
trắng thành màu đen một lần nữa, có số càng 
nhỏ càng tốt và có đơn vị là ms(millisecond). 
  Công thức tính
Response time = queue time + service time



Throughput:


là một số giao dịch/yêu cầu mà được tạo ra trong 
một thời gian thử nghiệm, dùng để cho biết là hệ 
thống làm việc này có khả năng quảng lý bao 
nhiêu trong mỗi đơn vị của thời gian. 

Công thức tính
Throughput = (số lượng yêu cầu) / tổng sos thời 
gian làm việc



So sánh hai quan điểm:



Đối với thời gian đáp ứng: thời hạn của một số 
chương trình thực hiện ngắn hơn.



Đối với Thông dụng(Throughput):  nhiều việc xử 
lý có thể kết thúc cùng một thời hạn.


CPU Time:
CPU time (or CPU Execution time) is the time 
between the start and the end of execution of a 
given program. This time accounts for the time 
CPU is computing the given program, including 
operating system routines executed on the 
program’s behalf and it does not include the time 
waiting for I/O and running other programs.
 CPU time is a true measure of processor/memory 
performance.
 Performance of processor/memory = 1 / CPU 
time.



Amdahl’s Law:
Gene Amdahl [AMDA67]
 Potential speed up of program using multiple 
processors

 Concluded that:


◦ Code needs to be parallelizable
◦ Speed up is bound, giving diminishing returns for more 

processors



Task dependent
◦ Servers gain by maintaining multiple connections on 

multiple processors
◦ Databases can be split into parallel tasks


Amdahl’s Law Formula:


For program running on single processor

 Fraction f of code infinitely parallelizable with no scheduling 
overhead
 Fraction (1­f) of code inherently serial
 T is total execution time for program on single processor
 N is number of processors that fully exploit parallel portions of 
code










Conclusions
­
­

f small, parallel processors has little effect
 N ­>∞, speedup bound by 1/(1 – f)


What Is a Benchmark?


Thuật ngữ “Benchmark" cũng thường được áp dụng 
cho các chương trình thiết kế đặc biệt sử dụng trong 
benchmarking.



A benchmark should:







be domain specific (the more general the benchmark, the less 
useful it is for anything in particular)
be a distillation of the essential attributes of a workload
avoid using single metric to express the overall performance

Computational benchmark kinds



synthetic: specially­created programs that impose the load on 
the specific component in the system
application: derived from a real­world application program

12


Purpose of Benchmarking:




To define the playing field
To provide a tool enabling quantitative comparisons
Acceleration of progress




enable better engineering by defining measurable and repeatable 

objectives

Establishing of performance agenda

measure release­to­release or version­to­version progress
◦ set goals to meet
◦ be understandable and useful also to the people not  having the 
expertise in the field (managers, etc.)


13



×