r/talesfromtechsupport • • Nov 23 '20

Long Bits & Bytes

I was working on a transcription project where data was being replicated from one city to the other and because of the high change rate, it had to be done asynchronously. Raw data would come in at the primary site, get processed, and was returned to the end client for their use. My client didn’t want to replicate the processed data, just the raw, since it could be redone at any time and was considered more critical than the final product.

The problem was they had to use uncompressed audio files in order for the software to be able to make the best transcription, which were freaking huge in comparison to the final document files. They wanted them kept in case a transcript was wrong to compare them against.

This is probably going to give away what I was working on, but it’s critical to the story. Data at site A and was snapshotted from a primary disk to a secondary, then sent over Ma Bell to site B. Once at site B, it landed on a mirror of the site A secondary disk until the packets were complete, then snapshotted to a primary disk at site B. It wasn’t a single disk doing this, dozens were constantly being written to and copied over the wire to the other site all the time. This is a really simplistic way of describing it, but I’m avoiding using the exact verbiage so I don’t give them away.

Anyway, I was asked to come in and implement my “product” using a new procedure that hadn’t yet gotten a formal support write up yet. This was a one-off that later I found had been grudgingly given approval for and if it worked, it would be worked up into something “real.” Everything was set up and when it was turned on, we were shocked at how much data was being sent over the wire and how far “out of track” it was. Data was being BLASTED down the wire, almost saturating it although the client insisted the data change rate was correctly sized for the line.

I ended up in a major northeastern city during a snowstorm so I could be at the site B datacenter to complete the switchover from catch-up to asynchronous mode. I couldn’t physically get to the site because of the snow, so I hooked up my Motorola Razr to my laptop and dialed into the machine from my hotel room. I knew the data flow slacked off at 11:30p – midnight, so I sat and watched as it slowly dropped lower and lower towards the 10,000 track threshold where I could switch to async.

15,000… 14,000… 13,000… 12,000… 11,000… 10,900… 10,950... Wait, what? 11,000… 12,000… 13,000…

The window started at about 11:35 and lasted a whole 10 minutes before climbing back up. Just for giggles, I tried issuing the command anyway but it failed. So, I copied my logs and put them in an email to everyone concerned and asked, “What now?” Well, what now was the client flipping out and calling us incompetent, demanding to know why I couldn’t make it happen.

I’d been putting in 12-16+ hour days on this, working overnight and weekends, traveling back and forth to site B to get it done. My boss said, “Hang on, Joe’s been putting in a lot of time on this, so let’s get a second opinion,” and a national SME was brought in to analyze everything and do a root cause analysis. He’s also a good friend too, but I knew he would tell the absolute truth in this, no matter who was to blame.

The RCA call started out with him going over everything, explaining that he’d analyzed the nominal data traffic, adding in the new traffic, and explaining how it all worked together. His part went something like this:

“After sampling the data flow at both ends, the system, with acks is sending bidirectionally about 38.5 megabits per second, which works out to be a little over 4.8 megabytes per second, using all the capacity of the wire.”

(The lightbulb was coming on in my head at this.)

“So what?” The client PM exploded, “We’ve got a 45-megabyte circuit!”

“No, you don’t.”

“Yes, we do!”

“No, you have a DS3 circuit, which is 45 megaBITS. That’s 5.65 megaBYTEs per second at maximum transfer rate. 0.8 megaBYTES isn’t enough to allow the normal data traffic between sites without the new system. It’s simply not big enough.”

I never heard the man utter another word and I never heard from him again.

I’d had enough and asked my boss to move me off the project, which he gladly did. Last I heard they’d upped the bandwidth between the sites and it was working fine.

The moral of the story is, do the math, know what a bit is and know what a byte is.

960 Upvotes

144 comments sorted by

View all comments

121

u/DasFrebier Nov 23 '20

Probaly everyone stumbles over that problem at some point

Hell I was kinda shocked when i learned that data rates advertised by whatever ISP are given in bits/s not bytes, fucking useless if you ask me

68

u/twowheeledfun Nov 23 '20

I thought network speeds were usually given in bits/second by default.

38

u/DasFrebier Nov 23 '20

May very well be the case, doesnt mean its the most practical option

45

u/NotYourNanny Nov 23 '20

It's done that way largely because it always has been.

(Not everything has been eight bit bytes from the beginning.)

19

u/badtux99 Nov 23 '20

Indeed, I used the early ARPANET on a machine that had 9 bit bytes.

21

u/TheThiefMaster 8086+8087 640k VGA + HDD! Nov 23 '20

Which was fun when a lot of early networking was done with 7 bit text

21

u/badtux99 Nov 24 '20

The thing about 9 bit bytes was that 18 bit words could address a massive 256 kilobytes of memory. Gasp! Whereas 16 bit words could only address 64 kilobytes of memory.

Of course, once you arrived at 32 bit vs 36 bit words, that distinction no longer made any difference because nobody would ever need more than the massive 4 gigabytes of memory addressable with 32 bit words, right? ;)

9

u/ComputerMystic Nov 24 '20

cries in Crysis, Minecraft, dorf fort, Electron-based apps, and any modern GUI / Web Browser

→ More replies (4)
→ More replies (4)
→ More replies (1)
→ More replies (6)

8

u/created4this Nov 24 '20

Nothing is eight bit bytes now either, there’s a load of layer1 shit like checksums and error correcting that use up bits in your data stream but you never see

→ More replies (4)
→ More replies (1)

40

u/mrlazyboy Nov 23 '20

Also when it comes to storage - you buy a "1 TB" drive and you only end up with 931 GB of actual storage. What happened to the rest?

That's what happens when you go between base 2 and base 10 :)

13

u/DasFrebier Nov 23 '20

Actually, how does the math work out there? never looked into closer

47

u/Muffinsandbacon Nov 23 '20

1TB in base 10 is 1,000,000,000,000 bytes. 1TB in base 2 is 1,099,511,627,776 bytes. What happens is you’re sold a drive in base 10 but it’s measured in base 2, so there’s where the discrepancy comes from. It’s a bit more technical than that but there’s the ELI5 version.

→ More replies (2)

51

u/Alias_This_Is Nov 23 '20

Disks are sold with the capacity advertised IF they could be formatted in base 10. Unfortunately, in all modern computers the unit of measure isn't base 10, it's base 8. Kilo/Mega/Giga/Terabytes are multiples of 1024 (8x128).

All this goes WAY back to the original computers and the different standards of how long a “word” was, 2, 4, or 8 bits. ASCII started out at 7 bits, but soon standardized on 8, probably because (as a friend puts it) “it’s all ones and zeros”, so you gotta have something divisible by 2. Even Morse code is kinda like this, the shortest letter is 1 “bit” and the longest is 4 “bits”, all numbers are 5 “bits”.

I cannot count the number of times I’ve had to do basic math with a client, they just don’t get that a phone line has a maximum capacity and they’re exceeding it. I’ve also had to explain to them why the line can’t go above a certain speed. Light speed.

“The ping is replying as fast as possible, they’re about 100 miles away, so 1-2ms is extremely good.”

“I want you to make it faster.”

“I can’t.”

“Then we’ll hire some who can.”

“He better be a Scotsman named Montgomery and has some crystals.”

“Why?”

“Because you’re asking to go faster than the speed of light, Einstein said a hundred years ago 185,000 mps is as fast as you can go in this universe. You’re going to need Scotty and some dilithium crystals to go faster.”

“Huh?”

…

FYI. A ping speed of 1ms over a data line encounters about 185,000 miles of wire or resistance, so 92.5 miles there and back is lightspeed. No, this is most definitely NOT exactly correct, it’s to educate how fast a ping packet is theoretically moving through a network.

I have had clients complain of the ping speed over a dark fiber network. The math worked out to it was moving as fast as possible over the distance because of, you guessed it, lightspeed.

34

u/Captain_Hammertoe Nov 23 '20

You said it yourself... it was a DARK fiber network. Sure, the speed of light is limited, but we all know the speed of dark doesn't play by lightspeed's sissy rules and limitations.

→ More replies (1)

30

u/NeoHummel Nov 24 '20

And this math is the crux of the 500 mile email story, it's definitely worth a read if you've never seen it.

→ More replies (1)

17

u/DasFrebier Nov 23 '20

Ah yes, breaking the laws of physics of entirely arbitray requirements, especially if a customer will never even notice the difference betwenn 2ms and 20ms

7

u/[deleted] Nov 24 '20

Typical fiber (also typical twisted pair) has propagation speed 60-70% of speed of light. 100 miles theoretical roundtrip would be about 1.5 millisecond over such medium.

→ More replies (3)

15

u/The_Kraken_ Nov 23 '20

The industry-used abbreviations here are actually useful. The main difference is adding an 'i' between the letters of the abbreviation to indicate you're in base 2 vs. base 10.

MB = Megabyte (1,000,000 bytes 106)
MiB = Mebibyle (1,048,576 bytes 220)

GB = Gigabyte (1,000,000,000 bytes)
GiB = Gibibytes (1,073,741,824 bytes)

... etc.

As always, Wikipedia has a great chart explaining it all

20

u/mrlazyboy Nov 23 '20

Keep in mind that the hard drive manufacturers are using the accurate description of the terms–the prefix giga, for instance, means a power of 1000, whereas the correct term for powers of 1024 is gibibyte, though it isn’t often used. Unfortunately, Windows has always calculated hard drives as powers of 1024 while hard drive manufacturers use powers of 1000.

8

u/J3D1M4573R Nov 23 '20 edited Nov 25 '20

the 'advertised' 1TB is actually 1,000,000,000,000 B. Unlike the common base 10 conversions we all know ( 1K = 1,000 1M = 1,000 K 1G = 1,000 M) computers actually use base 2, which has the closest equivalent of 1,024 ( 1K = 1,024 1M = 1,024K etc...)

So, 1,000,000,000,000 B / 1,024 = 976,562,500 KB

976,562,500 KB / 1,024 = 953,674.32 MB

953,674.32 MB / 1,024 = 931.32 GB.

→ More replies (1)

13

u/BlackStar4 Nov 23 '20

Storage is advertised in gigabytes, which are base 10, Windows measures in gibibytes, which are base 2 ( 1 gibibyte=1024 mebibytes, 1 gigabyte=1000 megabytes). If you ask Google how many gibibytes are in 1000 gigabytes it comes out to 931 and a bit.

→ More replies (3)
→ More replies (1)
→ More replies (3)

14

u/SeanBZA Nov 23 '20

They also are very likely to advertise the speed of the maximum rate of the circuit, and you never will get this as that is a shared connection, and the only time you get this is if you are the only active subscriber on that network segment, with no other connections active by any other user, and their equipment is either disconnected or turned off.

→ More replies (1)

18

u/SosseTurner Nov 23 '20

but better for marketing, 100 is higher than 12.5, right?

23

u/DasFrebier Nov 23 '20

Also pisses me the fuck off with phone batteries, just tell me its 4Ah, not 4000mAh im not a fucking lobotomised snail

8

u/AdminYak846 Nov 23 '20

It's because nobody knows the units used unless you look it up. 4000 > 4 so that must mean the battery can last longer, etc.

Even though it's the same value just in different units.

→ More replies (1)
→ More replies (3)
→ More replies (1)
→ More replies (5)