FreeBSD 4.8R sluggish performance

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon May 31 12:39:46 PDT 2004


On Mon, May 31, 2004 at 03:17:30PM -0400, Scott wrote:

> If I try to ping a host on the internet (e.g. freebsd.org), I
> get all the packets, but the output of the command doesn't
> begin for at least 10 seconds. If I try startx, it takes about
> 30 seconds just to begin to display the root window. Even
> backspacing seems much slower.
> 
> While this is going on, no unusual processes are running and
> the CPU is practically unused. Nor is it merely a matter of
> delay--the CPU usage never spikes up like it normally would. It
> just sits mostly idle while the command I've issued takes a
> long time to complete.

This sounds to me a lot like DNS trouble.  If for some reason the
first listed nameserver in your /etc/resolv.conf was not working
correctly, but the second or third one was, it could have the result
you describe: a lot of commands mysteriously hang for what feels like
forever, but is usually less than a minute.

> I can always tell when the problem will occur based upon what
> happens at boot. There are no error messages, but the slowness
> begins when the standard daemons are loading. Cron and sshd
> load just fine, but the delay occurs as sendmail loads, and
> there is another delay as sendmail-clientmqueue loads. Once
> that happens I know I'm in trouble thereafter.

Yup.  sendmail is a very heavy DNS user and it won't start up without
doing lookups on a load of stuff.  sendmail hanging on startup is
pretty much diagnostic for DNS troubles.
 
> I know this isn't much to go on, but does anyone have any clue
> on what I might try? Thank you.

Are you using DHCP to configure your network interface?  That should
create a /etc/resolv.conf file for you automatically. In that file you
should see at least two 'nameserver' lines containing the addresses of
some DNS servers provided by your ISP.  You can test whether your
system can do lookups via those servers by:

    % dig @12.34.56.78 www.freebsd.org

where '12.34.56.78' should be replaced by each of the nameserver IP
numbers from /etc/resolv.conf in turn.  If things are working
correctly you should get a response in a few milliseconds.

If you can confirm that is the problem, then you may be able to edit
the /etc/resolv.conf file and reorder the nameserver lines so that a
communicative server is listed first.  That however is just a band-aid
and you will need to find out why your ISP's servers cannot be
queried.  Make sure you check your firewall configuration carefully --
it's very embarassing to complain to tech support and then find that
it was you blocking the traffic all along.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040531/1f022581/attachment.bin


More information about the freebsd-questions mailing list