Jump to content

How big can HOSTS be?


Recommended Posts

Posted

Will there be a performance hit if the HOSTS file passes a certain size

or number of entries? I use Spybot Search & Destroy's Immunize feature,

which maps bad-guy sites and domains to localhost in HOSTS, and I see

that it's up to well over 8000 lines in addition to the entries I've

put there myself.

 

I don't notice any slowdown... yet.

Guest R. McCarty
Posted

Re: How big can HOSTS be?

 

Yes, but at what number is hard to say. Having a Hosts file parsed before

using the DNS service adds some time to resolve a URL But how that

time varies from using the DNS service is a value I'm not aware of. I use

a few entries in my Hosts but mainly just to speed up email and a few sites

I visit very often. Some people use an alternate DNS resolver service from

OpenDNS which internally has many ad sites blocked.

 

"Nil" <rednoise+news@REMOVETHIScomcast.net> wrote in message

news:Xns9A5F9FCD4A4C7nilch1@216.196.97.136...

> Will there be a performance hit if the HOSTS file passes a certain size

> or number of entries? I use Spybot Search & Destroy's Immunize feature,

> which maps bad-guy sites and domains to localhost in HOSTS, and I see

> that it's up to well over 8000 lines in addition to the entries I've

> put there myself.

>

> I don't notice any slowdown... yet.

Guest PA Bear [MS MVP]
Posted

Re: How big can HOSTS be?

 

It /could/ have an affect on performance, yes. See

http://www.mvps.org/winhelp2002/hosts.htm#Note

--

~Robear Dyer (PA Bear)

MS MVP-IE, Mail, Security, Windows Desktop Experience - since 2002

AumHa VSOP & Admin http://aumha.net

DTS-L http://dts-l.net/

 

Nil wrote:

> Will there be a performance hit if the HOSTS file passes a certain size

> or number of entries? I use Spybot Search & Destroy's Immunize feature,

> which maps bad-guy sites and domains to localhost in HOSTS, and I see

> that it's up to well over 8000 lines in addition to the entries I've

> put there myself.

>

> I don't notice any slowdown... yet.

Posted

Re: How big can HOSTS be?

 

On 12 Mar 2008, "PA Bear [MS MVP]" <PABearMVP@gmail.com> wrote in

microsoft.public.windowsxp.general:

> It /could/ have an affect on performance, yes. See

> http://www.mvps.org/winhelp2002/hosts.htm#Note

 

OK. It says that it can slow things down if it grows over 135kb. Mine

is now 228 kb. I have notices a few times lately where I wouldn't

connect to a site with my browser, and then after a refresh I would get

it. Maybe it's a time-out due to a too-large file. Next time I see that

happening I'll put in a clean HOSTS and see if it helps.

 

Thank you.

Posted

Re: How big can HOSTS be?

 

On 12 Mar 2008, "R. McCarty" <PcEngWork-NoSpam_@mindspring.com>

wrote in microsoft.public.windowsxp.general:

> Some people use an alternate DNS resolver service from OpenDNS

> which internally has many ad sites blocked.

 

I'll check into that - it sounds like it might be good alternative

to an ever-expanding HOSTS.

Posted

Re: How big can HOSTS be?

 

Nil <rednoise+news@REMOVETHIScomcast.net> wrote:

>OK. It says that it can slow things down if it grows over 135kb. Mine

>is now 228 kb.

 

mine is 1KB... and I don't have any problems.

Posted

Re: How big can HOSTS be?

 

On 12 Mar 2008, PD43 <pauld1943@comcast.net> wrote in

microsoft.public.windowsxp.general:

> Nil <rednoise+news@REMOVETHIScomcast.net> wrote:

>

>>OK. It says that it can slow things down if it grows over 135kb.

>>Mine is now 228 kb.

>

> mine is 1KB... and I don't have any problems.

 

Is that what you really mean? That's barely over the size of the

default HOSTS, which shouldn't create any problems at all.

 

If you really mean MB, I'll feel much better about mine!

Posted

Re: How big can HOSTS be?

 

Nil <rednoise+news@REMOVETHIScomcast.net> wrote:

>> mine is 1KB... and I don't have any problems.

>

>Is that what you really mean? That's barely over the size of the

>default HOSTS, which shouldn't create any problems at all.

>

>If you really mean MB, I'll feel much better about mine!

 

SORRY... it's 1kb

Posted

Re: How big can HOSTS be?

 

On 12 Mar 2008, PD43 <pauld1943@comcast.net> wrote in

microsoft.public.windowsxp.general:

> SORRY... it's 1kb

 

Damn. Now I feel bad again.

Guest Ken Blake, MVP
Posted

Re: How big can HOSTS be?

 

On Wed, 12 Mar 2008 15:43:49 -0500, Nil

<rednoise+news@REMOVETHIScomcast.net> wrote:

> On 12 Mar 2008, "PA Bear [MS MVP]" <PABearMVP@gmail.com> wrote in

> microsoft.public.windowsxp.general:

>

> > It /could/ have an affect on performance, yes. See

> > http://www.mvps.org/winhelp2002/hosts.htm#Note

>

> OK. It says that it can slow things down if it grows over 135kb.

 

 

Did you read past that sentence? Yes, it says that. But it also tells

you how to resolve that issue.

 

 

> Mine

> is now 228 kb. I have notices a few times lately where I wouldn't

> connect to a site with my browser, and then after a refresh I would get

> it. Maybe it's a time-out due to a too-large file. Next time I see that

> happening I'll put in a clean HOSTS and see if it helps.

>

> Thank you.

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

Posted

Re: How big can HOSTS be?

 

On 12 Mar 2008, "Ken Blake, MVP" <kblake@this.is.an.invalid.domain>

wrote in microsoft.public.windowsxp.general:

>> > http://www.mvps.org/winhelp2002/hosts.htm#Note

>>

>> OK. It says that it can slow things down if it grows over 135kb.

>

> Did you read past that sentence? Yes, it says that. But it also

> tells you how to resolve that issue.

 

No, I didn't. I'll play around with it and see what difference it

makes.

Posted

Re: How big can HOSTS be?

 

Mine is 373KB with no noticeable problems.

___

"PA Bear [MS MVP]" <PABearMVP@gmail.com> wrote in message

news:OQk2RwHhIHA.3780@TK2MSFTNGP06.phx.gbl...

> It /could/ have an affect on performance, yes. See

> http://www.mvps.org/winhelp2002/hosts.htm#Note

> --

> ~Robear Dyer (PA Bear)

> MS MVP-IE, Mail, Security, Windows Desktop Experience - since 2002

> AumHa VSOP & Admin http://aumha.net

> DTS-L http://dts-l.net/

>

> Nil wrote:

>> Will there be a performance hit if the HOSTS file passes a certain

>> size

>> or number of entries? I use Spybot Search & Destroy's Immunize

>> feature,

>> which maps bad-guy sites and domains to localhost in HOSTS, and I see

>> that it's up to well over 8000 lines in addition to the entries I've

>> put there myself.

>>

>> I don't notice any slowdown... yet.

>

Posted

Re: How big can HOSTS be?

 

"R. McCarty" <PcEngWork-NoSpam_@mindspring.com> wrote in message

news:ORRNNtHhIHA.6092@TK2MSFTNGP06.phx.gbl...

> Yes, but at what number is hard to say. Having a Hosts file parsed

> before

> using the DNS service adds some time to resolve a URL But how that

> time varies from using the DNS service is a value I'm not aware of. I

> use

> a few entries in my Hosts but mainly just to speed up email and a few

> sites

> I visit very often.

 

I didn't know the HOSTS file could be used to speed things up, I've only

used it to block addresses. Could you please explain how an entry can be

used to speed things up?

 

TIA

Guest R. McCarty
Posted

Re: How big can HOSTS be?

 

Maybe speed things up isn't the correct term. Anyway for sites that you

frequently access using a Hosts entry lessens the time for the URL to get

translated. The only issue is if a site changes it's IP Address you'll need

to make the appropriate changes to your Hosts file. My hosts file includes

about 9 entries - mostly email related. I didn't intend to promote using a

Hosts file as a "Performance Tweak", just something that helps expedite

opening/accessing email servers.

 

"Vic" <nospam@bogusaddress.com> wrote in message

news:OVQCFqQhIHA.4076@TK2MSFTNGP05.phx.gbl...

> "R. McCarty" <PcEngWork-NoSpam_@mindspring.com> wrote in message

> news:ORRNNtHhIHA.6092@TK2MSFTNGP06.phx.gbl...

>> Yes, but at what number is hard to say. Having a Hosts file parsed before

>> using the DNS service adds some time to resolve a URL But how that

>> time varies from using the DNS service is a value I'm not aware of. I use

>> a few entries in my Hosts but mainly just to speed up email and a few

>> sites

>> I visit very often.

>

> I didn't know the HOSTS file could be used to speed things up, I've only

> used it to block addresses. Could you please explain how an entry can be

> used to speed things up?

>

> TIA

>

Guest Ken Blake, MVP
Posted

Re: How big can HOSTS be?

 

On Thu, 13 Mar 2008 08:02:30 -0500, "Vic" <nospam@bogusaddress.com>

wrote:

> I didn't know the HOSTS file could be used to speed things up, I've only

> used it to block addresses. Could you please explain how an entry can be

> used to speed things up?

 

 

 

 

Although people think of the URL as the address of a web site, the

real address is an IP address, a number in the form 123.456.789.

 

The URL is just an easily-remembered shortcut to get you to the IP

address. To translate from the URL that you type in your browser to

the actual IP address, your browser goes out to a special web site

caused a DNS server. The URL is looked up there and the DNS server

returns the IP address that the browser then loads.

 

That's a two-step process that takes time. The primary purpose of the

Host file is not to block addresses, but to speed up that DNS lookup.

The Hosts file essentially asks like a local DNS server for web sites

you frequently visit. If the browser can find the IP address it needs

there, it's much faster than going to a DNS server to get it.

 

Secondarily, the Hosts file can be used to block addresses, but that's

not it's primary purpose.

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

Guest Ken Blake, MVP
Posted

Re: How big can HOSTS be?

 

On Thu, 13 Mar 2008 10:53:15 -0700, "Ken Blake, MVP"

<kblake@this.is.an.invalid.domain> wrote:

 

> Secondarily, the Hosts file can be used to block addresses, but that's

> not it's primary purpose.

 

 

UGH!! I *hate* it when I do that. That should be "its," not "it's."

 

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

Posted

Re: How big can HOSTS be?

 

"Ken Blake, MVP" <kblake@this.is.an.invalid.domain> wrote:

>On Thu, 13 Mar 2008 10:53:15 -0700, "Ken Blake, MVP"

><kblake@this.is.an.invalid.domain> wrote:

>

>

>> Secondarily, the Hosts file can be used to block addresses, but that's

>> not it's primary purpose.

>

>

>UGH!! I *hate* it when I do that. That should be "its," not "it's."

 

How 'bout when you do this:

 

"The Hosts file essentially asks like a local DNS server for web sites

you frequently visit." ^^^

Guest Ken Blake, MVP
Posted

Re: How big can HOSTS be?

 

On Thu, 13 Mar 2008 14:06:40 -0500, PD43 <pauld1943@comcast.net>

wrote:

> "Ken Blake, MVP" <kblake@this.is.an.invalid.domain> wrote:

>

> >On Thu, 13 Mar 2008 10:53:15 -0700, "Ken Blake, MVP"

> ><kblake@this.is.an.invalid.domain> wrote:

> >

> >

> >> Secondarily, the Hosts file can be used to block addresses, but that's

> >> not it's primary purpose.

> >

> >

> >UGH!! I *hate* it when I do that. That should be "its," not "it's."

>

> How 'bout when you do this:

>

> "The Hosts file essentially asks like a local DNS server for web sites

> you frequently visit."

 

 

 

UGH again! Got me! As often happens, my fingers and my brain lost

contact with each other.

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

Guest Bob I
Posted

Re: How big can HOSTS be?

 

 

 

PD43 wrote:

> "Ken Blake, MVP" <kblake@this.is.an.invalid.domain> wrote:

>

>

>>On Thu, 13 Mar 2008 10:53:15 -0700, "Ken Blake, MVP"

>><kblake@this.is.an.invalid.domain> wrote:

>>

>>

>>

>>>Secondarily, the Hosts file can be used to block addresses, but that's

>>>not it's primary purpose.

>>

>>

>>UGH!! I *hate* it when I do that. That should be "its," not "it's."

>

>

> How 'bout when you do this:

>

> "The Hosts file essentially asks like a local DNS server for web sites

> you frequently visit." ^^^

 

That would be "acts" I presume. ;-)

Guest Zilbandy
Posted

Re: How big can HOSTS be?

 

On Thu, 13 Mar 2008 12:27:36 -0700, "Ken Blake, MVP"

<kblake@this.is.an.invalid.domain> wrote:

>> "The Hosts file essentially asks like a local DNS server for web sites

>> you frequently visit."

>

>

>

>UGH again! Got me! As often happens, my fingers and my brain lost

>contact with each other.

 

I'm finding that happening more and more to me, too. I think it's

called... getting old. LOL

 

--

Zilbandy

Posted

Re: How big can HOSTS be?

 

Ken, very informative post! I was wondering how to enter a URL to speed

access. In my current HOSTS the format to BLOCK is:

 

0 whateveraddress.com

 

I do not use the standard 0.0.0.0, found one zero works fine and helps

keeps file size down

 

What format is required to make access faster?

 

Thanks

Vic

___

 

"Ken Blake, MVP" <kblake@this.is.an.invalid.domain> wrote in message

news:i3qit3ln148qmontfqpbkmc62phl8cop3f@4ax.com...

> On Thu, 13 Mar 2008 08:02:30 -0500, "Vic" <nospam@bogusaddress.com>

> wrote:

>

> > I didn't know the HOSTS file could be used to speed things up, I've

only

> > used it to block addresses. Could you please explain how an entry

can be

> > used to speed things up?

>

>

>

>

> Although people think of the URL as the address of a web site, the

> real address is an IP address, a number in the form 123.456.789.

>

> The URL is just an easily-remembered shortcut to get you to the IP

> address. To translate from the URL that you type in your browser to

> the actual IP address, your browser goes out to a special web site

> caused a DNS server. The URL is looked up there and the DNS server

> returns the IP address that the browser then loads.

>

> That's a two-step process that takes time. The primary purpose of the

> Host file is not to block addresses, but to speed up that DNS lookup.

> The Hosts file essentially asks like a local DNS server for web sites

> you frequently visit. If the browser can find the IP address it needs

> there, it's much faster than going to a DNS server to get it.

>

> Secondarily, the Hosts file can be used to block addresses, but that's

> not it's primary purpose.

>

> --

> Ken Blake, Microsoft MVP - Windows Desktop Experience

> Please Reply to the Newsgroup

Guest Ken Blake, MVP
Posted

Re: How big can HOSTS be?

 

On Thu, 13 Mar 2008 19:40:32 -0500, "none" <nospam@bogusaddress.com>

wrote:

> Ken, very informative post! I was wondering how to enter a URL to speed

> access. In my current HOSTS the format to BLOCK is:

>

> 0 whateveraddress.com

>

> I do not use the standard 0.0.0.0, found one zero works fine and helps

> keeps file size down

 

 

What is standard is 127.0.0.1

 

If you say 0 works, OK, but I have no experience with that. Read here:

"Blocking Unwanted Parasites with a Hosts File" at

http://www.mvps.org/winhelp2002/hosts.htm

 

 

> What format is required to make access faster?

 

 

Exactly the same:

 

ipaddress URL

 

Also note that the hosts file can be hijacked to send a URL, not to

the right ip address, but to a malicious one. There is software

available to notify you of any attempt to change the Hosts file. For

example, WinPatrol does this

 

 

 

> Thanks

> Vic

> ___

>

> "Ken Blake, MVP" <kblake@this.is.an.invalid.domain> wrote in message

> news:i3qit3ln148qmontfqpbkmc62phl8cop3f@4ax.com...

> > On Thu, 13 Mar 2008 08:02:30 -0500, "Vic" <nospam@bogusaddress.com>

> > wrote:

> >

> > > I didn't know the HOSTS file could be used to speed things up, I've

> only

> > > used it to block addresses. Could you please explain how an entry

> can be

> > > used to speed things up?

> >

> >

> >

> >

> > Although people think of the URL as the address of a web site, the

> > real address is an IP address, a number in the form 123.456.789.

> >

> > The URL is just an easily-remembered shortcut to get you to the IP

> > address. To translate from the URL that you type in your browser to

> > the actual IP address, your browser goes out to a special web site

> > caused a DNS server. The URL is looked up there and the DNS server

> > returns the IP address that the browser then loads.

> >

> > That's a two-step process that takes time. The primary purpose of the

> > Host file is not to block addresses, but to speed up that DNS lookup.

> > The Hosts file essentially asks like a local DNS server for web sites

> > you frequently visit. If the browser can find the IP address it needs

> > there, it's much faster than going to a DNS server to get it.

> >

> > Secondarily, the Hosts file can be used to block addresses, but that's

> > not it's primary purpose.

> >

> > --

> > Ken Blake, Microsoft MVP - Windows Desktop Experience

> > Please Reply to the Newsgroup

>

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

Guest Ken Blake, MVP
Posted

Re: How big can HOSTS be?

 

On Thu, 13 Mar 2008 14:28:40 -0500, Bob I <birelan@yahoo.com> wrote:

>

>

> PD43 wrote:

>

> > "Ken Blake, MVP" <kblake@this.is.an.invalid.domain> wrote:

> >

> >

> >>On Thu, 13 Mar 2008 10:53:15 -0700, "Ken Blake, MVP"

> >><kblake@this.is.an.invalid.domain> wrote:

> >>

> >>

> >>

> >>>Secondarily, the Hosts file can be used to block addresses, but that's

> >>>not it's primary purpose.

> >>

> >>

> >>UGH!! I *hate* it when I do that. That should be "its," not "it's."

> >

> >

> > How 'bout when you do this:

> >

> > "The Hosts file essentially asks like a local DNS server for web sites

> > you frequently visit." ^^^

>

> That would be "acts" I presume. ;-)

 

 

Yes, that's what it should have been.

 

 

 

--

Ken Blake, Microsoft MVP - Windows Desktop Experience

Please Reply to the Newsgroup

×
×
  • Create New...