cancel
Showing results for 
Search instead for 
Did you mean: 

How to monitor bandwidth use

ratbag
Grafter
Posts: 369
Registered: ‎01-08-2007

How to monitor bandwidth use

Hello all,
Can someone clear something up for me. I know that my PlusNet account allows 250MB bandwidth on my website per day. I'm aware that this includes all page hits, images, graphics, css etc.
However, I have some files for people to download and at the moment I have put a limit on the download count per day (number pulled out of thin air) so my site doesn't get taken down again. I'd like something more useful based on real figures. My questions are:
1). If someone downloads a 1MB file then is the bandwidth used 1MB? I've seen suggestions that it can be a lot more.
2). Can you monitor bandwidth use on Plusnet in real-time so you can stop downloads once a threshold has been exceeded?
I thank thee,
Barry.
6 REPLIES 6
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: How to monitor bandwidth use

I imagine BT and hence Plusnet will measure bandwidth by counting all packets sent (download and upload) including the packet headers and protocol management packets. For a 1MB file that will add up to considerably more bandwidth usage than 1MB. The overhead on ATM cells and TCP/IP packets is around 13%, which is reflected in IP Profiles being considerably less than sync speed. Client-server connections have also to be established and receipt acknowledgements/retransmit requests sent.
This is a figure plucked out of thin air but possibly downloading a 1MB file could use 1.2MB bandwidth.
I would guess that monitoring website usage in real time isn't practical, but others might know of a way of doing this (or coming close).
David
David
ratbag
Grafter
Posts: 369
Registered: ‎01-08-2007

Re: How to monitor bandwidth use

Thanks a lot David.
I don't pretend to understand all this but on another thread you helped me on,  a member called Tony talked about someone downloading a 1MB file and using 147MB to do it. Something to do with number of connections and part-downloads. Is this possible? If so, anything that can be done to avoid it?
I thank thee,
Barry.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: How to monitor bandwidth use

I guess my 20% overhead assumption is based on a normal transfer with allowance for a small number of errors (which would require retransmission).
I think in the instance you linked to the down-loader's transfer was far from 'normal', with lots of incomplete transfers mostly resulting from the efforts of download-manager software trying to gather a valid file using multiple threads.
I think visualising behaviour is easier if one considers a single stream. If the down-loader's connection is very noisy one could imagine every packet is damaged at least once, retransmission then meaning the total overhead is 100% or more (bandwidth usage 2 times). So I guess the worst case scenario is that supplying a 1MB file *could* cost many times that in website bandwidth usage. The instance quoted of an average of 16 times usage (8 file-request clicks) seems extreme but obviously can't be ruled out.
I imagine guarding against this sort of thing isn't easy if you don't own the server. Does a website on its own have sufficiently fine-grained control?
David
David
ratbag
Grafter
Posts: 369
Registered: ‎01-08-2007

Re: How to monitor bandwidth use

Thanks again David.
A lot of this is beyond me really, but It would just be nice if there was a way to query how much bandwidth your site has used that day from a script and then take action as to whether to allow someone access to files or not based on that rather than just limiting the number of times someone clicks on a download link which is what I have set up now.
Thanks for your help anyway,
Barry.
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: How to monitor bandwidth use

Might be useful to have clarification of the method used to calculate 'bandwidth' for hosted websites. Can PUG ask for this sort of info? Potentially a user could control the usage appearing in the apache logs and therefore the webstats, but, as you say, not the actual traffic.
Gabe
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: How to monitor bandwidth use

I'll certainly see if we (PUG) can get any clues to help with this issues raised in this topic.
David
David