On Sun, Jul 28, 2019 at 12:05:33AM +0300, Mantas Mikulėnas wrote: > On Sat, Jul 27, 2019, 22:35 Wietse Venema <wie...@porcupine.org> wrote: > > > > Mantas Mikul?nas: > > > Disregard this; I'm sure I have found the nss module that causes high > > > memory usage. > > > > Which nss module would that be? > > It was libnss_myhostname (specifically the version that is included > with systemd). > > Besides handling the system hostname as advertised, the > systemd-bundled variant also recognizes the magic hostname "_gateway" > and resolves it to wherever the OS default routes point, and the other > way around. So whenever Postfix does a reverse-DNS lookup and the > regular "files"/"dns" modules yield no result, the "myhostname" module > scans all routing tables to compare the query against the default > gateways, leaking a bit of memory after doing so.
Wow! Though lately I'm inclined to be more sympathetic to the *goals* of systemd, the continuing implementation warts and adverse performance impact make it difficult to support its lofty causes. The commercial Linux vendors really need to put more muscle behind making systemd reliable and performant, it is a critical component of the OS, and needs to be better implemented. Presently, at least logging and name resolution are in sad shape on many Linux servers. -- Viktor.