In javaprogramming on 11月 23, 2006 at 10:45 上午

今天看到一篇文章, Multi-core may be bad for Java, 里面讲到:

The trend towards multicore is moving along at a fast pace. Architectures like Suns Niagara seem to be getting copied by the other CPU vendors. The architecture is basically lots of cores but low clock speed per core.

This is a problem for Java as:

  • Java likely has a longer path length than languages like C and clock speeds won’t help with this.
  • JavaEE promotes a simple threading model for applications
  • Garbage collection remains heavily dependant on clock speed for small pauses.

对与第三点,其实早有大牛Amdahl定律在前头.按照前文的评论中的数值,垃圾回收一般占CPU时间的5%.根据Amdahl定律,s = n/((b*n) + (1-b)),如果处理器的数目足够多(n>100),基本可以认为满足Amadahl定律的极限值,也即s = 1/b, 所以,大概估算的话, 100核的处理器大概可以提高Java平台20倍的性能(这里仅考虑gc是瓶颈). 不知道这个数值算达到了什么程度, 感觉还是比较高的吧.


  1. The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software
  2. multi-core may be bad for java
  3. Amdahl定律@wikipedia


Fill in your details below or click an icon to log in: 徽标

您正在使用您的 账号评论。 注销 /  更改 )

Twitter picture

您正在使用您的 Twitter 账号评论。 注销 /  更改 )

Facebook photo

您正在使用您的 Facebook 账号评论。 注销 /  更改 )

Connecting to %s

%d 博主赞过: