2008 年文章归档
共 17 篇文章
Performance tuning tips - 43 (have fun)
2008-11-28 14:59 · Performance Test/Analysis/Tuning 性能分析优化
Performance engineer MUST (4)
必看的一本书 Computer Systems: A Programmer's Perspective Google 一下吧, 这个是"必须的".
2008-11-14 14:41 · Performance Test/Analysis/Tuning 性能分析优化
Performance engineer MUST (3)
TLB Translation lookaside buffer http://en.wikipedia.org/wiki/Translation_lookaside_buffer
2008-11-14 14:38 · Performance Test/Analysis/Tuning 性能分析优化
Performance engineer MUST (2)
Spinlock 以下来自Wikipedia Spinlock From Wikipedia, the free encyclopedia Jump to: navigation, search In software engineering, a spinlock is a lock where the thread simply waits in a loop ("spins") repeatedly checking until the lock becomes available. As the thread remains active but isn't performing a…
2008-11-14 11:50 · Performance Test/Analysis/Tuning 性能分析优化
Performance engineer MUST (1)
As a performance engineer, you must know "Context Switch" If you don't know, I give three suggestions: 1> look up it in ur course books 2> back to school 3> Internet: http://en.wikipedia.org/wiki/Context_switch
2008-11-07 15:10 · Performance Test/Analysis/Tuning 性能分析优化
How to set up a simple LRU cache using LinkedHash
How to set up a simple LRU cache using LinkedHashMap Caches Caches are a simple way to improve the performance of an application that reads data from a "slow" source such as files on disk or rows of data from a database table, but may need to re-read the same data multiple times. The idea is simple…
2008-11-03 18:05 · Study 学习
性能优化前请你先做profile
很多developer会忽视,甚至是无视profile的重要性。总是想当然的做些性能优化。 经常有developer跑过来说:hey, 给我测测性能,我做了些优化。应该会有提升的。 ok, 没问题。我很愿意为你效劳。 但是经常碰到的结果是: 没有或只有很小的提升。 你告诉他,他还会认为你什么都不知道,你的测试结果不能说明问题。 我想也许是因为developer都认为自己知道的最多,喜欢想当然(只是也许)。 我这里想强调关于性能优化的一个前提: 你已经确定了某个地方是你系统的瓶颈所在。 怎么样确定? 当然是profile了!!! 更好笑的是,我还常看到developer花了大力气把一个本不是瓶…
2008-10-27 13:49 · Performance Test/Analysis/Tuning 性能分析优化
关于amazon的存储架构
非常有阅读价值的一篇论文! Dynamo: Amazon’s Highly Available Key-value Store http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html
2008-10-22 17:20 · Everything on Distributed 分布式系统
ReentrantLock and Synchronized (from peter)
import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class HighContentionSimulator implements Runnable { enum Mode implements Runnable { LOCK { private final Lock lock = new ReentrantLock(); public void run() { lock.lock(); try { operation(); } finally { l…
2008-10-22 17:05 · Performance Test/Analysis/Tuning 性能分析优化
木吉他演奏, Eric Clapton 是你的好老师
Clapton不插电(unplugged)里面的歌曲. 推荐里面的三首歌: 1> Signe 2> layla 3> tears in heaven
2008-10-21 18:07 · Music&Guitar 音乐/吉它
关于java锁机制的优化
JVM 级别的锁机制的优化主要针对这两种情况: 1> 大多数情况不会存在竞争的锁. 2> 被频繁竞争的锁. 以下采用事例的方式加以说明. 前三种方法是针对情况1>, 最后一种是针对情况2>. lock elision public String getStoogeNames() { Vector v = new Vector(); v.add("Moe"); v.add("Larry"); v.add("Curly"); return v.toString(); } 我们知道Vector的实现是线程安全的,也就是加了synchronized. 但是在上面的这段代码中, 显然Vector v …
2008-10-21 17:14 · Performance Test/Analysis/Tuning 性能分析优化
关于哲学家就餐问题
你说这一帮哲学家聚到一起吃饭,还一人只有一根筷子,还要吃口饭,放下筷子思考一下。 当他们都拿起一根筷子时,发现还少根筷子,谁也不肯放下手中的筷子。结果是都只能饿死了。 哎。。。这样不行啊。 BTW, 这样吃饭好像很不卫生吧.
2008-10-21 13:45 · Others 杂文
ReentrantLock VS Synchronized
Here is a simple benchmark case for testing the performance between ReentrantLock and Synchronized. Machine: 2 phycial processors with hyperthreading enabled (4 logical processors) OS: windows server 2003 JVM version: 1.6 Threads Number: 4 Benchmark result: Synchronized - 25786ms ReentrantLock - 10…
2008-10-20 17:57 · Performance Test/Analysis/Tuning 性能分析优化
Performance test, more than test 性能测试, 不只是测试 (1)
Everytime, when people mention about performance test, some guys would stand out and say: aha, performance test, using loadrunner, collecting performance data, that's it. So, there are many docs talking about how to use loadrunner, and even more documents on loadrunner questions for performance tes…
2008-10-16 15:25 · Performance Test/Analysis/Tuning 性能分析优化
关于性能测试中一些计算方法(throughput, active user...)
我们知道最简单的情况下有如下公式: Throughput = 1 / responseTime (1) 现实情况是用户在提交一个请求后并不会立即发第二个请求,比如用户打开一个页面后,他可能会花些时间来浏览它,我们把这个时间叫思考时间:ThinkTime, 那么公式(1)则进化为: Throughput = 1 / (thinkTime + responseTime) (2) 以上公式是在单用户的情况下, 多用户下还要引入活动用户(active user)的概念,公式(2)进化为: Throughput = activeUserNumber / (thinkTime + responseTim…
2008-10-08 14:33 · Performance Test/Analysis/Tuning 性能分析优化
Scalability?
严格上讲,scalability还没有正式定义, 甚至有人觉得这样的词完全是带有商业味的。但我觉得以下的解释很直观: (from Steve Haines) performance measures the speed with which a single request can be executed, while scalability measures the ability of a request to maintain its performance under increasing load. For example, the performance of a request…
2008-10-07 14:07 · Study 学习
Something to say (for viewer)
All performance articles are only based on my experience. The purpose that I put them here is trying to collect and shape my thoughts. You may find something lose or wrong. Please leave me some notes. Then, I will be able to fix them. Thanks.
2008-07-01 11:32 · Performance Test/Analysis/Tuning 性能分析优化