News for hackers. Stuff that matters.
Re:Wait-free queueing and ultra-low latency logging by lomnakkus on Thursday May 29, 2014 @02:48PM (#7817870)
I'm not sure if it's just me, but I found the lack of reference to system time interesting. Maybe it's one those things everyone does (but never talks about), but if you're logging, one of the absolute performance killers can actually turn out to be getting the system time via gettimeofday() or whatever. That's a syscall which involves a context switch, which... (It goes downhill from there.)

Much better to just get the time every once in a while and cache it.

Re:Wait-free queueing and ultra-low latency logging by nkurz on Thursday May 29, 2014 @04:15PM (#7818358)
Historically this is true, but recent x64 Linux has made a lot of improvement here. In particular, gettimeofday() is usually optimized so as not to require a context switch: http://blog.tinola.com/?e=5. And then there are some even faster options that do the caching for you: https://access.redhat.com/site/documentation/en-US/Red_Hat_E...