Author Topic: Why Does A Cable Modem Take So Long To Boot?  (Read 2454 times)

0 Members and 2 Guests are viewing this topic.

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2400
  • Country: de
Why Does A Cable Modem Take So Long To Boot?
« on: September 18, 2019, 05:46:53 pm »
I'm old enough to remember the days of 56K modems, in fact I can still remember the startup tones and how long they took to get online. Thirty seconds or so to dial, do the handshake, a bit of DHCP for your IP address and you're done.

Fast forward to 2019 and my cable modem takes over four minutes from a cold start until I can access the browser home page. Various lights flash and it looks very impressive but what the hell is it doing for four and a half minutes?

Note that this isn't a comms problem. We get the 150Mb that we pay for (Internet speed measuring sites have confirmed this) and once I'm actually online pages load fast and downloads are quick.

I just wish I didn't have to wait nearly five minutes when we get home before we can get online.
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9322
  • Country: 00
  • Display aficionado
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #1 on: September 18, 2019, 05:54:29 pm »
Why do you turn your cable modem off in the first place?
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 2605
  • Country: es
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #2 on: September 18, 2019, 06:34:21 pm »
I'm old enough to remember the days of 56K modems, in fact I can still remember the startup tones ...

You know, I remember them well and I could swear I can hear those same tones very faintly when my computer is connecting to the WIFI.

I do not know why exactly your connection needs so long to establish the connection but I can imagine there is much more involved when connecting via cable. Maybe other customers need to be moved around. I would just leave the thing connected permanently.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 5621
  • Country: gb
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #3 on: September 18, 2019, 07:44:10 pm »
I'm old enough to remember the days of 56K modems...

Pah, sheer luxury! My first dial-up modem for my work home terminal was 1200 baud. Mind you, that was direct to a VAX cluster - no internet in those days, we had DECnet.  :P


EDIT: 
« Last Edit: September 18, 2019, 08:00:09 pm by Gyro »
Chris

"Victor Meldrew, the Crimson Avenger!"
 
The following users thanked this post: GregDunn

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 1878
  • Country: be
    • Freelance Hardware Engineer
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #4 on: September 18, 2019, 08:10:39 pm »
Booting a complete Linux OS mostly.
 
 
The following users thanked this post: amyk, Kilrah

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: us
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #5 on: September 18, 2019, 09:00:46 pm »
Mine gets firmware from the cable company. I don’t know if that is every time, or if there’s a check and validate every time, but it’s long.

That said, it happens a couple times a year, so I’ve never cared.
 

Offline NANDBlog

  • Super Contributor
  • ***
  • Posts: 4649
  • Country: nl
  • Current job: ATEX certified product design
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #6 on: September 18, 2019, 09:14:27 pm »
"Uncompressing Linux... done, booting the kernel"
And depending on the technology, the speed negotiation of the cable. The ISP expects you to have the modem on 24/7
 
The following users thanked this post: Kilrah

Offline soldar

  • Super Contributor
  • ***
  • Posts: 2605
  • Country: es
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #7 on: September 18, 2019, 09:24:07 pm »
Pah, sheer luxury! My first dial-up modem for my work home terminal was 1200 baud. Mind you, that was direct to a VAX cluster - no internet in those days, we had DECnet.  :P

When I started working, in the 70s, companies would aspire to get Telex service and, indeed, those were the golden years of Telex.

In the 80s I got several computer like the Commodore PET but they did not have any modem.

I started around 1987 with a Tandy 200 which incorporated a 300 baud modem with which I could connect to Compuserve and send messages through the Telex system.

That Tandy 200 was a neat little machine. It ran MS-DOS, Word and Multiplan (precursor of Excel) directly from ROM and had no hard disk, only floppy.

In the early 90s I saw modem speeds go up fast. First it was 1200, then 2400 and soon all the way up to the 56K limit.

We were selling 1200 / 2400 baud modems to big companies like airlines. They were very expensive and included installation in the price. Companies were using concentrators so that several machines could share one transatlantic modem.

When 1200/2400 became home consumer products, in the 90s, every Saturday, from Washington DC, I would call my friend in Madrid and we would exchange messages at a speed where you could see the characters as they appeared on the screen. This saved a long call.  I believe for work I was still using Compuserve to access the Telex network.

After the 56K limit was reached came ADSL and I was still working in that field. A few years ago, as fiber was replacing DSL I retired.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 5621
  • Country: gb
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #8 on: September 18, 2019, 09:58:53 pm »
When I started working, in the 70s, companies would aspire to get Telex service and, indeed, those were the golden years of Telex.

Hey, my first job was designing part of an office based Telex management system! - a central 3U rack based routing system and message store, connected to a bunch of 'terminals' with ascii keyboards (it even handled the baudot letter and figure shifts!) and single line scrolling Sperry panaplex displays.
« Last Edit: September 18, 2019, 10:02:59 pm by Gyro »
Chris

"Victor Meldrew, the Crimson Avenger!"
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 6419
  • Country: gb
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #9 on: September 18, 2019, 11:43:49 pm »
Booting a complete Linux OS mostly.

'complete'...

Even on an embedded device there's no reason that needs to take more than 30 seconds.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 12055
  • Country: us
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #10 on: September 19, 2019, 04:15:35 am »
Well quite a lot of them do. Chalk it up to cost I suppose, or lazy development, at a former job we made DVRs which also contained a cable modem, they were broadcom based devices that ran Linux. Most of them would take 5+ minutes to boot, they did all sorts of stuff along the way, boot time was never something we really cared about because they had to be on 24/7 to be useful anyway.
 

Offline rrinker

  • Super Contributor
  • ***
  • Posts: 2033
  • Country: us
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #11 on: September 19, 2019, 04:38:12 pm »
 My first modem was 300 baud, and it wasn't even auto-dial/auto answer, i had to pick up the phone and call the number, then flip the switch on the modem. And it took forver to dial - in those days it was like an extra $1/mo on the phone bill to have touch tone, and my Mom was too cheap for that, so we had rotary dialing only. A benefit was, if you were good at it, you could dial numbers just by flipping the switch hook.

On my cable modem, you can access the device fairly quickly in the boot process, so I can log in and see it negotiate the rest of the connection. Most of the time seems spent connecting each subsequent upstream and downstream channel, one by one. Rarely happens though, mine is on 24/7. Not sure why you would turn it off.
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 1652
  • Country: us
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #12 on: September 19, 2019, 10:52:11 pm »
Once the OS is booted, the RF can take a while to come up.  The modem might have to search a large frequency space for a DOCSIS downstream carrier, and once found, perform a process called "ranging" where the modem starts transmitting at low power during specific ranging opportunity slots, while incrementally increasing power until the headend can hear it.  Once the headend hears it, exact timing and power levels are set in another set of exchanges, the modem is authenticated, and then finally configured with and IP address and other provisioning information.

The modem could also be told to go to a different freqeuncy and then ranging could start all over.

It's also slow on purpose with random timers triggering the various states so that the system doesn't collapse if the headend reboots and thousands of modems are in contention to get back on line.

There's a nice summary of the RF startup process in the "DOCSIS 3.0 MAC and Upper Layer Protocols Interface Specification", section 5.2.5.1:

  https://specification-search.cablelabs.com/CM-SP-MULPIv3.0

Plus all the gory details if you want to read the whole document.
 
The following users thanked this post: edavid, Kilrah, TomS_, aix

Offline NANDBlog

  • Super Contributor
  • ***
  • Posts: 4649
  • Country: nl
  • Current job: ATEX certified product design
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #13 on: September 19, 2019, 10:58:55 pm »
Booting a complete Linux OS mostly.

'complete'...

Even on an embedded device there's no reason that needs to take more than 30 seconds.
I have a dev board, with windows embedded, that boots up in 2 seconds to desktop. And it plays video for example and has everything you want from an embedded computer.
You need to see both side of the picture to know how much bloatware is linux really is nowadays.
 

Offline blueskull

  • Supporter
  • ****
  • Posts: 13759
  • Country: cn
  • Power Electronics Guy
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #14 on: September 19, 2019, 11:03:55 pm »
I have a dev board, with windows embedded, that boots up in 2 seconds to desktop. And it plays video for example and has everything you want from an embedded computer.
You need to see both side of the picture to know how much bloatware is linux really is nowadays.

Yes. And without falcon mode, prebooting (Uboot can kernel uncompressing) itself can take more than 2s.
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 6419
  • Country: gb
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #15 on: September 19, 2019, 11:05:31 pm »
Booting a complete Linux OS mostly.

'complete'...

Even on an embedded device there's no reason that needs to take more than 30 seconds.
I have a dev board, with windows embedded, that boots up in 2 seconds to desktop. And it plays video for example and has everything you want from an embedded computer.
You need to see both side of the picture to know how much bloatware is linux really is nowadays.

Err, and that runs on a ~400MHz MIPS with NOR flash connected via slow SPI?
 

Online Whales

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
    • Halestrom
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #16 on: September 19, 2019, 11:11:02 pm »
I have some experience here.  I used to delve a lot into consumer routers via the UARTs and see what I could do with them, including takeovers and repurposing.  It's fun trying to sneak external binaries into embedded mips linux environments and run them.  I swear I have never left any silly cat jpegs hiding in flash filesystems in locations where a hardware "reset" does not wipe them.

Things I recall seeing a lot of:
  • Boot scripts/environments built inside of older boot/scripts environments built on older ones (possibly from other vendors).  All hacked together, lots of errors getting spat out for every (normal) boot.
  • Hardcoded "delay x" in a lot of scripts to get things to work
  • Linear bootup order with lots of slow activities

Basically: consumer routers are the epitome of "we don't care as long as it slightly works" and "regular reboots & dropouts are acceptable".  The ultimate IDGAF of design.  There's no motivation to differentiate your product beyond (sometimes) some box specs and addon features.  The development cycle is "whack more shit on" and "fix it till it boots".

EDIT: Also as MarkL said, DOCSIS can be slow to sync even once your system is brought up.  During this, however, DHCP and the router's web interface should be working.  Hopefully.  Depending on the init scripts :D
« Last Edit: September 19, 2019, 11:16:23 pm by Whales »
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 1878
  • Country: be
    • Freelance Hardware Engineer
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #17 on: September 20, 2019, 09:43:40 am »
Boot scripts/environments built inside of older boot/scripts environments built on older ones (possibly from other vendors).

More likely: taken from a demo SW from the core chipset vendor (like BCM). They deliver fully functional SW for evaluation, some vendors just slap a sticker on it and be done, others will merge it with their stuff.

Offline mariush

  • Super Contributor
  • ***
  • Posts: 3959
  • Country: ro
  • .
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #18 on: September 20, 2019, 10:36:56 am »
I had cable internet from UPC (which has cable internet all over Europe)
The modem used to take around 30 seconds to be fully operational but my internet connection was very stable, only had maintenance (scheduled reboots of modems around 2-3 AM in a weekend) once every few weeks  or some random outage for a few minutes.

It does take longer for the modem to start and initialize and get up to speed if you had it turned off for days.
Basically modem starts, connects to ISP, downloads configuration through TFPT or some other means, optionally downloads firmware upgrades, then uses multiple channels for downlink and uplink , then initializes the voice over ip (for digital phone) part and other stuff related to digital tv.
It remembers and reuses the channels previously determined to be optimal... unless you hard reset it or was off for a long time. If so, the modem starts and gets working within a minute or so, but for a while it will keep scanning channels and selecting the best ones so speed gradually improves and maybe latency goes down.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 1724
  • Country: fi
    • My home page and email address
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #19 on: September 20, 2019, 11:30:49 am »
I have a dev board, with windows embedded, that boots up in 2 seconds to desktop. And it plays video for example and has everything you want from an embedded computer.
So? My laptop (HP Elitebook 840 G4) takes about two seconds to de-hibernate also, from complete power off to full userspace working.

I have a 3G/4G/LTE "modem" running Linux, ZTE MF-823, that boots from power off to full operation in less than a second, and connects within a few seconds.  No video or GUI at all, though.  It does run a full Linux userspace, including an SSH server, so I consider it pretty much equivalent to a cable modem, software-wise.  Any boot delay over a second is bad integration; but as mentioned, making the DOCSIS connection may take quite some time in some conditions, because of DOCSIS itself.

Just because most devices using Linux are integrated by what I can only assume are monkeys in a hurry to be somewhere else, does not mean the bloat is unavoidable.
Kinda applies to Windows, too, although I don't know how much of the unneeded stuff (GUI etc.) you can omit for embedded Windows installations.
For Windows, automatically installed bloatware, including "drivers" that contain all sorts of unneeded crap, is a much bigger problem -- again, poor integrators to blame.
(Integrators, or whatever you call the monkeys people that put it all together and sell to other people, then run off, never to be heard again.)

In fact, it is rather fun to create ones own Linux userspace, starting at the init process.  Just make sure your kernel has all drivers your board needs built in, and you can create an initrd out of your own userspace, doing whatever you want; then, you can write your own init in Bash or Python or any other language (you have an interpreter for installed on the initrd).  It'll boot crazy fast.  If you use a modular kernel, you'll need some variant of udev to manage the userspace side, but then the image will work with different hardware configurations on that architecture.

I suppose if more people played with that, and understood how easy it is after you get some experience with it, we might get much better embedded Linux installations.

(The init process is a bit special in that it should reap children that have exited, and by default ignore any signals that might be sent to it, and never exits; it also always has process ID 1.  So, usually one uses an init binary that starts your other processes. It just makes things much more robust.  In current typical Linux installations, the initial ramdisk contains scripts to mount the other filesystems (root filesystem is usually mounted by the kernel itself, based on information passed to it by the boot loader), load kernel drivers for detected hardware, and then pivot filesystem root to the actual mounted root filesystem, and continue booting from there.  If one starts from modifying an existing Linux installation, that is like throwing oneself into the deep end of the pool, instead of playing in the kiddie pool to get a feel for it first.)
« Last Edit: September 20, 2019, 11:35:54 am by Nominal Animal »
 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2400
  • Country: de
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #20 on: September 20, 2019, 03:40:10 pm »
Thank you for all of the detailed replies, at least I now have some idea of what is happening behind the flashing green lights.

One thing I forgot to mention is the reason for the cold boot, the cable boxes and the TV on 'standby' between them consume over 40W and there is some real heat being generated by the four different power bricks** that are plugged in to the power strip. So, SWMBO has ordered that the TV and cable internet shelf gets turned off at night and when we're out during the day.

What I find interesting is that the cable TV box (which certainly does run linux) boots in under a minute, at least four times the speed of the router/cable modem, so someone cares about speed

** Cable splitter and amplifier, Router/modem, cable TV box and the TV itself

Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 2831
  • Country: si
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #21 on: September 20, 2019, 04:09:55 pm »
It all depends how much effort the programers have put in to optimise the boot process.

Indeed you can boot Linux or Windows CE in a few seconds if you really strip it down to the esentials and use good optimised drivers and loaders and such. Most don't bother and just use the linux build they got from the CPU vendor. Its the reason why so many devices these days take forever to boot.

I can understand unpluging TVs or settop boxes with shitty standby implementations, but networking equipment like modens are not designed to be turned on and off daily. So because of that nobody cares if it takes 5 seconds or 5 minutes to boot since the boot process happens only every few months or years under normal usage. Don't expect the manufaturer to care about your weird usage of it. Leave it on or if you really must turn it off then get a timer switch to do it for you automaticaly.

And yes cable modems do have quite a bit to do before they get online. Some older ones have LEDs that indicate the progress trough the startup procedure, aiding in debuging a broken connection by seeing at what step it hangs up. Those might have LEDs that go like: Boot, Downstream, Upstream, Net, Link. Usualy the LEDs turning on one by one in that order. Also sometimes this process is extended by having the modem fetch some sort of configuration from the ISP servers after the link is established, sometimes even updating the firmware remotely.
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9322
  • Country: 00
  • Display aficionado
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #22 on: September 21, 2019, 07:23:48 pm »
Thank you for all of the detailed replies, at least I now have some idea of what is happening behind the flashing green lights.

One thing I forgot to mention is the reason for the cold boot, the cable boxes and the TV on 'standby' between them consume over 40W and there is some real heat being generated by the four different power bricks** that are plugged in to the power strip. So, SWMBO has ordered that the TV and cable internet shelf gets turned off at night and when we're out during the day.

What I find interesting is that the cable TV box (which certainly does run linux) boots in under a minute, at least four times the speed of the router/cable modem, so someone cares about speed

** Cable splitter and amplifier, Router/modem, cable TV box and the TV itself
I don't think 40W is allowed nowadays so it may pay to upgrade your equipment. Was it half a watt maximum for consumer devices on standby?
 

Offline FreddieChopin

  • Regular Contributor
  • *
  • !
  • Posts: 99
  • Country: ua
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #23 on: September 21, 2019, 07:44:49 pm »
Original GameBoy booted in couple of seconds and yet it had complicated games like Pokemon Red.
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1857
  • Country: ch
Re: Why Does A Cable Modem Take So Long To Boot?
« Reply #24 on: September 21, 2019, 09:32:52 pm »
A gameboy had no OS. Can't even remotely compare.

Yep it's just lack of optimization/caring. You can get a RPI to boot in less than 3 seconds if you tweak it for one specific task, but the default image takes 20 because it loads anything a generic user could need.

When you look at filesystems and scripts on consumer devices you often find they use the same system on multiple very different products and the OS just loads anything that is useful to any one of them, no optimization to disable what isn't applicable on a particular device. Also you'll often find files that are not even used, but are remains from a product that's 10 years old, because again "just make it work ASAP to make marketing happy, anything else is a waste of time". Oh, and often the vendors don't even employ people with the required knowledge to do actually do a good job more than a hack to get things to work.
This has led to major fails at times, I've been following a pretty popular product where the manufacturer was being hammered for security issues and implemented a bunch of encryption and signature for the various binaries as a response, but at one point the pressure to release fast was enough that they released an update that wasn't santized post dev and included both the encrypted and clear version of all of them...

This is an interesting talk, it's about security in IP cameras but it's the same approach that leads to the security fails and the lack of optimization...




« Last Edit: September 21, 2019, 09:36:35 pm by Kilrah »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf