Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2001 17:10:44 -0800 (PST)
From:      Dan Phoenix <dphoenix@bravenet.com>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: systat -vmstat or iostat IO help
Message-ID:  <Pine.BSO.4.21.0103051702020.6833-100000@gandalf.bravenet.com>
In-Reply-To: <200103060102.f2612FH47843@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help


Well we use php mostly. I noticed from moving from php3 to php4
memory consumption on webservers was just incredible and had to
increase ram from 256 megs to 500megs on each of webservers.
Memory is fine now.

[root@lotho dphoenix]# ps aux|grep httpd|wc -l
      65
[root@lotho dphoenix]# top |grep -i mem
Mem: 193M Active, 138M Inact, 89M Wired, 33M Cache, 61M Buf, 46M Free
[root@lotho dphoenix]# uptime
 5:06PM  up 2 days, 23:51, 1 user, load averages: 3.29, 1.94, 1.70
[root@lotho dphoenix]# 

load is down now cause peak is off but systat -vm 1 showed about 3-4
seconds of 100% then 1 sec of 0 then 3-4 sec of 100% again...etc.
Another factor is mysql with persistant database connections.
Waiting on a request back from the mysql server could cause some IO
as well i could imagine...another factor. Only thing I have never been
able to figure out is how to kill persistant connections when a mysql
server goes down. Let's say i drop a mysql server....all the webservers
will use up all ram and swap till machine just drops using up all it's
resources.....effect on freebsd is unable to free vm free_pages and
machine pretty much crashes and requires a hard reboot. There is no fix
for this....we have solved some of this bye setting semaphores on site
to tell webservers that mysql server is down...then restart apache on
those webservers to kill persistant connections to db's.

But I am going offtopic....memory is not an issue. So real question
is how to calculate then if the drive is doing more than say 166 seeks on
disk per sec. Any great tool out there :)



On Mon, 5 Mar 2001, Matt Dillon wrote:

> Date: Mon, 5 Mar 2001 17:02:15 -0800 (PST)
> From: Matt Dillon <dillon@earth.backplane.com>
> To: Dan Phoenix <dphoenix@bravenet.com>
> Cc: freebsd-hackers@FreeBSD.ORG
> Subject: Re: systat -vmstat or iostat IO help
> 
> 
> :
> :
> :
> :this is a webserver ......i am trying to figure out if cpu increase or
> :scsi drives is better in this situation. Right now...that is a big
> :decision because there are approx 30 fbsd webservers ....not all showing
> :high IO from vmstat...just the ones with the highest uptime.
> :...
> 
>     Check the memory load with 'systat -vm 1'... if you are swapping a
>     lot simply adding more memory may solve the problem.  Generally speaking,
>     adding more memory to a web server helps a lot even if you aren't
>     swapping because web servers tend to be heavy on reading files.  
> 
>     Today's machines are powerful enough that you can serve thousands of
>     users off a single host, but drive technology isn't powerful enough to
>     serve large datasets off a single drive so you need a lot of ram for
>     cache.  For example, a 20G hard drive may be able to store 20G worth
>     of files, but it sure won't be able to keep up with a heavily loaded
>     webserver unless you have a lot of ram for caching.  Drive seek times
>     tend to top out at 6ms, or 166 seeks per second, and without sufficient
>     memory to cache the web pages this will result in severe limitations
>     to the number of hits/sec the webserver can handle.
> 
> 						-Matt
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSO.4.21.0103051702020.6833-100000>