C100DBA MongoDB DBA认证考题讲解 Journal日志的存放

本文永久链接:https://www.askmac.cn/archives/mongodb-journal.html

C100DBA MongoDB DBA认证考题讲解 Journal日志的存放

 

Screen Shot 2015-04-28 at 10.44.03 PM

 

Why might you want to put your journal on a separate drive on your primary?

在你的主库上是什么驱动你去把journal日志存放在一个分离(与db文件分离)的磁盘上?

  1. 允许使用文件系统快照备份
  2. 为了改善写出吞吐量
  3. 提供更好的故障容错
  4. 消除对secondary服务器的需求
  5. 增加oplog的窗口

此为单选题, 答案为B 为了改善写出吞吐量

参考:https://docs.mongodb.org/manual/core/write-performance/

Journaling

MongoDB uses write ahead logging to an on-disk journal to guarantee write operation durability and to provide crash resiliency. Before applying a change to the data files, MongoDB writes the change operation to the journal.

While the durability assurance provided by the journal typically outweigh the performance costs of the additional write operations, consider the following interactions between the journal and performance:

  • if the journal and the data file reside on the same block device, the data files and the journal may have to contend for a finite number of available write operations. Moving the journal to a separate device may increase the capacity for write operations.
  • if applications specify write concern that includes journaled, mongod will decrease the duration between journal commits, which can increases the overall write load.
  • the duration between journal commits is configurable using the commitIntervalMs run-time option. Decreasing the period between journal commits will increase the number of write operations, which can limit MongoDB’s capacity for write operations. Increasing the amount of time between commits may decrease the total number of write operation, but also increases the chance that the journal will not record a write operation in the event of a failure.

 

Comment

*

沪ICP备14014813号-2

沪公网安备 31010802001379号