Performance has a real meaning at Google, we all know that, demonstration is made every day.
Let’s take a moment to learn from the Google approach in this matter.
Let’s first start by a technical session by Brett Slatkin (Google),it introduce techniques you can use to improve your application’s performance:
Once you saw this video you understood things goes dofferently at Google (in case you didn’t knew).
Yet every engineers had a list of performance figures to keep in mind (figures from the Google AppEngine perspective, but still generally applicable). Jeffrey Dean (Google) is responsible for this ‘Numbers Everyone Should Know’ list:
- L1 cache reference 0.5 ns
- Branch mispredict 5 ns
- L2 cache reference 7 ns
- Mutex lock/unlock 100 ns
- Main memory reference 100 ns
- Compress 1K bytes with Zippy 10,000 ns
- Send 2K bytes over 1 Gbps network 20,000 ns
- Read 1 MB sequentially from memory 250,000 ns
- Round trip within same datacenter 500,000 ns
- Disk seek 10,000,000 ns
- Read 1 MB sequentially from network 10,000,000 ns
- Read 1 MB sequentially from disk 30,000,000 ns
- Send packet CA->Netherlands->CA 150,000,000 ns
The obvious things:
- The scales of those differences: they are huge
- Memory is is the target for high performance,then network is faster than disks
- Writes are 40 times expensive than reads
- Compression must be cheap and prior to network transfer