如何进行性能调优(整理)

上一篇 / 下一篇  2012-11-30 17:35:44 / 个人分类:性能测试

自己写的,将就看吧,练练英文也成,欢迎大家拍砖!
1.The direction of system optimizing

   NO.1: the TPS and throughput of system in current condition.

   NO.2: the biggest concurrence and transaction successful rate in condition of specified transaction response time required.

   NO.3: check if we can meet the requirement of concurrence and on-line users to be designed.

2.The principle of system optimizing

  Normally, good performance will depends on better framework of software code, better architecture of hardware, better arithmetic and better understanding of business.

  1. Software optimizing first, then hardware.
  2. Just modify one factors of bottleneck during once optimizing process.
  3. Try to find out the main factors of bottleneck and fix the easier one first.
  4. About cpu performance: better code, better SQL, better arithmetic, less short lifetime object.
  5. About mem performance: less long lifetime object.
  6. About I/O performance: less interactive to disk.

3.The methods of apps optimizing

  1. CDN: Content Distribution Network.
  2. Load balancing, whatever by software or hardware.
  3. Enhance the amount of threads so that it can quick response.
  4. Separate the images from code, also separate the static code(like js,css) from active code.
  5. Compress and combine the code, especially the js and css, like gzip format etc.
  6. Try your best to cache all the Static web elements like imgs, js, css etc.
  7. Ajax, not synchronous but asynchronous.
  8. Better web container with pre-optimized.
  9. Better message Queue handle solution in case of large concurrence.
  10. Distributed log collection for higher usage.
  11. Batch task only to be done in free time and split from each other.
  12. Distributed storage for image file to avoid I/O.

4.The methods of DB optimizing

  1.Don't use only a DB that store all the tables.
  2.the amount of records is less than 1 million rows.
  3.Separate cold data from hot data.
  4.Vertical Split all the table base on business modules.
  5.Horizontal Split all the table base on time or district.
  6.Hash the database or table to increase expandability.
  7.Try to find out the inefficient SQL and optimize them.
  8.Enhance the amount of connections and buffer.
  9.Change to NOSQL solution in case of large concurrence requirement due to high-efficiency key-value storage.
  10.Separate data read action from data write action to DB.
  11.Suitable index.
  12.No ad-hoc search, More view.
  13.Limit cursor.
  14.No excessive data search.
  15.Use more DB server for data read action.
  16.Master-slave model for higher usage.
  17.Data stores not only the DB server but also other storage medium for higher reliablity.


TAG:

 

评分:0

我来说两句

Open Toolbar