Skip to contentSkip to conversation

Unstable clock

DISCUSSION Mohamad Gebai 5 participants 6 messages Oct 17, 2017 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I am looking at the following issue: http://tracker.ceph.com/issues/21375

In summary, during a 'rados bench', impossible latency values (e.g. 9.00648e+07) are suddenly reported. I looked briefly at the code, it seems CLOCK_REALTIME is used, which means that wall clock changes would affect this output. This is a VM cluster, so the hypothesis was that the system's clock was falling behind for some reason, then getting readjusted (that's the only way I could reproduce the issue), which I think is quite possible in a virtual environment.

A concern was raised: are there more critical parts of Ceph where a clock jumping around might interfere with the behavior of the cluster? It would be good to know if there are any, and maybe prepare for them?

Mohamad

A message that is not in the archive (sent off-list or not yet received): 085064b4-2e21-4e54-cdd8-dd8a4560aa92-l3A5Bk7waGM@public.gmane.org

#2 lore raw
Quoted 3 lines · Mohamad Gebai

A concern was raised: are there more critical parts of Ceph where a clock jumping around might interfere with the behavior of the cluster? It would be good to know if there are any, and maybe prepare for them?

cephx and monitor paxos leases come to mind.

-Joao

#3 lore raw
In reply to a message not in the archive
Quoted 12 lines · Mohamad Gebai

Hi,

I am looking at the following issue: http://tracker.ceph.com/issues/21375

In summary, during a 'rados bench', impossible latency values (e.g. 9.00648e+07) are suddenly reported. I looked briefly at the code, it seems CLOCK_REALTIME is used, which means that wall clock changes would affect this output. This is a VM cluster, so the hypothesis was that the system's clock was falling behind for some reason, then getting readjusted (that's the only way I could reproduce the issue), which I think is quite possible in a virtual environment.

Quoted 2 lines

A concern was raised: are there more critical parts of Ceph where a clock jumping around might interfere with the behavior of the cluster?

Yes, definitely.

Quoted 1 line

It would be good to know if there are any, and maybe prepare for them?

Adam added a new set of clock primitives that include a monotonic clock option that should be used in all cases where we're measuring the passage of time instead of the wall clock time. There is a longstanding trello card to go through and change the latency calculations to use the monotonic clock. There are probably dozens of places where an ill-timed clock jump is liable to trigger some random assert. It's just a matter of going through and auditing calls to the legacy ceph_clock_now() method.

sage

A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.11.1710171325500.26702-ie3vfNGmdjePKud3HExfWg@public.gmane.org

#5 lore raw
Quoted 11 lines · Sage Weil
Quoted 1 line · Mohamad Gebai

It would be good to know if there are any, and maybe prepare for them?

Adam added a new set of clock primitives that include a monotonic clock option that should be used in all cases where we're measuring the passage of time instead of the wall clock time. There is a longstanding trello card to go through and change the latency calculations to use the monotonic clock. There are probably dozens of places where an ill-timed clock jump is liable to trigger some random assert. It's just a matter of going through and auditing calls to the legacy ceph_clock_now() method.

Thanks Sage. I assume that's the card you're referring to:
https://trello.com/c/SAtGPq0N/65-use-time-span-monotonic-for-durations

I can take of that one if no one else has started working on it.

Mohamad

#6 lore raw
Quoted 13 lines · Mohamad Gebai
Quoted 11 lines · Sage Weil
Quoted 1 line · Mohamad Gebai

It would be good to know if there are any, and maybe prepare for them?

Adam added a new set of clock primitives that include a monotonic clock option that should be used in all cases where we're measuring the passage of time instead of the wall clock time. There is a longstanding trello card to go through and change the latency calculations to use the monotonic clock. There are probably dozens of places where an ill-timed clock jump is liable to trigger some random assert. It's just a matter of going through and auditing calls to the legacy ceph_clock_now() method.

Quoted 4 lines

Thanks Sage. I assume that's the card you're referring to:
https://trello.com/c/SAtGPq0N/65-use-time-span-monotonic-for-durations

I can take of that one if no one else has started working on it.

That would be wonderful! I'm pretty sure nobody else is looking at it so you win today. :)

sage

#7 lore raw
Quoted 9 lines · Sage Weil
Quoted 5 lines · Mohamad Gebai

Thanks Sage. I assume that's the card you're referring to:
https://trello.com/c/SAtGPq0N/65-use-time-span-monotonic-for-durations

I can take of that one if no one else has started working on it.

That would be wonderful! I'm pretty sure nobody else is looking at it so you win today. :)

Great :) Anything I should, like add my face to the card or something?

Mohamad