본문 바로가기
CS/3-1 컴구

[컴퓨터구조] #8. Performance

by 이지이즤 2022. 4. 1.

 

Lec 8. Performance (Computer Abstractions and Technology)

 

- Response Time and Throughput
  -> 컴퓨터 성능 측정 방법

  Response Time (Execution time, Latency) 실행 시간
  : 시작~종료 시간.
    individual users에게 중요함, Embedded computers 와 PCs 의 관심사

  Throughput
  : 전체 task가 종료되는 시간.
    data center / supercomputer managers에게 중요함, Servers의 관심사

   Pipeline 사용 후 Throughput이 향상되었음. (response time 향상에는 도움 안됨)

 

 


 

Let's focus on response time for now ...

 

- Relative Performance
  : performance(성능) = 1/execution_time(실행 시간)
    X컴퓨터가 Y컴퓨터 보다 n배 빠르다면,
    performance_X / performance_Y = execution time_Y / execution time_X = n

example

 

- Measuring Execution Time
  Execution time
  : is measured in seconds per program, determines the system performance
   ex) disk access, memory access, I/O activities, OS overhead 등을 포함함.
  -> 그중에 우리는 CPU 동작 시간에만 집중해보자
  CPU time
  : the tome CPU spent processing a given job

 

- CPU Clock
  : CPU time 이용해서 성능 측정해보자.
    모든 컴퓨터는 sync with clock.

    clock cycles : discrete time intervals 
    Clock period (T) : duration of a clock cycle
    Clock frequency (f) : clock cycles per second (1/T)

- CPU Time
  = CPU clock cycles * clock cycle time (T)
  = CPU clock cycles / Clock frequency (f)

  성능 CPU Time CPU clock cycles Clock frequency

example

 

- Instructions and CPI
  : 컴퓨터는 프로그램을 가동할 때 명령어를 실행하기 때문에
    execution time은 명령어의 개수에 영향을 받음.

 - CPU clock cycles
   = # instructions * AVG. clock cycles per inst (CPI)

  CPU Time 
  = # insts * CPI * T
  = # insts * CPI / f 

 

 

- CPI in More Detail

 

- Performance Summary

 

 


 

 

- SPEC CPU Benchmark
  : Benchmarks 는 성능 측정에 사용되는 프로그램임.
    (Standard Performance Evaluation Corp)

- Amdahl's Law
  : 어떤 것을 개선했을 때, 그 개선된 부분이 영향을 미치는 부분과 미치지 않는 부분을 
    함께 고려해야 전체적으로 얼만큼 향상되었는지 계산할 수 있음.
   -> 시사점 : Make the common case fast!! (자주 사용하는 경우를 빠르게 만들어라)

 

 


 

 

- Units
  : Kilobyte (KB) -> 2^10 or 1024bytes != 10^3 (혼동)
                     -> new units 
                     -> KB = 10^3, KiB = 2^10

댓글