🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
13 messages
13 total messages Started by Mozzy Fri, 04 Mar 2005 23:43
Approx conversion from bps to downloaded bytes
#163331
Author: Mozzy
Date: Fri, 04 Mar 2005 23:43
11 lines
1239 bytes
Is there an approximation I can use to convert a bps figure into 
actual bytes downloaded from a newsserver?

I used to say for every 10 bits (baud?) that I would get 8 bits 
downloaded onto my hard drive (the other two being used for comms 
work) but I am not so sure that is a good rule of thumb.

What approximations do other people use?

Does it make a difference to how the approximation is calculated if 
the download is text or binary?
Re: Approx conversion from bps to downloaded bytes
#163333
Author: MartinS
Date: Sat, 05 Mar 2005 00:01
18 lines
1385 bytes
Mozzy <dem_d@mail.com> wrote:

> Is there an approximation I can use to convert a bps figure into 
> actual bytes downloaded from a newsserver?
> 
> I used to say for every 10 bits (baud?) that I would get 8 bits 
> downloaded onto my hard drive (the other two being used for comms 
> work) but I am not so sure that is a good rule of thumb.
> 
> What approximations do other people use?
> 
> Does it make a difference to how the approximation is calculated if 
> the download is text or binary?

1 byte = 8 bits

-- 
Martin S.
Re: Approx conversion from bps to downloaded bytes
#163332
Author: Sarge
Date: Sat, 05 Mar 2005 00:38
30 lines
2501 bytes
"MartinS" <me@my.place> wrote in message
news:4228f6e9$0$88270$892e0abb@auth.newsreader.octanews.com...
> Mozzy <dem_d@mail.com> wrote:
>
> > Is there an approximation I can use to convert a bps figure into
> > actual bytes downloaded from a newsserver?
> >
> > I used to say for every 10 bits (baud?) that I would get 8 bits
> > downloaded onto my hard drive (the other two being used for comms
> > work) but I am not so sure that is a good rule of thumb.
> >
> > What approximations do other people use?
> >
> > Does it make a difference to how the approximation is calculated if
> > the download is text or binary?
>
> 1 byte = 8 bits
>
> -- 
> Martin S.

On a serial stream such as DSL, every 8 bits also has a stop bit for the
receiving UART.  So use 9 bits per byte in your calculation.  The bad part
is when a DSL provider says 3Mbit download speed, they are trying to make it
look better than it really is.  They consider one Mbit = 1,000,000 bits
instead of the proper 1 Mbit = 1024 Kbit = 1,048,576 bits.

--Sarge
Re: Approx conversion from bps to downloaded bytes
#163336
Author: Bert Hyman
Date: Sat, 05 Mar 2005 01:12
13 lines
1427 bytes
In news:960FF163A45B351A7E@204.153.244.156 Mozzy <dem_d@mail.com> wrote:

> Is there an approximation I can use to convert a bps figure into 
> actual bytes downloaded from a newsserver?

If you're talking about a DSL line, I think that "speakeasy.net", one of
the speed test folks at dslreports.com, uses a 13% overhead figure to
figure out line speed from their measured transfer rate. 

Try a few runs at http://www.dslreports.com/stest

-- 
Bert Hyman	St. Paul, MN	bert@iphouse.com
Re: Approx conversion from bps to downloaded bytes
#163400
Author: Ed
Date: Mon, 07 Mar 2005 00:38
17 lines
1463 bytes
Bert Hyman <bert@iphouse.com> wrote in news:Xns960FC35ABEBE7VeebleFetzer@
204.153.244.156:

> If you're talking about a DSL line, I think that "speakeasy.net", one of
> the speed test folks at dslreports.com, uses a 13% overhead figure to
> figure out line speed from their measured transfer rate. 
> 
> Try a few runs at http://www.dslreports.com/stest

I use 1 to 2 bits for each byte sent in overhead.  So that 13% sounds 
reasonable.  On my 512Kb line I 'expect' 50KB to 60KB.

-- 
Ed

http://www.geeks.org/~ed/Usenet_Servers.html
strip to reply
Re: Approx conversion from bps to downloaded bytes
#163486
Author: Mozzy
Date: Tue, 08 Mar 2005 17:30
11 lines
1490 bytes
On Sat 05 Mar 2005 00:38:18, Sarge wrote:
<news:_b7Wd.3497$C47.2013@newssvr14.news.prodigy.com>

> receiving UART.  So use 9 bits per byte in your calculation. 
> The bad part is when a DSL provider says 3Mbit download speed,
> they are trying to make it look better than it really is.  They
> consider one Mbit = 1,000,000 bits instead of the proper 1 Mbit
> = 1024 Kbit = 1,048,576 bits. 

I am the OP.  In the case of newsreader downloads are there not going 
to also be certain types of compression at work?
Re: Approx conversion from bps to downloaded bytes
#163526
Author: Curt Welch
Date: Wed, 09 Mar 2005 20:48
126 lines
7636 bytes
"Sarge" <not@home.com> wrote:
> "MartinS" <me@my.place> wrote in message
> news:4228f6e9$0$88270$892e0abb@auth.newsreader.octanews.com...
> > Mozzy <dem_d@mail.com> wrote:
> >
> > > Is there an approximation I can use to convert a bps figure into
> > > actual bytes downloaded from a newsserver?
> > >
> > > I used to say for every 10 bits (baud?) that I would get 8 bits
> > > downloaded onto my hard drive (the other two being used for comms
> > > work) but I am not so sure that is a good rule of thumb.
> > >
> > > What approximations do other people use?
> > >
> > > Does it make a difference to how the approximation is calculated if
> > > the download is text or binary?
> >
> > 1 byte = 8 bits
> >
> > --
> > Martin S.
>
> On a serial stream such as DSL, every 8 bits also has a stop bit for the
> receiving UART.  So use 9 bits per byte in your calculation.  The bad
> part is when a DSL provider says 3Mbit download speed, they are trying to
> make it look better than it really is.  They consider one Mbit = 1,000,
> 000 bits instead of the proper 1 Mbit = 1024 Kbit = 1,048,576 bits.
>
> --Sarge

It's never been "proper" to call 1 Mbit 1,048,576 bits.

Bandwidth when quoted in bits per second has always been measured in powers
of 10.  It comes from a 40 year old tradition of how bandwidth has been
sold and measured in the telephone industry.  A T1 is 1.544 Mbits and has
been for 40 years.  Thats _exactly_ 1544000 bits per second because it's 24
channels at 8 bits per sample and 8000 samples per second plus one extra
bit per frame.  Or, (24*8 + 1) * 8000 which is 1544000 bits per second.

The same convention has been followed for all bandwidth quotes.  One Mbit
is 1,000,000 bits per second.  10 Mbit eithernet has a base frequency of
exacty 10,000,000 bits per second.  Same things for 100 Mbit eithernet and
1 Gbit eithernet.  It's all quoted in powers of 10.

Over all these high speed circuits, data bits are pushed with 8 bits per
byte.  These are syncronus circuits, not async.  There are no stop bits for
each byte like there are with slow async serial lines.  So the correct
conversion from bytes to bits is done by dividing by 8, not 9.

However, all data on the internet is sent as packets typically holding a
maximum of around 1500 bytes.  And though there are no wasted bits for each
byte, there are extra bits added to every packet.  Calculating the number
of bits wasted per packet is very complex and it all depends on which bytes
you are counting.

For example, if you are doing an article download from Usenet over the
internet, your newsreader might be showing you how fast the transfer is
going by couting the number of article bytes recieved.  Many newsreaders
(and other computer applications) will quite download speed in bytes per
second.  It it shows you downloading at 100 KBytes/sec, then it's only
counting data bytes, and it's probably using the computer file size
convention of 1 KByte = 1024 bytes per second.  To convert that to bits per
second, you just multiple by 8 and get 819200 bits per second.  But that
doesn't include the bandwidth wasted on the overhead bytes added to each
packet.

To start with, the TCP will add something like 24 bytes for each packet.
That includes data such as the source port, the destination port, the data
sequence number, a checksum, etc.

Then on top of that the IP protocol will add another 24 bytes.  That
includes stuff like the source IP address and the destination IP address,
header checksum, various flags, etc.

Then, the physical media will add more bytes and/or bits to each packet.  I
don't know what DSL does, but for ethernet, you have 64 preanble bits plus
48 bits for the destination adderss plus 48 bits for the source address bus
16 bits for the type field plus a 32 bit CRC plus 8 bits for the postable.
Thats an overhead of about 27 more bytes per packet.

A full size ethernet packet can hold only 1500 data bytes of payload data.
So that means a full size ethernet packet is 1500 + 27 or 1527 bytes or
12216 bits of data.

In that packet, there can only be something like 1500 - 24 - 24 = 1450
bytes of TCP data.  But I think the actual max is 1448 bytes.

Though IP can support larger frames, the internet is built on the ethernet
standard so the largest packets you find flying around most of the intener
are these 1448 sized data packets with about 48 bytes of TCP and IP
overhead + more for the physical medium.

So, if you have a 100 Mbit ethernet connection, it can push 100,000,000
bits per second max.  A packet with 1448 article bytes in it will have
about 24 + 24 + 27 bytes of TCP+IP+Ethernet overhead in them yealding
packets of 1523 bytes each going over the bandwidth.  So that's 100,000,000
/ 1523 * 1448 or 95 Mbits of article data bytes you can push over 100 Mbit
either net.  Divide by 8 to get 11.884 million article bytes.  Divide by
1024 twice to convert from bits to MBytes, and we end up with 11.3 MBytes
per second being the max you could push in a TCP stream over an 100 Mbit
ethernet connection.

So, if you start with 100 Mbits, and just divide by 9, you get 11.1 MBytes,
which is very close to the correct 11.3 Mbyte answer, but it has nothing to
do with 1 stop bit being added for each byte.  It's the 1000 vs 1024 bits
vs bytes convention for measuring bandwidth, plus the TCP and IP and
physical packet overhead which makes dividing by 9 a better rough estimate
than dividing by 8.

I don't know the physical packet overhead for DSL, but if that's the
bandwidth number you starting with, then dividning by 9 is probably a good
rough estimate in order to convert bandwidth measured in bits to download
speed in K or M bytes per second.  But it will only be a rough estimate
becuse of all the complexity of calculating actual overhead.

And, because of many complex performance issues, it's very hard to every
hit that maximum number in most real world applications.  So you should
expect to see less. Divide your bandwidth by 9 to get application bytes,
and take 80% of that to estimate what you can expect to actually see.  If
you transfer at around that rate, you can assume your machine is working
"normally".  Getting it to go faster will require a lot of tuning on both
sides of the transfer.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: Approx conversion from bps to downloaded bytes
#163527
Author: Sn!pe
Date: Wed, 09 Mar 2005 21:12
10 lines
2083 bytes
Curt Welch <curt@kcwc.com> wrote:

> It's never been "proper" to call 1 Mbit 1,048,576 bits.

[snip fascinating explanation]

It's apparent that you've had lots to do with the nuts and bolts of the
network, Curt; very interesting, thank you for that.
-- 
^Ï^    http://tinyurl.co.uk/2d2g
Re: Approx conversion from bps to downloaded bytes
#163554
Author: Curt Welch
Date: Thu, 10 Mar 2005 05:55
36 lines
2650 bytes
Mozzy <dem_d@mail.com> wrote:
> Is there an approximation I can use to convert a bps figure into
> actual bytes downloaded from a newsserver?
>
> I used to say for every 10 bits (baud?) that I would get 8 bits
> downloaded onto my hard drive (the other two being used for comms
> work) but I am not so sure that is a good rule of thumb.
>
> What approximations do other people use?
>
> Does it make a difference to how the approximation is calculated if
> the download is text or binary?

I already wrote a longer message today about this, but reading your
original message I wanted to point out one more thing.

For downloading usenet binary files, you must also factor in the
overhead of encoding if you are trying to calculate how much binaryu file
data you end up with on your hard drive after downloading and decoding.

If the file is uuencoded (the old Useent standard), then that adds a 40%
overhead to the article size.  That means the article is 40% larger than
the binary file so the data you end up with on your hard drive after
decoding is 1/1.4 or about 29% less than you would otherwise expect.  So,
for example, you have to download 140K of uuencoded article data to end up
with a 100K binary file.

If the article uses yEnc the the overhead is minimal and for rough
estimations can be ignored.

For text files there is (bascially) no encoding.  So if you downlad a 2K
text article and save it you end up with a 2K file on your disk.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: Approx conversion from bps to downloaded bytes
#163559
Author: Shmuel (Seymour J.) Metz
Date: Thu, 10 Mar 2005 15:57
19 lines
2127 bytes
In <20050309154826.338$3Q@newsreader.com>, on 03/09/2005
   at 08:48 PM, curt@kcwc.com (Curt Welch) said:

>Over all these high speed circuits, data bits are pushed with 8 bits
>per byte.  These are syncronus circuits, not async.  There are no
>stop bits for each byte like there are with slow async serial lines. 
>So the correct conversion from bytes to bits is done by dividing by
>8, not 9.

No bit stuffing or other encoding such as you have in, e.g., HDLC,
fibre channel?

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
Re: Approx conversion from bps to downloaded bytes
#163622
Author: Curt Welch
Date: Fri, 11 Mar 2005 19:05
29 lines
2779 bytes
"Shmuel (Seymour J.) Metz" <spamtrap@library.lspace.org.invalid> wrote:
> In <20050309154826.338$3Q@newsreader.com>, on 03/09/2005
>    at 08:48 PM, curt@kcwc.com (Curt Welch) said:
>
> >Over all these high speed circuits, data bits are pushed with 8 bits
> >per byte.  These are syncronus circuits, not async.  There are no
> >stop bits for each byte like there are with slow async serial lines.
> >So the correct conversion from bytes to bits is done by dividing by
> >8, not 9.
>
> No bit stuffing or other encoding such as you have in, e.g., HDLC,
> fibre channel?

Ah, good point.  I left that out.  It's normally small enough that I don't
even think about it.  Many high speed synchronous lines will use something
like HDLC framing as a way to mark the beginning of each packet.  It adds
even more hard to calculate overhead into the equation.  If you get 5
0-bits in a row, it will insert an extra 1-bit into the data stream.  I
don't even know how to calculate on average how many bits you expect to be
stuffed into a data stream which has a random mix of 1s and 0s.  But I just
wrote a program to try and determine it empirically and came up with about
1 stuffed but for each 62 data bits or an overhead of about 1.6%.

Now that I think about it, I guess you could calculate that value with a
Bayesian net to represent all possible sequences of digits.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: Approx conversion from bps to downloaded bytes
#163634
Author: Shmuel (Seymour J.) Metz
Date: Fri, 11 Mar 2005 22:42
21 lines
2256 bytes
In <20050311140512.397$D2@newsreader.com>, on 03/11/2005
   at 07:05 PM, curt@kcwc.com (Curt Welch) said:

>But I just wrote a program to try and determine it empirically and 
>came up with about 1 stuffed but for each 62 data bits or an 
>overhead of about 1.6%.

However, some schemes in use have higher[1] overhead, e.g., 2 extra
bits for each 8-bit byte. You need to know what encoding scheme is
used on the medium in question in order to know the overhead even
approximately.

[1] OTOH you don't have to worry about NRZ versus NRZI.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
Re: Approx conversion from bps to downloaded bytes
#192184
Author: Shmuel (Seymour J.) Metz
Date: Fri, 03 Nov 2006 17:35
19 lines
2275 bytes
In <20050309154826.338$3Q@newsreader.com>, on 03/09/2005
   at 08:48 PM, curt@kcwc.com (Curt Welch) said:

>It's never been "proper" to call 1 Mbit 1,048,576 bits.

For that matter, it's never been proper to misuse any of the SI units.
In the old days it was acceptable because people understood that you
were using an approximation. The k, m and g prefixes have always been
10^3, 10^6 and 10^9, not 2^10, 2^20 and 2^30. For the latter there are
(not so) new prefixes ki, mi and gi.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads