Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Feb 1996 03:27:19 -0700 (MST)
From:      Dave Andersen <angio@aros.net>
To:        sderdau@xtdl.com
Cc:        questions@freebsd.org
Subject:   Re: System hosts response is slow.
Message-ID:  <199602291027.DAA25613@terra.aros.net>
In-Reply-To: <199602290730.XAA08719@Root.COM> from "David Greenman" at Feb 28, 96 11:30:04 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Lo and behold, David Greenman once said:
> 
> >I have a few p75's with 64mgs of ram ea.  I have web pages
> >on these systems.  At times when calling up a web page on one
> >of the boxes the response is very very slow.  Any suggestions
> >will be helpful. Disregarding the speed of the modems phone line
> >and anything external to the system.  We have a few pages on 
> >the system that are getting alot of hits.  
> >
> >Do I have to get a bigger system to handel this.  It is not
> >like there are ton's of pages on our system.  A few.  And these
> >do get many many hits.  
> 
>    You didn't mention which version of FreeBSD you are using. The problem is

  Also forgot which webserver you're running. :-)  If you're running 
something like CERN, there's a very easy solution:  Upgrade. :-)

> likely caused by the listen queue limit being too low, causing some connection
> requests to get dropped. Check the value of "SOMAXCONN" in /sys/sys/socket.h.
> Make sure this is 128 (it is probably much lower if you are running 2.1R or
> older FreeBSD). Also make sure that the second argument to the listen() syscall
> in your web server has a value that is large, 128 for instance. The actual
> value that the kernel uses will be limited to SOMAXCONN.

  The other "quick fix" to a slow webserver is to disable reverse 
namelookups.  The effects this has on a webserver that gets a very high 
per-minute hit rate is just amazing.  Of course, you don't get pretty 
little "domain reports" unless you use something to analyze the files 
that'll do the lookups itself, but it's a small price to pay if you can't 
afford a hardware upgrade.

   If you're using a server with caching reverse DNS lookups or something 
of that nature (spinner, if it's available for FreeBSD, etc) you won't 
achieve as much of a benefit from this.

   To compile Apache without reverse namelookups, add the -DMINIMAL_DNS 
key.  You can expect host-based authentication to fail also.

   -Dave Andersen

-- 
angio@aros.net                Complete virtual hosting and business-oriented
system administration         Internet services.  (WWW, FTP, email)
http://www.aros.net/          http://www.aros.net/about/virtual/
  "There are only two industries that refer to thier customers as 'users'."




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602291027.DAA25613>