zlacker

[parent] [thread] 1 comments
1. bandie+(OP)[view] [source] 2025-03-26 15:04:42
i guess this shows that looking up getent hostname database cache is faster than looking up local dns cache because the former is simpler in data structure?
replies(1): >>sleepy+zj1
2. sleepy+zj1[view] [source] 2025-03-26 22:18:17
>>bandie+(OP)
I didn't dig into it too deeply at the time, but I think part of it was that you don't need to open and write to a socket, so that's avoiding some system calls (socket(), bind(), sendto(), close()). IIRC we had nscd set up so clients directly read from shared memory that nscd kept updated, rather than getting requests over a socket.

There's also probably some savings around not having to convert between the structures used by gethostbyname and DNS questions&answers.

[go to top]