为什么Domain controller上的time synchronization非常重要?

本文介绍了虚拟域控制器在不同场景下面临的时间同步问题,并提出了两种解决方案:一是通过配置VMware主机与虚拟机之间的同步;二是设立独立的时间服务器进行同步。此外,文章还提供了一些有用的命令和参考资料。

虚拟机默认情况下所拥有的资源都是不同的, 比如说CPU clock. 在一个忙碌的系统中, 虚拟机甚至可能在很短的一段时间内被拒绝分配资源给它, 这种情况还可能发生在高系统负荷, VMotion, Backup的时候. 或者说虚拟机收到了超过它可以感知的CPU资源的量, 比如说操作系统认为它有1个2.4Ghz的CPU, 但事实上它运行在一个8 core的2.4Ghz的VMware的系统上.

这会导致称为"time drifting"的问题, 即虚拟机用来计算时间的'滴答'的时钟会运行的比标准的更快或更慢. 有人见过没配好time synchronization的虚拟机的时间差多达几个小时.

Windows Servers和Domain Controller上的w32time服务在物理机上是完全足够保持正确的时间的. 这个服务在domain controller上不光作为一个sync时间的client, 也作为domain中其他机器用于sync的time的源. 所以, 如果你不想使用该服务client端的功能, 那也不能简单的就把这个服务停掉.

 

解决方案

===========================

第一种

1. 配置所有的VMware host都跟自己的NTP去sync, 这很重要, 因为我们要用他们作为时间源来跟运行在他们上的虚拟机来同步时间. 别忘了在VMware host上配置自动启动NTP client.

2. 配置虚拟化的domain controller不要用time service去同步时间, 可以说哦用NoSync参数, 并且让它知道他自己有权威时间.

3. 安装VMware tools, 然后配置他跟ESXi host来同步时间.

这种解决方案在极端的负荷下也是比较稳定的. 最大的问题是需要严格的控制VMware主机, 并且确保任何的DC运行的host都是用同样的NTP源. 另一个最可能的问题是某人添加了一台新的ESXi, 并且忘了配置NTP服务器.

 

第二种

1. 找两台物理机作为本地的time servers. 它们依次跟一个信任的时间源来同步.

2. 让其他的有PDC FSMO role的domain controller或者其他的NTP servers来跟这两台物理机同步时间.

3. 让其他的domain controller跟这两台物理机同步或者跟PDC来同步. 如果你有物理机运行PDC FSMO的话, 那就更好了.

4. 确保你增加虚拟的domain controller与时间源sync的频率. 建议是每15分钟或每小时sync一次.

 

Useful Commands

===========================

w32tm /resync


资料来源

===========================

How to configure your virtual Domain Controllers and avoid simple mistakes with resulting big problems

http://www.sole.dk/how-to-configure-your-virtual-domain-controllers-and-avoid-simple-mistakes-with-resulting-big-problems/

 

参考资料

===========================

Timekeeping best practices for Windows, including NTP (1318)

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1318

How to configure an authoritative time server in Windows Server

http://support.microsoft.com/kb/816042/en-us

Synchronizing ESXi/ESX time with a Microsoft Domain Controller (1035833)

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1035833 

Virtualizing Your Domain Controllers without getting fired!

http://www.sole.dk/virtualizing-your-domain-controllers-without-getting-fired/

19.5 MCAN 19.5.1 Overview The M_CAN performs communication according to ISO11898-1:2015. Additional transceiver hardware is required for connection to the physical layer. The message storage is intended to be a single-ported Message RAM outside of the module. It is connected to the M_CAN via the Generic Master Interface. All functions concerning the handling of messages are implemented by the Rx Handler and the Tx Handler. The Rx Handler manages message acceptance filtering, the transfer of received messages from the CAN Core to the Message RAM as well as providing receive message status information. The Tx Handler is responsible for the transfer of transmit messages from the Message RAM to the CAN Core as well as providing transmit status information. Acceptance filtering is implemented by a combination of up to 128 filter elements where each one can be configured as a range, as a bit mask, or as a dedicated ID filter. 19.5.1.1 Features • Conform with ISO 11898-1:2015 • CAN FD with up to 64 data bytes supported • CAN Error Logging • AUTOSAR optimized • SAE J1939 optimized • Improved acceptance filtering • Two configurable Receive FIFOs • Separate signalling on reception of High Priority Messages • Up to 64 dedicated Receive Buffers • Up to 32 dedicated Transmit Buffers • Configurable Transmit FIFO • Configurable Transmit Queue • Configurable Transmit Event FIFO • Direct Message RAM access for Host CPU • Programmable loop-back test mode • Maskable module interrupts • Two clock domains (CAN clock and Host clock) • Power-down support R01UH0517EJ0130 Rev.1.30 Page 996 of 3095 Dec 25, 2017 RH850/P1x-C Section 19 CAN Controller (MCAN) ISO CANFD ISO 11898-1:2015 19.5.1.2 Block Diagram CAN Core: CAN Protocol Controller and Rx/Tx Shift Register. Handles all ISO 11898-1 protocol functions. Supports 11-bit and 29-bit identifiers. Sync: Synchronizes signals from the Host clock domain to the CAN clock domain and vice versa. Clk: Synchronizes reset signal to the Host clock domain and to the CAN clock domain. Cfg & Ctrl: CAN Core related configuration and control bits. Interrupt & Timestamp: Interrupt control and 16-bit CAN bit time counter for receive and transmit timestamp generation. An externally generated 16-bit vector may substitute the integrated 16-bit CAN bit time counter for receive and transmit timestamp generation. Figure 19.3 M_TTCAN Block Diagram m_can_rx m_can_tx Sync Rx Handler Cfg & Ctrl Acceptance Filter Interrupt & Generic Master IF Timestamp Tx_State Tx_Req Cfg & Ctrl M_CAN CAN Core Tx Handler Cfg & Ctrl Tx Prioritization Rx_State CAN Clock Domain Host Clock Domain Generic Slave IF Clk Host IF Memory IF 8/16/32 32 Extension IF R01UH0517EJ0130 Rev.1.30 Page 997 of 3095 Dec 25, 2017 RH850/P1x-C Section 19 CAN Controller (MCAN) ISO CANFD ISO 11898-1:2015 Tx Handler: Controls the message transfer from the external Message RAM to the CAN Core. A maximum of 32 Tx Buffers can be configured for transmission. Tx buffers can be used as dedicated Tx Buffers, as Tx FIFO, part of a Tx Queue, or as a combination of them. A Tx Event FIFO stores Tx timestamps together with the corresponding Message ID. Transmit cancellation is also supported. Rx Handler: Controls the transfer of received messages from the CAN Core to the external Message RAM. The Rx Handler supports two Receive FIFOs, each of configurable size, and up to 64 dedicated Rx Buffers for storage of all messages that have passed acceptance filtering. A dedicated Rx Buffer, in contrast to a Receive FIFO, is used to store only messages with a specific identifier. An Rx timestamp is stored together with each message. Up to 128 filters can be defined for 11-bit IDs and up to 64 filters for 29- bit IDs. Generic Slave Interface: Connects the M_CAN to a customer specific Host CPU. The Generic Slave Interface is capable to connect to an 8/16/32-bit bus to support a wide range of interconnection structures. Generic Master Interface: Connects the M_CAN to a local 32-bit Message RAM. The implemented Message RAM size is 2K • 32 bit. Extension Interface: All flags from the Interrupt Register MCANnIR as well as selected internal status and control signals are routed to this interface. The interface is intended for connection of the M_CAN to a module￾external interrupt unit or to other module-external components. The connection of these signals is optional. 19.5.1.3 Dual Clock Sources To improve the EMC behavior, a spread spectrum clock can be used for the Host clock domain m_can_hclk (CLK_HSB). Due to the high precision clocking requirements of the CAN Core, a separate clock without any modulation has to be provided as m_can_cclk (CLKP_H2). Within the M_TTCAN module there is a synchronization mechanism implemented to ensure save data transfer between the two clock domains. NOTE In order to achieve a stable function of the M_TTCAN, the Host clock must always be faster than or equal to the CAN clock. Also the modulation depth of the spread spectrum clock has to be regarded. 19.5.1.4 Dual Interrupt Lines The module provides two interrupt lines. Interrupts can be routed either to m_can_int0 (INTMCANnI0) or to m_can_int1 (INTMCANnI1). By default all interrupts are routed to interrupt line m_can_int0 (INTMCANnI0). By programming MCANnILE.EINT0 and MCANnILE.EINT1 the interrupt lines can be enabled or disabled separately. 19.5.2.4 Message RAM For storage of Rx/Tx messages and for storage of the filter configuration a single- or dual-ported Message RAM has to be connected to the M_CAN module. (1) Message RAM Configuration The Message RAM has a width of 32 bits. In case parity checking or ECC is used a respective number of bits has to be added to each word. The M_CAN module can be configured to allocate up to 4352 words in the Message RAM. It is not necessary to configure each of the sections listed in Figure 19.4, Message RAM Configuration, nor is there any restriction with respect to the sequence of the sections. When operated in CAN FD mode the required Message RAM size strongly depends on the element size configured for Rx FIFO0, Rx FIFO1, Rx Buffers, and Tx Buffers via MCANnRXESC.F0DS, MCANnRXESC.F1DS, MCANnRXESC.RBDS, and MCANnTXESC.TBDS. When the M_CAN addresses the Message RAM it addresses 32-bit words, not single bytes. The configurable start addresses are 32-bit word addresses i.e. only bits 15 to 2 are evaluated, the two least significant bits are ignored. NOTE The M_CAN does not check for erroneous configuration of the Message RAM. Especially the configuration of the start addresses of the different sections and the number of elements of each section has to be done carefully to avoid falsification or loss of data. Figure 19.4 Message RAM Configuration Rx FIFO 0 Rx FIFO 1 Tx Buffers Tx Event FIFO 11-bit Filter 29-bit Filter max. 2K words 0-64 elements / 0-1152 words 0-64 elements / 0-1152 words 0-32 elements / 0-576 words 0-32 elements / 0-64 words 0-128 elements / 0-128 words 0-64 elements / 0-128 words 32 bit MCANnRXF0C.F0SA MCANnRXF1C.F1SA MCANnTXBC.TBSA MCANnTXEFC.EFSA MCANnSIDFC.FLSSA MCANnXIDFC.FLESA Start Address Rx Buffers 0-64 elements / 0-1152 words MCANnRXBC.RBSA R01UH0517EJ0130 Rev.1.30 Page 1053 of 3095 Dec 25, 2017 RH850/P1x-C Section 19 CAN Controller (MCAN) ISO CANFD ISO 11898-1:2015 (2) Rx Buffer and FIFO Element Up to 64 Rx Buffers and two Rx FIFOs can be configured in the Message RAM. Each Rx FIFO section can be configured to store up to 64 received messages. The structure of a Rx Buffer / FIFO element is shown in Table 19.60 below. The element size can be configured for storage of CAN FD messages with up to 64 bytes data field via register MCANnRXESC. R0 Bit 31 ESI: Error State Indicator 0: Transmitting node is error active 1: Transmitting node is error passive R0 Bit 30 XTD: Extended Identifier Signals to the Host whether the received frame has a standard or extended identifier. 0: 11-bit standard identifier 1: 29-bit extended identifier R0 Bit 29 RTR: Remote Transmission Request Signals to the Host whether the received frame is a data frame or a remote frame. 0:Received frame is a data frame 1:Received frame is a remote frame NOTE There are no remote frames in CAN FD format. In case a CAN FD frame (FDF = ’1’), the dominant RRS (Remote Request Substitution) bit replaces bit RTR (Remote Transmission Request). 这里的Buffers和硬件对象的区别
07-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值