cassandra大量写入性能问题
我的服务器配备 4 GB RAM 和 2x 4 核 CPU。当我开始在 Cassandra 中执行大量写入时,最初一切正常,但几个小时后,每秒 10K 插入,数据库增长到 25+ GB,性能下降到每秒 500 次插入!
我发现这是因为压缩操作非常慢,但我不明白为什么?我设置了 8 个并发压缩线程,但 Cassandra 不使用 8 个线程;仅加载 2 个核心。
感谢任何帮助。
I have server with 4 GB RAM and 2x 4 cores CPU. When I start perform massive writes in Cassandra all works fine initially, but after a couple hours with 10K inserts per second database grows up to 25+ GB, and performance go down to 500 insert per seconds!
I find out this because compacting operations is very slow but I don't understand why? I set 8 concurrent compacting threads but Cassandra don't use 8 threads; only 2 cores are loaded.
Appreciate any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们已经在 Cassandra 开箱即用中看到了类似的问题,请参阅:
http://www.acunu.com/blogs/richard-low/cassandra-under-heavy-write-load-part-ii/
解决此类性能下降的一种解决方案问题(但是绝不是唯一的)是考虑使用不同的存储引擎,例如上面博客文章中使用的 Castle - 它的开源(GPL v2),具有更好的性能并且更优雅地降级。代码在这里(我刚刚推出了 Cassandra 0.8 支持的分支):
https://bitbucket。 org/acunu/fs.hg
有关如何开始的说明如下:
http://support.acunu.com/entries/20216797-castle-build-instructions
(全面披露:我为 Acunu 工作,所以可能有点偏见;-)
We've seen similar problems with Cassandra out-the-box, see:
http://www.acunu.com/blogs/richard-low/cassandra-under-heavy-write-load-part-ii/
One solution to these sort of performance degradation issues (but by no means the only) is to consider a different storage engine, like Castle, used in the above blog post - its opensource (GPL v2), has much better performance and degrades much more gracefully. The code is here (I've just pushed up a branch for Cassandra 0.8 support):
https://bitbucket.org/acunu/fs.hg
And instructions on how to get started are here:
http://support.acunu.com/entries/20216797-castle-build-instructions
(Full disclosure: I work for Acunu, so may be a little biased ;-)