HyperTable选择C++还是java开发时的考虑
[ 大恐龙 发表于 2008年7月 5日 18:03 ]
WhyWeChoseCppOverJava
Why We Chose C++ Over Java
This document is to clarify our position regarding C++ vs. Java for choice of implementation language. There are two fundamental reasons why C++ is superior to Java for this particular application.
- Hypertable is memory (malloc) intensive. Hypertable caches all updates in an in-memory data structure (e.g. stl map). Periodically, these in-memory data structures get spilled to disk. These spilled disk files get merged together to form larger files when their number reaches a certain threshold. The performance of the system is, in large part, dictated by how much memory it has available to it. Less memory means more spilling and merging which increases load on the network and underlying DFS. It also increases the CPU work required of the system, in the form of extra heap-merge operations. Java is a poor choice for memory hungry applications. In particular, in managing a large in-memory map of key/value pairs, Java's memory performance is poor in comparison with C++. It's on the order of two to three times worse (if you don't believe me, try it).
- Hypertable is CPU intensive. There are several places where Hypertable is CPU intensive. The first place is the in-memory maps of key/value pairs. Traversing and managing those maps can consume a lot of CPU. Plus, given Java's inefficient use of memory with regard to these maps, the processor caches become much less effective. A recent run of the tool Calibrator (http://monetdb.cwi.nl/Calibrator/) on one of our 2GHz Opterons yields the following statistics:
caches:
level size linesize miss-latency replace-time
1 64 KB 64 bytes 6.06 ns = 12 cy 5.60 ns = 11 cy
2 768 KB 128 bytes 74.26 ns = 149 cy 75.90 ns = 152 cy
查看全文:" HyperTable选择C++还是java开发时的考虑 " »
Tags:
'
hypertable
'
作者:
大恐龙
- 分类:
'
C/C++/VC/GNU
' '
数据库|DataBase
' '
系统|System
'
- 固定链接
- 评论 (
0
)
- 引用通告 (
0
)
- 查看次数: (0)
前一个分类:
.Net Framework
-
后一个分类:
HTML/CSS/JavaScript













![[Valid RSS]](http://www.w3cool.com//images/valid-rss.png)
![Validate my Atom 1.0 feed [Valid Atom 1.0]](http://www.w3cool.com//images/valid-atom.png)






[test] 于 08-09-11 发表: 中文qweqasas中文...
[venjiang] 于 08-09-10 发表: 8错...
[狼] 于 08-08-29 发表: 功能不错,可是刚加的内容刚开始出现 “语音内容正在处理中,请稍后再试”,刷新后有的可以完整播放,有一...
[大恐龙
[teacherlau] 于 08-08-21 发表: in fact google player is base on vlc. and it's fre...
[林淋] 于 08-08-14 发表: “说说”读英语时太快了点...
[白建明] 于 08-08-12 发表: 恐龙加油啊。 提高人气啊?...
[weuhan] 于 08-08-11 发表: 测试测试...
[大恐龙
[3344] 于 08-07-29 发表: 下下来放再本地试都不行 直接调用这里的就可以。。 另外有的本文读了一点就不读了是怎末回事呢?...
[3344] 于 08-07-29 发表: 下下来放再本地试都不行 直接调用这里的就可以。。 另外有的本文读了一点就不读了是怎末回事呢?...
[大恐龙
[胡子长了] 于 08-07-14 发表: var _scid = "contentid"; // 你希望朗读的文章块的id 这里怎么填写...
[网络中国] 于 08-06-19 发表: 很高兴认识你,希望可以和你交个朋友,向你学习! 我对程序很有兴趣!...