Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Iperf - megabytes and megabits

24 views
Skip to first unread message

karthikbalaguru

unread,
Dec 26, 2009, 5:10:07 AM12/26/09
to
Hi,
I wonder why Iperf uses 1024*1024 for megabytes
and 1000*1000 for megabits ?

I think,
It should follow either 1000 * 1000 (International
System of Units)convention or 1024 *1024 convention .

Any specific reason for such a methadology ?

Any ideas ?

Thx in advans,
Karthik Balaguru

Doug McIntyre

unread,
Dec 26, 2009, 10:08:18 AM12/26/09
to
karthikbalaguru <karthikb...@gmail.com> writes:
>I wonder why Iperf uses 1024*1024 for megabytes
>and 1000*1000 for megabits ?

I couldn't say for sure, but in general, when you are talking about
the speed of a line in kilobits per sec, megabits per sec, etc. Those
lines are all measured in units of 1,000 (ie. a 64kbps circuit is
64,000 bits per sec, a 3mbps line is 3,000,000 bits per sec).

Almost everyone still refers to a Metabyte as 1048576 bytes,
drive manufacturers and the mebibyte people withholding.

They probably are just going with the normal convention that most
people use.

Tony Hwang

unread,
Dec 26, 2009, 11:51:31 AM12/26/09
to
Hi,
Byte is originating from binary. When binary numbers are converted to
decimal that is what happens. Binary 111111111 > Octal 777 >512 decimal

Jeff Liebermann

unread,
Dec 26, 2009, 1:05:54 PM12/26/09
to
On Sat, 26 Dec 2009 02:10:07 -0800 (PST), karthikbalaguru
<karthikb...@gmail.com> wrote:

>Hi,
>I wonder why Iperf uses 1024*1024 for megabytes
>and 1000*1000 for megabits ?
>
>I think,
>It should follow either 1000 * 1000 (International
>System of Units)convention or 1024 *1024 convention .
>
>Any specific reason for such a methadology ?
>
>Any ideas ?

<http://www.soopertutorials.com/technology/networks/397-397.html>
One thing to note is that Iperf uses 1024*1024 for
Megabytes and 1000*1000 for Megabits.

<http://openmaniak.com/iperf.php>
Data formatting: (-f argument)

The -f argument can display the results in the desired format:
bits(b), bytes(B), kilobits(k), kilobytes(K), megabits(m),
megabytes(M), gigabits(g) or gigabytes(G).

Generally the bandwidth measures are displayed in bits (or
Kilobits, etc ...) and an amount of data is displayed in bytes
(or Kilobytes, etc ...).

As a reminder, 1 byte is equal to 8 bits and, in the computer
science world, 1 kilo is equal to 1024 (2^10).

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


--
Jeff Liebermann je...@cruzio.com
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558

alexd

unread,
Dec 26, 2009, 2:45:10 PM12/26/09
to
Meanwhile, at the alt.internet.wireless Job Justification Hearings,
karthikbalaguru chose the tried and tested strategy of:

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

> Any ideas ?

If it bothers you, you can always Use The Source, Karthikbalaguru :-)

On second thoughts, two different types of iperf floating around the
internet could lead to much confusion when trying to compare speed test
results.

--
<http://ale.cx/> (AIM:troffasky) (UnSoEs...@ale.cx)
19:41:52 up 28 days, 23:36, 5 users, load average: 0.00, 0.03, 0.47
DIMENSION-CONTROLLING FORT DOH HAS NOW BEEN DEMOLISHED,
AND TIME STARTED FLOWING REVERSELY

Jeff Liebermann

unread,
Dec 26, 2009, 5:42:22 PM12/26/09
to
On Sat, 26 Dec 2009 02:10:07 -0800 (PST), karthikbalaguru
<karthikb...@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.

Mark Moulding

unread,
Dec 26, 2009, 9:21:54 PM12/26/09
to

"Jeff Liebermann" <je...@cruzio.com> wrote in message
news:vqjcj55sc1ee5h2i2...@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


Bob

unread,
Dec 27, 2009, 6:24:29 AM12/27/09
to
On 26 Dec, 10:10, karthikbalaguru <karthikbalagur...@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.

Rich Webb

unread,
Dec 27, 2009, 6:55:31 AM12/27/09
to
On Sun, 27 Dec 2009 03:24:29 -0800 (PST), Bob
<bobcou...@googlemail.com> wrote:

>On 26 Dec, 10:10, karthikbalaguru <karthikbalagur...@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

karthikbalaguru

unread,
Dec 27, 2009, 7:30:10 AM12/27/09
to

Interesting point of view :-) :-)

Karthik Balaguru

ArarghMai...@not.at.arargh.com

unread,
Dec 27, 2009, 2:08:40 PM12/27/09
to
On Sun, 27 Dec 2009 06:55:31 -0500, Rich Webb
<bbe...@mapson.nozirev.ten> wrote:

<snip>


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

IMO, 'contend' should be 'believe'. :-)

And I think that the world would be a lot better off if most marketing
types (along with a few other groups) suffered the fate of "The
marketing division of the Sirius Cybernetics Corporation". :-)

<snip>
--
ArarghMail912 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.

karthikbalaguru

unread,
Dec 28, 2009, 10:08:24 AM12/28/09
to
On Dec 27, 3:24 am, Jeff Liebermann <je...@cruzio.com> wrote:

> On Sat, 26 Dec 2009 19:45:10 +0000, alexd <troffa...@hotmail.com>
> wrote:
>
> >On second thoughts, two different types of iperf floating around the
> >internet could lead to much confusion when trying to compare speed test
> >results.
>
> Well, since he's apparently benchmarking some device, it must mean he
> actually has something working.  There's hope, methinks, maybe.
>
> Perhaps it would be more appropriate to ask on the iPerf mailing list:
> <https://lists.sourceforge.net/lists/listinfo/iperf-users>
>
> Oh, he already posted a question and got a mostly wrong answer.  Oh
> well.
>

Okay, i posted it to iPerf mailing list.
Pls find the responses in the below link -
http://sourceforge.net/mailarchive/forum.php?thread_name=3e17ce20912270851g349ad1a7rfbdd76101f969b90%40mail.gmail.com&forum_name=iperf-users

> Pretend I didn't mention IEC 60027-2 A.2 which uses kibi, mebi, and
> gibi bytes.
> <http://members.optus.net/alexey/prefBin.xhtml>
> <http://physics.nist.gov/cuu/Units/binary.html>
>
> However, he wanted to know why iPerf did it both ways.  

Yes !

> The first
> version of iPerf was scribbled in May 2001.  The ISO released the
> binary prefix standards in 1998, which are generally ignored by the
> industry to this day.  Until the failure to use kibi, mebi, and gibi
> bytes is made an international crime punishable by being forced to
> read the entire standard from cover to cover, the choice of prefixes
> are those of the author.
>

Okay, this seems reasonable !
Maybe, if iPerf sticks to one convention, it would be better.

Karthik Balaguru

alexd

unread,
Dec 29, 2009, 4:48:52 AM12/29/09
to
Meanwhile, at the alt.internet.wireless Job Justification Hearings,
karthikbalaguru chose the tried and tested strategy of:

> Maybe, if iPerf sticks to one convention, it would be better.

I think it would be nice if it printed both types of output, to keep pedants
happy :-)

--
<http://ale.cx/> (AIM:troffasky) (UnSoEs...@ale.cx)

09:48:06 up 31 days, 13:43, 5 users, load average: 2.82, 1.06, 0.90

Nobody

unread,
Dec 29, 2009, 12:10:47 PM12/29/09
to
On Sun, 27 Dec 2009 03:24:29 -0800, Bob wrote:

> 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.

Except for floppy drives, where they split the difference and use
1024*1000-byte megabytes (e.g. 1.44MB = 1440 * 1024 bytes).

do...@99.usenet.us.com

unread,
Jan 1, 2010, 5:55:57 PM1/1/10
to
In alt.internet.wireless Jeff Liebermann <je...@cruzio.com> wrote:
> For some entertainment value, try TTCP:
> <http://www.pcausa.com/Utilities/pcattcp.htm>
> and see how the results compare.

One of my customers used something called BRICKS, a GUI thing that was
proprietary to some networking company.

It defaulted to UDP, leading to some performance numbers that the customer
wanted to see matched by the production data which was running TCP.

--
Clarence A Dold - Hidden Valley Lake, CA, USA GPS: 38.8,-122.5

0 new messages