Nscd caches name service lookups and can dramatically improve performance with NIS+, and may help with DNS as well.