Oddbean new post about | logout
 [$] Why glibc's fstat() is slow

The https://man7.org/linux/man-pages/man2/stat.2.html

system call retrieves some of the metadata — owner, size, protections,
timestamps, and so on — associated with an open file descriptor.  One might
not think of it as a performance-critical system call, but there are
workloads that make a lot of fstat() calls; it is not something
that should be slowed unnecessarily.  As it turns out, though, the GNU C
Library (glibc) has been doing exactly that, but a fix is in the works.

https://lwn.net/Articles/944214/