- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: large /etc/hosts file : performance issues?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 01:23 AM
тАО08-11-2006 01:23 AM
From an HP OS internals class I took years ago, I thought I remember being told that a host file over 10,000 lines would begin to affect performance. I am trying to gather advice and best practice methodologies to get the application architect to use DNS instead.
I would appreciate any links or advice you can share regarding large hosts files.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 01:41 AM
тАО08-11-2006 01:41 AM
Re: large /etc/hosts file : performance issues?
according to man the /etc/hosts should normally be used to store "a few addresses of machines on the local network".
gethostent, used for "searching" /etc/hosts has to read the file sequentially to find your entry, so the bigger the file ...
However, speed should make this a non-impacting event. Do you experience any problems with your /etc/hosts file, besides maintenenace issues?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 01:45 AM
тАО08-11-2006 01:45 AM
Re: large /etc/hosts file : performance issues?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 01:46 AM
тАО08-11-2006 01:46 AM
Re: large /etc/hosts file : performance issues?
Please ensure that all 10000 lines are valid, it may be old and many of your hosts/ips would have been changed. Type to write a script with ping to find the unwanted hosts that are not pingable.
What difference it makes from application point it uses a hosts or DNS/NIS, I don't find any valid reason why you are not migrating to DNS. Entire world is using DNS for its internet/Intranet, why not one system?
Chan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 01:56 AM
тАО08-11-2006 01:56 AM
SolutionI found things related to having incorrect information in the /etc/hosts, some security threads related to adding internet entries in the /etc/hosts...
But the /etc/hosts should work fine if entries are clean.
The best thing is to move to DNS having that amound of entries, it takes 3 months studying the material and implementing in test server, but after it administration is going to be so much easier.
Regards,
Jaime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 02:06 AM
тАО08-11-2006 02:06 AM
Re: large /etc/hosts file : performance issues?
I went back through all my course materials from SysAdmin, to Troubleshooting, to Performance and Tuning, to Internals and could find no reference to large hosts files causing issues. That certainly doesn't prove that it won't however.
My personal preference is to keep just my few HP boxes in the hosts file and rely on DNS for the rest. I use to keep everything in the hosts file but things would end up getting out of sync. It's much easier to just let DNS handle it.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 02:18 AM
тАО08-11-2006 02:18 AM
Re: large /etc/hosts file : performance issues?
The most intriguing thing that you said was "I find this one system that requires it.". Why? All of the gethostbyname(), gethostent(), ... functions understand nsswitch and wouldn't care if the hosts are stored in /etc/hosts, DNS, or NIS(+) so it sounds as though you have an application that uses a "homemade" host lookup function -- and that is just plain dumb. If this is the case then you need to have a serious talk with the developer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 02:28 AM
тАО08-11-2006 02:28 AM
Re: large /etc/hosts file : performance issues?
But if for now you have to live with large host file, and you suspect it has a performance impact then I would recommend to used 2 hosts files.
One master in which you make changes and maintain comments. The actual /etc/hosts would be the other, a slave, wich is a stripped down copy. All comments removed, whitespace collapsed to single space.
To measure performance impact, maybe you can do a network taks (ping?) 1000 times over, once with hard coded address, once by name.
One would expect the network latency to drown out /etc/hosts effects, but maybe...
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2006 02:33 AM
тАО08-11-2006 02:33 AM
Re: large /etc/hosts file : performance issues?
i cannot comment on why i have to use hosts other than what i have already said due to customer requirements.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2006 01:45 PM
тАО08-14-2006 01:45 PM
Re: large /etc/hosts file : performance issues?
I worked in a complex corporate OVO environment where over half of the hosts were isolated from the OVO server where the events were managed by multiple natted firewalls. In this environment most of the hosts were not - and could not be placed in the DNS where the the top level OVO server resided. There were 5 production management servers, and over 3,500 managed nodes, not including event only hosts. This environment was rappidly expanding.
There were several solutions but none included DNS because of the environment. In this case the best (but by no means good) solution was to use a managed hosts file.
I have to say that we did have mnay problems but no serious issues with the hosts files per se.