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
'
前一个分类:
.Net Framework
-
后一个分类:
CGI/PHP/Perl













![[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)






[大恐龙
[zi] 于 09-09-23 发表: 功能很不错,就是有的只读到一半就不给读了,一次最多能读多少字呢...
[ll] 于 09-09-23 发表: 可惜了 我测试俄语 不能朗读如果要是能的话就太好了...
[zi] 于 09-09-18 发表: 您好,偶然看到这个在线语音合成系统,很不错,只是我想在flex页面引用,不知道怎么用...
[陈涛] 于 09-08-11 发表: 看起来不错,感谢分享!明天就这样做!...
[大恐龙
[UniUni] 于 09-05-29 发表: 很棒的插件,我成功安装了,但总是有“语音合成服务忙”的提示。...
[大恐龙
[dfdfsdfdf] 于 09-05-23 发表: 希望更新一下语音包,个人觉得“科大讯飞”的语音包很人性化...
[eudy] 于 09-04-25 发表: 东西好是好,但价格太吓人。对于小网站承担不起!希望能分等级会员。我的要求只要新闻不要读一半就没得全部...
[大恐龙
[jackiewong] 于 09-04-08 发表: 老大,怎么玩不转啊!我按上面的方法引用后,语音提示总是说“语音合成服务忙,请稍候再试”,要不就是“由...
[白建明] 于 09-03-28 发表: 偶然的机会,发现了163.com 用的就是Nginx。 访问某一网页是,当时其返回了一串乱码到网...
[大恐龙