如何防止Cassandra提交日志填满磁盘空间 [英] How to prevent Cassandra commit logs filling up disk space

查看:1392
本文介绍了如何防止Cassandra提交日志填满磁盘空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AWS上运行两个节点Datastax AMI集群。昨天,Cassandra开始拒绝一切的连接。系统日志没有显示。经过修改后,我发现提交日志已经填满了分配的挂载上的所有磁盘空间,这似乎是导致连接拒绝(删除了一些提交日志,重新启动,并且能够连接)。



我在DataStax AMI 2.5.1和Cassandra 2.1.7



我决定擦除并从头重新启动一切,如何确保这不会再发生?

解决方案

cassandra.yaml 中的 commitlog_total_space_in_mb 设置。 64位系统的默认值为8192MB(它应该在你的 .yaml 文件中注释掉...你必须在设置它时取消注释) 。



您可以通过运行 du 来验证这一点$ c>在您的commitlog目录中:

  $ du -d 1 -h ./commitlog 
8.1G ./虽然,较小的提交日志空间将导致更频繁的刷新(增加的磁盘I / O),但是,所以你想保持任何眼睛。


I'm running a two node Datastax AMI cluster on AWS. Yesterday, Cassandra started refusing connections from everything. The system logs showed nothing. After a lot of tinkering, I discovered that the commit logs had filled up all the disk space on the allotted mount and this seemed to be causing the connection refusal (deleted some of the commit logs, restarted and was able to connect).

I'm on DataStax AMI 2.5.1 and Cassandra 2.1.7

If I decide to wipe and restart everything from scratch, how do I ensure that this does not happen again?

解决方案

You could try lowering the commitlog_total_space_in_mb setting in your cassandra.yaml. The default is 8192MB for 64-bit systems (it should be commented-out in your .yaml file... you'll have to un-comment it when setting it). It's usually a good idea to plan for that when sizing your disk(s).

You can verify this by running a du on your commitlog directory:

$ du -d 1 -h ./commitlog
8.1G    ./commitlog

Although, a smaller commit log space will cause more frequent flushes (increased disk I/O), so you'll want to keep any eye on that.

这篇关于如何防止Cassandra提交日志填满磁盘空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆