Bài giảng Computer Organization - Performance

COMPUTER ORGANIZATION  
Performance  
Computer Performance:  
Thi gian đáp ng (hoc thi gian thc hin).  
“thi gian gia lúc bt đu và vic hoàn thành mt nhim v”  
Mt bao lâu đchy mt công vic?  
Tôi phi đi bao lâu đtruy vn cơ sdliu.?  
Throughput  
tng slượng công vic thc hin xong trong mt thi gian nht  
đnh.“  
Có bao nhiêu vic mà máy có thchy cùng mt lúc?  
Có bao nhiêu vic được kết thúc?  
Nếu chúng tôi nâng cp mt máy tính vi mt bxlý  
mi, chúng ta ci thin nhng gì?  
Nếu chúng ta thêm mt bxlý bsung cho hthng,  
nhng gì chúng tôi đãci thin?  
CPU Performance:  
Chúng tôi ssdng "n times faster", có nghĩa là chai tăng hiu sut  
và gim xung thi gian thc hin.  
Đi vi mt schương trình đang chy 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)  
Tng thi gian đhoàn thành mt nhim vđếm tt cmi  
th(các quá trình khác đang chy, đĩa và truy cp bnh, I /  
O, vv).  
Thi gian CPU  
không đếm đchI / O hoc thi gian chy các chương trình  
khác.  
có thđược chia vào trong thi gian hthng và thi gian sử  
dng.  
User CPU time  
thi gian dành cho người dùng chương trình  
System CPU time  
thi gian dành cho hđiu hành thc hin nhim vđi din  
cho chương trình.  
Clock cycles:  
Thi gian đáp ng:  
thi gian đáp ng: Thi gian đáp ng là tc độ  
ca các viên nén trên mt đim nh thay đi từ  
màu đen sang màu trng ri thay đi tmàu  
trng thành màu đen mt ln na, có scàng  
nhcàng tt và có đơn vlà ms(millisecond).  
Công thc tính  
Response time = queue time + service time  
Throughput:  
là mt sgiao dch/yêu cu mà được to ra trong  
mt thi gian thnghim, dùng đcho biết là hệ  
thng làm vic này có khnăng qung lý bao  
nhiêu trong mi đơn vca thi gian.  
Công thc tính  
Throughput = (slượng yêu cu) / tng sos thi  
gian làm vic  
So sánh hai quan đim:  
Đi vi thi gian đáp ng: thi hn ca mt số  
chương trình thc hin ngn hơn.  
Đi vi Thông dng(Throughput): nhiu vic xử  
lý có thkết thúc cùng mt thi hn.  
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?  
Thut ng“Benchmark" cũng thường được áp dng  
cho các chương trình thiết kế đc bit sdng 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  
pdf 13 trang yennguyen 12/04/2022 4020
Bạn đang xem tài liệu "Bài giảng Computer Organization - Performance", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_computer_organization_performance.pdf