The premise of performance optimization of business systems is observed and diagnosed. Observation tools such as the following:
Front-End optimization tool: YSlow
Page Response time: Firebug
Method Correspondence Time: Btrace
GC Log Analysis: JVM boot parameters
Database optimization: Slow query
System Resource invocation: monitoring
Performance diagnostic test tools such as the following:
Ab:httpd.apache.org/docs/2.2/programs/ab.html
JMeter:jmeter.apache.org
LoadRunner
Reverse proxy drainage. Tcpcopy: Request Replication Tool Github.com/wangbin579/tcpcopy
Performance Optimization methods:
Front-end performance: number of HTTP requests. CDN Network. Using compression
Java Program Optimization: Singleton, non-clogging of future mode. The thread pool. Use NiO. Reduced context switching and reduced lock contention
Transport compression and result caching
Database query Optimization: Reasonable index, reduce the inverse paradigm design of correlated queries. Use the query cache. Search engines, using the Key-value database,
GC Optimization
Improve hardware Performance
Java Application Troubleshooter:
JPS: Output JVM's process information
JSTAT:JVM Status Monitoring Tool
Jinfo: Configuration parameters for the application
Jstack: Thread Snapshot
JMap: Reclaims the queue of objects, stack information
Btrace: Dynamic Tracking Tool Kenai.com/projects/btrace
Jconsole: Graphical Tools
MAT: Graphical Heap analysis tool
VisualVM: All-round composite tools
Linux log analysis often uses commands:
View file contents: Cat
Paging Display file: more,less
Show file head and tail: tail
Content Sort: Sort
Character Statistics: WC
To view recurring rows: Uniq
String Lookup: grep
File Lookup: Find
Archive: Tar
URL Interview Tool: Curl
To view the most time-consuming pages:
Cat Localaccess.log |sort-k 2-n-R |head-10
Further. Sed. awk Shell.
Java Background Performance Optimization Brief