Monitoring Bandwidth

Bandwidth usage is another limit your hosting service will specify. Strictly speaking, bandwidth is the wrong term to use. Hosting companies usually restrict your monthly data transfer allowance; that is, they monitor how much data is transferred from your account each month. Unfortunately, the term bandwidth is so commonly used for this allowance that it has become the way to describe it.

If you exceed the allowed bandwidth, several things may happen:

• The hosting company may shut down your site until the end of the month.

• The hosting company may allow your site to go over the limit but charge you for the excess (often an excessive amount).

• The hosting company may force you to upgrade your account to one with more bandwidth allowance.

Most control panels provided by your hosting company have some way to monitor your bandwidth usage. Figure 18-8 shows one such example from the Plesk control panel (http:// www.sw-soft.com/en/products/plesk/).

Domain Tola I Used Limit Available Used [in %)

zedl .com

19 818.72 MB

MB

82 581.28 MB

19.4% 1-

1

Service A

Used

,„

Oih

% ot All

FTP

3.41 MB

0.75 MB

2.65 MB

n% E

1

HTTP

18 902.92 MB

0.00 MB

18 902.92 MB

Hii.4% 1-

- 1

FOP 3/1 MAP

325.36 MB

0.64 MB

324.71 MB

1 6% C

1

SMTP

587.04 MB

586.46 MB

0.59 MB

:■!% r:

1

Figure 18-8. Plesk traffic report

If your hosting service provides traffic statistics derived from your web server logs, those can be another way to monitor your traffic. Figure 18-9 shows a typical monthly chart from the Webalizer package (http://www.mrunix.net/webalizer/). From a chart like this, you can get a good idea of the growth of your traffic and look for trends that look like you might be exceeding your bandwidth allowance.

Figure 18-10 shows another statistics report from the Webalizer package. This particular report shows the URLs that use the most bandwidth. In this example, you see that the third page in the list has managed to generate almost 1.3% of the traffic, despite having only 791 hits. Compare that to the first page in the list, which has of 22,000 hits for 7.4% of the traffic. In other words, that third file is using a disproportionate amount of bandwidth allowance. I investigated that post on my blog and saw that it has more than 530 comments, making it a huge, 400KB page. I can choose to address this issue in some way, perhaps by trimming the comments that are over a year old. Many statistics package provide reports like this that allow you to delve into the aggregated data from your server's web logs.

Figure 18-9. Webalizer monthly summary

Top 10 of 10889 Total URLs By KBytes

# Hits

KBytes

URL

1

22355

1.53%

1511278

7.42%

/journalized/

2

8035

0.55%

713140

3.50%

/j o u rn a 1 i z e d/a re h ive s/20 0 2/10/20/nt 1 - p roxv-s e rve rs !

3

791

0.05%

262595

1.29%

/¡ounialized/archives/2003/06/03/chester-benninaton-hospitalisedhospitalized/

4

187

0.01%

183005

0.90%

f\m a q e s/j oy- of-wo rk. rm

5

5526

0.30%

171575

0.84%

t

6

24938

1.71%

164492

0.81%

/¡ournalized/wp-contEnt/thEmes/jDurnHlized/themes/SHnd/laynut.css

7

25330

1.74%

163525

0.80%

/¡ournHlized/wp-content/thEme5/journHlized/thEmes/newvaar2003/layout.c5s

8

26130

1.79%

156100

0.77%

/¡ournalized/wp-CDntent/themes/jnurnalized/thEmES/halloween/layout.c55

9

27677

1.90%

149195

0.73%

/¡ournalized/wp-content/themes/journalized/style.css

10

25171

1.73%

144530

0.71%

/¡ournalized/wp-content/themes/journalized/themes/winter/layout.css

Figure 18-10. Another view ofWebalizer statistics

One way to reduce your bandwidth usage is to reduce the size of your pages. A properly constructed, valid, XHTML web page will be smaller in size than one written in the old-school style using font tags, tables, and spacer images for layout. Using CSS for styling and layout reduces the size of your web page so that it downloads quicker and reduces your bandwidth usage. It will most likely render more quickly in your readers' browsers, too, which is an added bonus.

WordPress strives to conform to the XHTML standard, but even though the code delivered by WordPress may be minimal, it still doesn't prevent you from writing pages and posts using the old-school style of web page writing, though it does encourage you to separate presentation and content by the appropriate use of CSS. In the previous chapter, I illustrated how to remove the sidebar of calendars, del.icio.us links, and login/register controls. Doing so not only makes the page cleaner for a single-post-entry context, but also reduces the page weight— considerably, if your sidebars contain a lot of information, such as a long list of pages, posts, categories, and so on. The example in Chapter 17 would work well if your most weighty pages are individual posts, like two of the top three URLs in Figure 18-10.

Was this article helpful?

0 0

Post a comment