常见性能问题

1.数据库:

  1. Working size exceeds available RAM
  2. Long & short running queries
  3. Write-write conflicts
  4. Large joins taking up memory

2.虚拟化:

  1. Sharing a HDD, disk seek death
  2. Network I/O fluctuations in the cloud

3.编程:

  1. Threads: deadlocks, heavyweight as compared to events, debugging, non-linear scalability, etc...
  2. Event driven programming: callback complexity, how-to-store-state-in-function-calls, etc...
  3. Lack of profiling, lack of tracing, lack of logging
  4. One piece can't scale, SPOF, non horizontally scalable, etc...

4.Stateful apps

  1. Bad design : The developers create an app which runs fine on their computer. The app goes into production, and runs fine, with a couple of users. Months/Years later, the application can't run with thousands of users and needs to be totally re-architectured and rewritten.
  2. Algorithm complexity
  3. Dependent services like DNS lookups and whatever else you may block on.
  4. Stack space

5.磁盘:

  1. Local disk access
  2. Random disk I/O -> disk seeks
  3. Disk fragmentation
  4. SSDs performance drop once data written is greater than SSD size

6.OS:

  1. Fsync flushing, linux buffer cache filling up
  2. TCP buffers too small
  3. File descriptor limits
  4. Power budget

7.缓存:

  1. Not using memcached (database pummeling)
  2. In HTTP: headers, etags, not gzipping, etc..
  3. Not utilising the browser's cache enough
  4. Byte code caches (e.g. PHP)
  5. L1/L2 caches. This is a huge bottleneck. Keep important hot/data in L1/L2. This spans so much: snappy for network I/O, column DBs run algorithms directly on compressed data, etc. Then there are techniques to not destroy your TLB. The most important idea is to have a firm grasp on computer architecture in terms of CPUs multi-core, L1/L2, shared L3, NUMA RAM, data transfer bandwidth/latency from DRAM to chip, DRAM caches DiskPages, DirtyPages, TCP packets travel thru CPU<->DRAM<->NIC.

8.CPU:

  1. CPU overload
  2. Context switches -> too many threads on a core, bad luck w/ the linux scheduler, too many system calls, etc...
  3. IO waits -> all CPUs wait at the same speed
  4. CPU Caches: Caching data is a fine grained process (In Java think volatile for instance), in order to find the right balance between having multiple instances with different values for data and heavy synchronization to keep the cached data consistent.
  5. Backplane throughput

9.网络:

  1. NIC maxed out, IRQ saturation, soft interrupts taking up 100% CPU
  2. DNS lookups
  3. Dropped packets
  4. Unexpected routes with in the network
  5. Network disk access
  6. Shared SANs
  7. Server failure -> no answer anymore from the server

10.进程:

  1. Testing time
  2. Development time
  3. Team size
  4. Budget
  5. Code debt

内存:

  1. Out of memory -> kills process, go into swap & grind to a halt
  2. Out of memory causing Disk Thrashing (related to swap)
  3. Memory library overhead
  4. Memory fragmentation
  5. In Java requires GC pauses
  6. In C, malloc's start taking forever

原文详见:http://highscalability.com/blog/2012/5/16/big-list-of-20-common-bottlenecks.html
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭