# 1 PetaByte (binary) should be
echo "scale=10; 1024*1024*1024"|bc
# 1073741824 MegaBytes

the “original” ChatGPT get’s confused and mixes binary and decimal (as can be seen from the question, it’s clearly about BYTES = multiples of 8 Bits, not Bits, where 1kBit = 1000 Bit?, but 1024 Bits = 1kByte)

Bits as MBits/s is USUALLY used for MARKETING purposes only but has no significant value for measuring speeds

for example this LTO drive has a  “Native data transfer rate: 140 MBps” / 8 = which is only 17.5MBytes sec = MBYTES per SECOND which is WAY MORE USEFUL IN CALCULATIONS but it’s of COURSE not a good marketing number because it’s really not a very high number hence tape is unfortunately really not that fast X-D

what would the user rather buy: a drive that can do 140 MBps or a drive that can do 17.5MBytes/s? (it’s the same X-D)

so if this user is not mistaken, it would take:

  • echo “scale=10; 1024*1024*1024/(17.5*60*60*24*365)”|bc
    1.945 years to write 1 BetaByte with 17.5MByte/s to LTO5 tape
  • if a tape drive could do echo 128 MBytes/sec writing (*8 = 1024MBits/s)
    • echo “scale=10; 1024*1024*1024/(128*60*60*24*30)”|bc = 3.23 months
    • so obviously the backup would have to be split over multiple tapes that are written (backup) or read (restore) simultaneously to acchieve faster restore speeds
  • let’s assume that a user has a massive RAID10 with 120x Seagate Exos X18 18TB (wow it seems to do beyond 200MBytes/s read and write per disk!)
    • high end 2x socket server boards like Gigabyte Mainboard MZ73-LM0 REV 3.0 AMD feature 4x PCIe
    • so every PCIe could take a SATA or SAS controller HBA (so 30 harddisks would have pair to 15x RAID1 sets and RAID0 combine to 1xRAID10 set, giving a theoretical throughput of 200MBytes/s * 15 = 3000 MBytes/s read and write)
    • which could transfer 1PetaByte in
      • echo “scale=10; (1024*1024*1024/3000)/60/60/24″|bc = 4.142 days, pretty good eh?

alternatively, but most server boards are not there yet: massive NVMe RAID10 sets, which could push PCIe to it’s limit (while getting pretty hot!)

  • recent 2TB NVMe
    • currently (2025-04) at costs of echo “scale=10; 1024*2/124.99″|bc = 16.385 bucks per 1TByte
    • so echo “scale=10; 1024*2/124.99*1024″|bc = 16778.558 bucks for 1PetaByte of all-flash-storage (just the media)
  • recent 4TB NVMe
    • currently (2025-04) at costs of echo “scale=10; (1024*4)/212.49″|bc = 19.276 bucks per 1TByte
    • so echo “scale=10; 1024*4/212.49*1024″|bc = 19738.830 =  bucks for 1PetaByte of all-flash-storage (just the media)

ps: math is strange

in school was taught that no matter in what order * and / are run, it should output the same result, well apparently it does not.

apt install bc
bc
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
echo "scale=10; 212.49/1024*4"|bc
.8300390624
echo "scale=10; 212.49/(1024*4)"|bc
.0518774414
echo "scale=10; (212.49/1024*4)"|bc
.8300390624
echo "scale=10; (212.49/1024)*4"|bc
.8300390624

# warning 0.8300390624 is clearly not 0.0518774414
# how to build this bc version from src
su - root
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers 
apt install build-essential module-assistant gcc make perl dkms linux-headers-$(uname -r)
# log off root Ctrl+D
cd bc
./configure
make
sudo make install

bc --version
bc 7.0.3
Copyright (c) 2018-2025 Gavin D. Howard and contributors
Report bugs at: https://git.gavinhoward.com/gavin/bc

This is free software with ABSOLUTELY NO WARRANTY.

# same same
echo "scale=10; 212.49/1024*4"|bc
.8300390624
echo "scale=10; 212.49/(1024*4)"|bc
.0518774414
echo "scale=10; (212.49/1024*4)"|bc
.8300390624
echo "scale=10; (212.49/1024)*4"|bc
.8300390624

Links:

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin