Speed Tweak Recant and Apology
Thanks to the various communities I am a part of, I've been taught better than that little Speed Tweak I posted earlier.
Apparently it's bad practice and can break stuff and, in my case at least, the performance gain was due to the fact that I formed my /etc/nsswitch.conf files incorrectly out of ignorance, having it check for hostnames via wins before looking at the hosts file. It seems that by assigning it to 127.0.0.1, it began resolving it from memory.
I had no idea when I made that change that the computer would be checking for it's OWN hostname everytime it went to run a program. Seems like a strange practice...
So, by correctly forming my /etc/nsswitch.conf with files at the beginning, I'm still experiencing a noticeable speed boost, but this wouldn't help anyone who didn't bugger up their /etc/nsswitch.conf file in the first place.
I'm sorry for advocating a bad practice. I was simply excited that it seemed to work for me.
2 Comments:
Hi. Could you explain what you did with your nsswitch.conf file? or perhaps link to instructions for it? Also, why is the hosts tweak a bad idea? Thanks!
Well, re:/etc/nsswitch.conf:
I had set "hosts: wins files dns"
so that it was checking with wins before looking in the files to resolve hostnames, and I fixed it to "hosts: files wins dns" because that's what the files are there for.
The /etc/hosts tweak is a bad idea is because it short-circuits the hostname lookup for your computer (which is done everytime you run a program on the X server), which can cause problems for programs that need to look up a non-loopback interface.
I don't understand the details myself, but I've been warned against it by several experienced Linux people who I respect and that's enough for me.
I did seem to have a few strange issues crop up while I had the /etc/hosts file tweaked that have since gone away.
Post a Comment
<< Home