D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] moving a working mediawiki

 

On 09/02/11 18:41, Adrian Midgley wrote:
>
> Looking at it, I understand it to be a physical server
> 
> 75GByte drive
> about 50% full, but with partitions that are inconveniently allocated.
> In May it was said to be "Load currently running at about 1-1.5g a day,
> serving about a million requests a year."

Million requests a year, is 0.03 per second, practically nothing. So it
should be idling.

Okay the stats on the site itself suggest it use to get around 4000
visits a day in 2009, so probably not a million requests a day, but that
would be closer to the truth than per year.

YSlow notes a lack of compression or expires headers, adding these to a
reasonably maintained Apache instance is about 10 minutes work.

Compression - lots of tutorials...
http://www.debian-administration.org/articles/137
(You can ignore the caveat about broken browsers, gzip compression works
in all modern browsers).

Expiry is slightly riskier, ideally your server app has a way to create
unique URLs (cache busting), but even a relatively short cache such as 1
day on CSS, images and JavaScript will eat a lot of pointless requests.

http://httpd.apache.org/docs/2.0/mod/mod_expires.html#expiresbytype

Compression for all text content would have minimal impact, but might
cut the bandwidth charges and speed things up (depending on CPU load).

Proper expiry for CSS, Javascript, and repeated images (like the logo)
would have more impact at a guess.

I'm seeing a few "302 found" responses whilst browsing the site which
are "obsolete" so they suggest something suboptimal. Seems that the site
redirects "ganfyd.org" to "www.ganfyd.org" but the content returned
contains some URLs with "ganfyd.org" in, so these have to be redirected
each time (and 302 is a temporary redirect, so I assume these may not be
cached as effectively as a 301 redirect in the browser or proxy).

The "somerights20.png" logo is always redirected, and some bits in the
footer and in the creative commons licensing pages all have links to
"ganfyd.org" without the "www" so probably done before www.ganfyd.org
was settled on or some such. So either tidy it up to use one domain
consistently, or serve the same content under both domain names.

There is a more fundamental issue, as when my browser is doing the
second fetch for some of these items it is sometimes taking 19 seconds
for a small graphic. Probably a sign of load, or simply exhausting some
sort of slow in Apache. On the other hand every page view I seem to be
doing two round trips for meta-data about an image that hasn't changed
since January 2006.....

As for the question - sites at a million requests a day can be handled
by relatively small virtual servers easily on modern hardware.

I dare say a quick peak at the apache log and error log will suggest
more ideas.....




-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq