tyrant互为主备时同步日志异常的问题

    使用两台tyrant互为主备的时候,就算我不保存对象到tyrant,同步日志都一直不断增加,1小时之内就能达到1G,而数据文件还不到1M。

    原因基本查明:两台Linux虚拟机的时间同步所引起的。原先同步时间的方法是把ntpdate放到cron中,几分钟自动同步一次。但是ntpdate会引起时钟的跃变,而tyrant的主备同步,应该基于一项基本的假设,即系统时间是线性的,时间不会往回跳跃。

   解决方法是使用ntpd来校准时钟,而不是调整计算机时钟上的时间。ntpd使用时也需要加上-x参数,文档中是这么描述这个参数的:

-x      Normally,  the  time  is  slewed  if  the  offset is less than the step threshold, which is 128 ms by default, and
               stepped if above the threshold. This option forces the time to be slewed in all cases. If the  step  threshold  is
               set to zero, all offsets are stepped, regardless of value and regardless of the -x option. In general, this is not
               a good idea, as it bypasses the clock state machine which is designed to cope with large time and frequency errors
               Note:  Since  the slew rate is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of
               2000 s. Thus, an adjustment of many seconds can take hours or days to amortize. This option can be used  with  the
               -q  option.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值