System Calls Optimization¶
The use of the TZ environment variable can dramatically reduce the number of system calls and kernel context switches performed by the application.
localtime() function in glibc checks whether the
variable is set. If it is not set, then glibc will use the
call every time
localtime() is called, even with vDSO in place.
TZ environment variable to
:/etc/localtime (or some other
timezone file of your choice) for a process will save glibc from making those
extra unnecessary system calls (Notice the column
: prefix before the file
The variable can be set either from the shell, i.e.
or directly from inside the dovecot configuration file
import_environment = $import_environment TZ=:/etc/localtime
Note that a simple reload is not sufficient for the change to take effect. A restart is required.