Klaus

TZ

 Fri, 03 Mar 2017 11:58:37 +0100 
#^How setting the TZ environment variable avoids thousands of system calls
TL;DR This blog post explains how setting an environment variable can save thousands(or in some cases, tens of thousands) of unnecessary system calls that can begenerated by glibc over small periods of time.This has been tested on Ubuntu Precise (12.04) and Ubuntu Xenial (16.04). Itlikely applies to other flavors of Linux, as well. It is very easy to test ifthis applies to you and to correct it, if so. Keep reading for more details!

To avoid extra system calls on server processes where you won’t be updating the timezone (or can restart processes when you do) simply set the TZ environment variable to :/etc/localtime (or some other timezone file of your choice) for a process. This will cause glibc to avoid making extra (and unnecessary) system calls.