banner
Previous Page
PCLinuxOS Magazine
PCLinuxOS
Article List
Disclaimer
Next Page

Tic, Toc, Tic, Toc... It's About Time


by Paul Arnote (parnote)

Time. It's at the core of nearly everything we do. Our lives center around it. Our lives are defined and dominated by it. We use time to measure nearly everything. Our work week. How fast our computers boot. When to eat. When to sleep. When to wake. When to go to work. When to take a break. Birth. Death.

With something so integral to our existence, it's no wonder that there are people whose job it is to fret, worry over, "manage," and monitor time. They are the planet's "timekeepers," if you will. If you're like me, you may think that these individuals have way too much of what they are given stewardship over.

Since 1972, they have periodically been inserting "leap seconds" to our clock to "compensate" for irregularities in the Earth's orbit. These "irregularities" render the atomic clocks "too accurate," and astronomical time (based on the Earth's orbit, with all of its irregularities) and "atomic time" will no longer perfectly sync up. In an oversimplified way, UTC time (also known as Coordinated Universal Time) relies on the time as reported by the atomic clocks. Believe me ... this whole time business is complicated. You can find a reasonable, albeit complex, explanation here. Be prepared to jump around on that site to get a complete picture of all the complexities involved.




Herein lies the problem. The leap second is added to prevent the eventual drifting of GMT (Greenwich Mean Time) westward, according to the atomic clocks. Many computer systems -- including Linux -- synchronize their clocks with UTC time. To be fair, Linux synchronizes its clock with NTP (Network Time Protocol), which utilizes UTC time.

I don't know about you, but I hardly see this as a crisis, or even a problem that needs to be fixed. The Earth has been here for over 4,540,000,000 years (yes, BILLION), complete with all of its orbital irregularities. The fact that our atomic clocks are too accurate hardly seems cause for disturbing something that has been going on since the Big Bang: time, as we have come to know it. Sunrises occur every morning, sunsets occur every evening. In fact, it was never a problem until we -- mankind -- came up with a timepiece (atomic clocks) that did not take into account the irregularities of the Earth's orbit. So, in a way, WE manufactured this problem.

This coming June 30, they will once again add another "leap second" to the official clock. At midnight on June 30, the leap second will be added right after 11:59:59 (p.m.). During that brief second, the clock will read 11:59:60, as they add the additional second to the clock. This will mark the 11th time that a leap second has been added on June 30, since 1972. This joins the 15 times that a leap second has been added on December 31, for a total of 26 leap seconds that have been added to our clocks since 1972. In fact, a leap second is added to UTC time on average of every 18 months, give or take (depending on those orbital irregularities of Earth).

Sounds like a fairly simple proposition, huh? But wait ... there's more.

Back in June 2012, the addition of the leap second brought many popular websites down. We're talking about sites like Reddit, Amazon Cloud, Gawker Media, and Mozilla, among others. A "glitch" in the Linux kernel was the cause. More specifically, the Linux kernel has a function/subsystem called "hrtimer," short for high resolution timer. It (or programs that have a strong reliance on hrtimer) simply couldn't handle the addition of the leap second, causing it to consume large amounts of CPU time as it tried to reconcile the time difference. In the end, so much CPU time was consumed that it effectively locked those computers up. The problem was resolved simply by rebooting the affected machines.

While the average user probably hardly noticed, it affected many servers running Linux. See, Linux -- more specifically hrtimer -- syncs via NTP, which utilizes UTC time. The discrepancy between hrtimer and UTC time was more than it, or programs that depend on hrtimer, could handle. The "glitch" had been patched in March 2012, but not everyone had applied the update. Those who hadn't were the ones adversely affected.

So, what's in store for the June 2015 leap second? Well, according to Linus Torvalds, it shouldn't be anything to worry about. In the intervening three years since the last leap second, most if not all of the servers have updated their kernel and kernel subsystems. Additionally, a lot of the software that depends on NTP/UTC has also been updated. Torvalds expects the problems to be minimal, and expects nothing even remotely close to the problems experienced in June 2012.

Still, someone, somewhere is bound to experience a problem. According to Torvalds, the leap second is a rare and infrequent event. While the testers may test under one set of circumstances, there's no guarantee that a new circumstance that was not previously thought of won't crop up. And, because the addition of a leap second is such a rare and infrequent event, it's not something that kernel testers routinely check.

Tic, toc, tic, toc ... it's ALL about time.



Previous Page              Top              Next Page