Performance
# Performance Problem
==> Network socket queue, DB IO queue, OS run queue
Reasons for queue build-up
# Inefficient slow processing
# Serial resource access
# Limited resource capacity
Performance Principles
# Efficiency ? { resource, logic , data storage, caching }
# Concurrency ?
# Capacity
Performance Objective
# Minimize request response latency
# Maximize throughput
# Network Latency (handshaking), => SSL Session Cache, Static Data Cache (Reverse Proxy), Connection Pool, Token , Data format & Compression
# Disk Latency => logging { asynchronize logging , memory disk , web contenet file =reverse proxy}
# CPU Latency => inefficient Alorithm , Context Switching => large thread pool size *
Main Thread
Other working thread
Queue, thread number
Locks (minimize lock contention)
# Reduce the duration of lock, concurrent hashmap (review)
沒有留言:
張貼留言