Where's my web server bottleneck?

bronto yellowdog-general@lists.terrasoftsolutions.com
Wed Nov 20 23:58:01 2002


--=======C4C1B94=======
Content-Type: text/plain; x-avg-checked=avg-ok-36F65884; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

Good suggestion.  I didn't have a fat image handy so I used a zip file.  I 
use Opera which gives me nice numbers as it browses.  Here's the stats:

Browsing the site in a standard way, the page loads in about 12 
seconds.  Opera says it's going about 12k per sec, and is loading about 120kb.
I saved the page as it's own file; it's about 105k of pure html.  I loaded 
it back onto the server and browsed just that file.  I get very much the 
same figures as above.
I created a link to the zip file so I could use the browser to download a 
file of exactly the same size.  The download was very fast, perhaps a 
couple of seconds.

That tells me there's nothing wrong with php, since it wasn't even involved 
in the 2nd test.  Also, my net connection is reasonably fast given the 
speed of the third test.

Maybe something's not right with apache?

Thanks

Rob



At 11:47 PM 11/20/02 -0500, you wrote:
>On Wed, 20 Nov 2002, bronto wrote:
> >>How many users are we talking here on average?
> >
> >At the moment typically only a few at a time.  But I am expecting a
> >barrage towards the end of the month.  Not hundreds at a time, mind you,
> >but certainly dozens.
>
>  If you are only getting a few hits at a time, and your machine is bogged
>down, then it would seem that there is something not right. The first
>thing I would look at is a test of your bandwidth. How long does it take
>to fetch a 100k image from your server? Compare that to your 100k PHP
>file, but do it without rendering the HTML or image (ie. do a save this
>link as or use a sucking tool like wget). If the difference is
>significant, then the problem is likely in the PHP programming. There are
>lots of ways do optimize that depending on what sort of code is being
>used:
>
>  - avoid unnecessary function calls. PHP doesn't do them very efficiently.
>  - check your database connections and DB performance.
>  - if you are including global files, check to see that you aren't
>    including things you don't need. Including the entire library of code
>    would be bad.
>
>  In general PHP isn't that bad in terms of performance, but you can easily
>write code that is a resource hog and very inefficient (like any language
>I guess). My central web server (a G4 867 w/896MB of RAM) takes on about
>350k page hits (no images) per day, all PHP driven and they are big -
>about 120k each.  For the most part, it handles it without any problems,
>but at peak hours it is starting to show.
>
>Cheers,
>
>Chris
>
>--
>
>Christopher Murtagh
>Webmaster / Sysadmin
>Web Communications Group
>McGill University
>Montreal, Quebec
>Canada
>
>Tel.: (514) 398-3122
>Fax:  (514) 398-2017
>
>
>_______________________________________________
>yellowdog-general mailing list
>yellowdog-general@lists.terrasoftsolutions.com
>http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general

--=======C4C1B94=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-36F65884
Content-Disposition: inline


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/02

--=======C4C1B94=======--