Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Use of MB vs MiB, GB vs GiB, TB vs TiB etc

    Scheduled Pinned Locked Moved 2.3-RC Snapshot Feedback and Issues - ARCHIVED
    9 Posts 7 Posters 4.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      phil.davis
      last edited by

      Ref: https://forum.pfsense.org/index.php?topic=106470.0 where we start reporting TB.

      Ref: https://en.wikipedia.org/wiki/Petabyte and table of "standard" abbreviations.

      The metric system has kB MB GB TB … for 10^3 10^6 10^9 10^12 ...

      JEDEC (somewhat unfortunately) allows KB MB GB for 1024 1024^2 1024^3

      IEC uses KiB MiB GiB TiB ... for 1024 1024^2 1024^3 1024^4...

      Should we switch to KiB MiB GiB TiB ... in the places where the calculation is being done in powers of 1024?

      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

      1 Reply Last reply Reply Quote 0
      • N
        NOYB
        last edited by

        I've always used upper/lower case to designate multiplier of 1000 vs. 1024, and bits vs. bytes.

        k = 1000^1
        m = 1000^2
        g = 1000^3
        t = 1000^4

        K = 1024^1
        M = 1024^2
        G = 1024^3
        T = 1024^4

        b = bits
        B = bytes

        So for example.
        n KBps = n x 1024^1 bytes per second.
        n MBps = n x 1024^2 bytes per second.
        n GBps = n x 1024^3 bytes per second.
        n TBps = n x 1024^4 bytes per second.

        n kbps = n x 1000^1 bits per second.
        n mbps = n x 1000^2 bits per second.
        n gbps = n x 1000^3 bits per second.
        n tbps = n x 1000^4 bits per second.

        1 Reply Last reply Reply Quote 0
        • ExolonE
          Exolon
          last edited by

          @Phil, IMHO a better Wiki article is the definition for Gigabyte (Consumer Confusion):

          https://en.wikipedia.org/wiki/Gigabyte#Consumer_confusion

          1 Reply Last reply Reply Quote 0
          • R
            robi
            last edited by

            @NOYB:

            I've always used upper/lower case to designate multiplier of 1000 vs. 1024, and bits vs. bytes.

            k = 1000^1
            m = 1000^2
            g = 1000^3
            t = 1000^4

            K = 1024^1
            M = 1024^2
            G = 1024^3
            T = 1024^4

            b = bits
            B = bytes

            So for example.
            n KBps = n x 1024^1 bytes per second.
            n MBps = n x 1024^2 bytes per second.
            n GBps = n x 1024^3 bytes per second.
            n TBps = n x 1024^4 bytes per second.

            n kbps = n x 1000^1 bits per second.
            n mbps = n x 1000^2 bits per second.
            n gbps = n x 1000^3 bits per second.
            n tbps = n x 1000^4 bits per second.

            Fully agree.
            No reason for that 'i' in between. Looks dull also.

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              I don't have a strong preference here either way. Though I will say that when I see, for example "MB" I don't assume one way or the other, though when I see MiB I can safely assume it's 1024.

              I'm much more pedantic about B=byte and b=bit

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • P
                phil.davis
                last edited by

                Steve B merge PR https://github.com/pfsense/pfsense/pull/2605 so I guess at least he liked the MiB.

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • H
                  Harvy66
                  last edited by

                  Since we're being pedantic about MB vs MiB, I think we also need a way to indicate what size of "byte". Since people get confused about MB, surely they realize the definition of "byte" varies on context, especially in networking. /sarc

                  I would vote for using the "proper" abbreviation if only to reduce the confusion for laypersons and it's much harder to typo a missing "i" than "B" vs "b".

                  edit: MiO  MebiOctet. We should use that.

                  1 Reply Last reply Reply Quote 0
                  • M
                    M_Devil
                    last edited by

                    Found system->Advanced->Miscellaneous, section "RAM Disk Settings (Reboot to Apply Changes)"

                    Sizes are in MB and not like above abbreviation.

                    1 Reply Last reply Reply Quote 0
                    • P
                      phil.davis
                      last edited by

                      @M_Devil:

                      Found system->Advanced->Miscellaneous, section "RAM Disk Settings (Reboot to Apply Changes)"

                      Sizes are in MB and not like above abbreviation.

                      Pull request https://github.com/pfsense/pfsense/pull/2696

                      From what I can see, you are right. The underlying FreeBSD mdmfs utility creates a 40 MiB memory disk when -s 40m is specified.

                      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.