From: Jeff Liebermann on
On Sat, 26 Dec 2009 02:10:07 -0800 (PST), karthikbalaguru
<karthikbalaguru79(a)gmail.com> wrote:

>I wonder why Iperf uses 1024*1024 for megabytes
>and 1000*1000 for megabits ?

For some entertainment value, try TTCP:
<http://www.pcausa.com/Utilities/pcattcp.htm>
and see how the results compare.

--
Jeff Liebermann jeffl(a)cruzio.com
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558
From: Mark Moulding on

"Jeff Liebermann" <jeffl(a)cruzio.com> wrote in message
news:vqjcj55sc1ee5h2i29d8cbfe6vg7is35mi(a)4ax.com...

> For example: 100'000'000 bytes is not equal to 100 Mbytes but
> to 100'000'000/1024/1024 = 95.37 Mbytes.

Really? I always thought that (in digital-land) since 1 Kbyte = 1024 bytes,
a Mbyte is 1024*1024 = 1,048,576 bytes. And a Gbyte = 1024 (1k) mBytes =
1024^3 = 1,073,741,824 bytes. In other words, "digital" SI prefixes are a
little bit larger than "engineering" ones, and conveniently follow
power-of-two groupings (kilo=2^10, mega=2^20, giga=2^30, tera=2^40).
Wikipedia seems to agree (http://en.wikipedia.org/wiki/Binary_prefix), and
further informs me that the NIST has created a new set of prefixes that
follow this new digital meaning: "kibi" (for "kilobinary"), "mebi", etc.
--
Mark Moulding


From: Bob on
On 26 Dec, 10:10, karthikbalaguru <karthikbalagur...(a)gmail.com> wrote:
> I wonder why Iperf uses 1024*1024 for megabytes
> and 1000*1000 for megabits ?

The real reason for this difference, which for some reason is rarely
given, is because of address decoding. If you have a RAM chip, the
memory cells are addressed by a binary address, so this leads
naturally to blocks of memory that are powers of 2. One could design
RAM chips with 1000 byte blocks say, but it makes the address decoding
unnecessarily complex. Binary addressing is the most efficient method.

For disk drives the magnetic recording medium is linear, so the block
size and cylinder/head/sector addressing can be arbitrary and not
based on powers of 2. For convenience, the sector size is chosen to be
a power of 2 to match how memory is arranged. Whether the overall
storage size of a disk is quoted in SI or K is down to preference, but
the manufacturers prefer the standard SI units.

For communications, the bit rate is determined by a clock, which is
also somewhat arbitrary and doesn't need to be based on powers of 2.
Therefore it is natural to use the standard SI units.

So in general, SI units are the preferred units. For directly
addressed RAM chips (or ROM, Flash etc) a binary unit reflects the
underlying layout, and gives an integral value. For storage media like
disks, it's a gray area, and usage depends on choice. For
communications and bit rates, SI units are normally used. In all
cases, I recommend to use the IEEE binary prefixes (KiB, MiB etc)
where appropriate to make it clear which unit is being used.
From: Rich Webb on
On Sun, 27 Dec 2009 03:24:29 -0800 (PST), Bob
<bobcousins42(a)googlemail.com> wrote:

>On 26 Dec, 10:10, karthikbalaguru <karthikbalagur...(a)gmail.com> wrote:
>> I wonder why Iperf uses 1024*1024 for megabytes
>> and 1000*1000 for megabits ?
>
[snippety snip]
>So in general, SI units are the preferred units. For directly
>addressed RAM chips (or ROM, Flash etc) a binary unit reflects the
>underlying layout, and gives an integral value. For storage media like
>disks, it's a gray area, and usage depends on choice.

The more cynical among us may contend that usage depends on marketing.

Since, for a given quantity, an SI enumerated size is "bigger" than the
equivalent binary size, which sells more? A 500 SI-gigabyte drive or a
466 binary-gigabyte drive? Or even a 480 binary-gigabyte? Who looks at
the fine print?

Some of us <cough> are old enough to remember when 64 Kbyte machines
were the top of the line. Naturally, some advertising copy referred to
*their* machines as "65 Kbytes!" and a few even noted that 65,536
conventionally rounds to "66 Kbytes" and, yes, advertised them that way.

--
Rich Webb Norfolk, VA
From: karthikbalaguru on
On Dec 27, 4:55 pm, Rich Webb <bbew...(a)mapson.nozirev.ten> wrote:
> On Sun, 27 Dec 2009 03:24:29 -0800 (PST), Bob
>
>
>
> <bobcousin...(a)googlemail.com> wrote:
> >On 26 Dec, 10:10, karthikbalaguru <karthikbalagur...(a)gmail.com> wrote:
> >> I wonder why Iperf uses 1024*1024 for megabytes
> >> and 1000*1000 for megabits ?
>
> [snippety snip]
> >So in general, SI units are the preferred units. For directly
> >addressed RAM chips (or ROM, Flash etc) a binary unit reflects the
> >underlying layout, and gives an integral value. For storage media like
> >disks, it's a gray area, and usage depends on choice.
>
> The more cynical among us may contend that usage depends on marketing.
>
> Since, for a given quantity, an SI enumerated size is "bigger" than the
> equivalent binary size, which sells more? A 500 SI-gigabyte drive or a
> 466 binary-gigabyte drive? Or even a 480 binary-gigabyte? Who looks at
> the fine print?
>
> Some of us <cough> are old enough to remember when 64 Kbyte machines
> were the top of the line. Naturally, some advertising copy referred to
> *their* machines as "65 Kbytes!" and a few even noted that 65,536
> conventionally rounds to "66 Kbytes" and, yes, advertised them that way.
>

Interesting point of view :-) :-)

Karthik Balaguru