On Wed, 2023-01-18 at 20:48 -0500, Joshua Kinard wrote:
> So this article[1] from 2017 popped up again on the tech radar via 
> hackernews[2] and a few other sites[3].  It 
> annotates how if the envvar TZ is undefined on a Linux system, it causes 
> glibc to generate a number of 
> additional syscalls, mainly stat-related calls (in my tests, newfstatat()).  
> If defined to an actual value, 
> such as ":/etc/localtime" (or even an empty string), glibc will instead 
> generate far fewer, if any at all, of 
> these stat-related syscalls.
> 
> [...]
> So is adding a default definition of TZ to our base system /etc/profile 
> something we want to look at?  I 
> haven't tried any other methods of benchmarking to see if not making those 
> additional syscalls is just placebo 
> or if there are actual impacts.  Given how long this oddity has been around, 
> I can't tell if it's a genuine 
> bug in glibc, an unoptimized corner case, or just a big nothingburger.
> 

Am I correct that there's no real difference between setting it to
":/etc/localtime" and the actual timezone?

I suppose it would make sense to default it.

-- 
Best regards,
Michał Górny


Reply via email to