In java, programming on November 23, 2006 at 10:45 AM

今天看到一篇文章, 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

Leave a Reply

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

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: