I have a cron job which restarts my computer every day (Linux Mint Debian edition). I like waking up to a "fresh" computer, and since I know that it will restart every day - this is a "forcing function" to (1) be diligent about saving things that are important, (2) treating browser tabs, random notes, etc as ephemeral, and bookmarking the important stuff.
I used to work at an office where we pair-programmed with clients all day (Pivotal Labs), and most of our computers had some sort of "automatically restart / restore from a known-good image". I liked this, as it resulted in less cruft over time, and some intentionality about what getting a computer into a productive state means. It also got me thinking of using automatic routines to accomplish goals, and not being so attached to my open tabs, etc. Let it gooo....
To be more specific about this - for those wanting to get into blogging/publishing, this could mean auto-opening the website project folder using VSCodium upon user login, so its ready to go for the morning coffee. More half the time I just close it - but as a "default", it makes it easy for me to do the thing I want to do.
sudo crontab -e -u root
#-----------------------------
# RESTART COMPUTER DAILY
#-----------------------------
00 04 * * * /usr/sbin/shutdown -r +5 "Rebooting in 5 minutes. Run 'shutdown -c' to cancel"
I remember when Linux users were practically obsessive about uptime and restarting felt like a sign of failure. This was at a time when Windows seemingly needed to restart once or twice a day, at least.
These days I like to turn my work Mac off at the end of the week just so I feel a literal sense of closure. It's not really the applications minimizing and running in the background; it's ME.
I do still enjoy the odd >30 day uptime on my PC. Usually only reboot when a new kernel version is cut.
I used to reboot into every kernel patch but often I leave .0 running for a very long time now. They seem stable and the kernel moves fast enough nowadays there's often another .0 right around the corner. There might be exploits but they're not a valid threat model for my little desktop.
If something smaller like Mesa updates, I can reload everything simply by logging out/back in, no need for a full reboot/LUKS unlock.
In the mid-2000s I ran a. Fleet of RedHat servers that hosted millions of domains. I had boxes in that fleet that were up for over a year. Netcraft confirmed it!
Microsoft literally bought these 6 or 7 servers to migrate to IIS so they could “beat” Apache. It took more than double the servers, but after I did the initial work it was moved to a different team and I don’t know how the uptime compared.
It was a differentiator when distro updates where sparser, and in start comparison with Windows at the time which couldn't stay up for more than a couple of days without crashing (particularly the XP era).
how do you see how many tabs you have open, an extension? i have tab session manager and it shows i have 80 tabs. about 60 of those are ephemeral, and the other 20 i'd have open on a new browser anyhow (email x3, goog cal, caldav cal, nextcloud files, router, local and remote proxmox, navidrome, the documentation server, etc) everything else is superfluous. although i'd probably be a bit sad if i lost all my tabs right now; hence tab session manager.
Just close them. You're never going to read them. If you really think there's something you need, export the browser state to an archive file, then delete in 10 years after you've never consulted it once.
(Disclaimer: I'm aware that there may be valid reasons for this workflow, but in most cases it's just digital hoarding and the above advice is sorely needed. If you really need 1800 tabs, you know who you are and you can safely ignore me.)
Brave has a function to bookmark all open tabs. I have used that from time to time. Or just made a temp file and written all the URLs to it, in case I want to open a few/dozen of them after rebooting.
As a rule, if you don't reboot your servers while you are near them watching for problems, they will reboot by themselves at 3am in the first day you get sick or are traveling.
My machine was rebooted this week due to a power outage. I don't recall the last time prior to that. It generally goes weeks if not months without a reboot.
Yes, I remember feeling pride in the stability of my systems when I saw a large uptime. I had a server that had 1000 days of uptime, once. Now when I see a large uptime, I'm terrified of what security patches the kernel may be missing!
I'm glad to see this. Almost 18 years ago I implemented a similar kexec device+memory preservation for a storage vendor. It was done on a Linux kernel of that day, and it had had a memory reservation and handoff protocol between the two kernels to keep some specific PCI device alive, allowing for state restoration at the application side. I'm proud of the fact that the kernel replacement was just under 1 second in execution (after init process optimization) and the whole kernel+app was less than 10 seconds.
I still remember the days of servers as pets, rather than cattle, and I was harping about server uptime. A wizened server admin piped in and said he rebooted his servers once a week. Said, if you do it any less frequently, then the odds of catching an error causing change while the person who made said change (possibly himself) is still around and can remember what they did go down precipitously. So, to avoid headaches and potential downtime when it mattered, he would just take servers out of rotation and reboot them, and make sure they came back online.
So true. We have one older, rather large machine in a data center that's been up for.. (checks uptime): 963 days. It has IPMI but at some point something stopped working and now we have to physically go to the data center to restart it. And since we use it every day we can't really afford to lose access to it.
Live Kernel Patching has been around for about 20 years[-1] now.
Red Hat Enterprise Linux[1] and Oracle (Enterprise Linux) Unbreakable Linux[2] both use it as a selling point.
This feature is still a bit ad hoc because, in most setups, rebooting a system isn't a huge burden and is much simpler than using boutique commands to live-patch it.
At Javasoft there were Solaris test machines that had been up for 2+ years, and we had to reboot the windows test machines multiple times a day. It felt really good to leave a large queue of work at the end of the day on the Solaris/Sparc machines, knowing it would be done the next morning.
I remember when I was asked to replace a core router with a more powerful model. The uptime of the Cisco router was ten years - and it was ten years after the datacenter went into service.
This is actually useful for smartphones. Sometimes smartphone malware is capable of infecting a device but not persisting, so reboots clean it back up.
I shut my desktop down every night and bring it back up in the morning. It only takes all of 2 seconds these days with NVME drives, even with Fast Boot disabled.
It's kind of a power hog and generates a lot of heat, so I try not to run it if I won't be around.
I also shut my PC down every evening and boot it up in the morning. Suspend to RAM draws too much power for my tastes and suspend to disk does too much writing to the NVME and I don't want to have to buy a new one before the AI death spiral ends in 2028.
I don't have any data to prove it but I think Mac users don't bother "cleaning up" after they are done with their computers.
I think windows and Linux users usually shut down their laptops when they are done.
I believe this is because of how Mac is designed, nothing really closes. You close an app and it's just "minimized". Same behavior as with the lid, you close the lid and it suspends.
If I recall correctly, at some point, this also affected the iPhone, you were not able to "fully close" apps and they decided to add a screen so you could swipe and "close" the app (some run in the background, same as android)
Different reasons. Mine is on the table and I use it more like a desktop. It will just idle when I'm not around, because I come and go often. My current uptime shows on Debian 30 days, 49 min.
Although... 30 days is maybe a bit misleading, because I ran some heavy shaders without thinking that triggered the GPU watchdog and forced me out of my session. I think killing all user processes is almost like a reboot, although not according to uptime.
Not having to stop sessions of all kinds of things and restart them for no good reason.
It doesn't require it to stay up, and if things were better at retaining state across restarts I would care less, but it's a nuisance to have to log back into things, and get things back exactly how I left them.
I often have half a dozen projects up on different virtual desktops, and leaving them how they were when I worked on it last makes it easier to get back up to speed.
EDIT: I used to leave screen sessions running on servers instead, as the workaround to having to reboot my local machine. But it's nice not to need to.
Nothing requires it. But if I turn off my computer, it takes 15s or so to boot up. If I leave it on, it's available for me instantly. The latter is a more pleasant experience, so I gravitate towards it.
I used to be in this camp, maybe not 150+ days but with month+ uptimes, but now with Docker I have to restart regularly as I frequently get notes about 'no more disk space' and the only way to reclaim is is to reboot.
I think your model of open/closed is incomplete and thus misleading. There are more states to a process than "active" and "inactive," and it is not optimal for the system to simply move processes between those two gross states. The obvious example is non-foreground apps during multitasking. A less obvious example is an app during a background refresh.
"Fully closing" a process is not necessarily cleaner than letting the system allocate intelligently, despite what one's puritanical upbringing might make them believe. (Consider how artists often need a messy space to optimally hold their processes.)
I think my point is that minimizing the process doesn't free the ram it's using. Closing it, even if it stays running in the background, should free up resources
So I don't have to spend 10-15 minutes saving all my open files (including the scratchpad ones I haven't named) and then later reopening all my applications, recreating all of my tmux windows and panes, setting up my vim splits and tabs again, and starting all of my stopped Docker containers?
I have a feeling someone is going to jump in with a "solution" to each of these forgetting that lots of work is ephemeral/transient and undeserving of even the slightest bit of automation or pre-configuration.
Now that I have an nvme SSD in all my computers and boot times are roughly 10-15 seconds or so unless something has gone wrong, the advantage of sleeping is somewhat mitigated.
Back in the spinning rust era, though, a good unsuspend could be something like 50 times faster to get to a running computer. Possibly more, depending on what your OS needed to start up.
It is still more convenient to have my previous environment most of the time, and still faster to unsuspend than boot, but it isn't as much of an advantage as it used to be, no.
It takes ages to cold boot. My desktop is ok-ish, but it doens't matter since I only use it occasionally.
My old HP laptop had a slow-ass BIOS that I was convinced had some kind of bug. I replaced it with a brand spanking new thinkpad 2-3 months ago. Guess what? The freaking BIOS is EVEN SLOWER somehow!
They all wake up instantly from sleep.
I therefore only shut them down when I know they'll be unplugged for a while, because for some reason the HP eats through the battery even when off. If suspended, the battery will be out of juice in like two days. Haven't tried any of this with the Lenovo yet.
Suspend used to work great, but since MS figured they should copy Apple half-assedly, suspend is borken. And I have really no idea what we've gained in exchange.
I still remember reaching into my backpack to retrieve my Macbook in sleep mode only to find it hot to the touch, having woken up for some goddamn stupid reason. We had "proper" sleep decades ago: we called it "hibernate". Modern "smart sleep" is a technological regression, and Apple is as big an offender as any.
I think a large part is also how long it takes to restart a Mac. Every so often a coworker has to restart and I could probably restart my Linux (or even Windows) laptop 3 times before they're back on.
Kind of reminds me of how slow Windows computers used to boot back in the Vista and 7 era.
I'm glad it works for you, but I have witnessed several coworkers restart their macbooks (some M1, some M2, possibly M3) and I don't think I've ever seen a reboot shorter than about two minutes.
At one instance, I rolled over to a coworker who has just rebooted theirs and had a whole 5+ minute conversation.
I'd argue the opposite. My mac wakes up from sleep when I open the lid, and is functional in seconds with the fingerprint. Meanwhile sleep on windows is a complete dumpster truck and can result in any of "works fine", "a bunch of apps have got stuck" or "your battery drained in your backpack".
Also, my Win11 desktop is "fast" to get from POST (which takes > 2 minutes to do RAM check on every boot with 192GB RAM) to the login screen, but it's a good few minutes from log in before windows has started all the background stuff and it's actually functional.
That's a perfectly acceptable practice for apps that only ever have one window. For document-based apps or apps that have multiple windows, usually the convention on Mac is for closing the last window to not also quit the app. But of course there are exceptions in both directions, it's not a hard and fast rule.
I think what you're talking about is how on Mac, an application can stay running without having any windows. Separate from closing all the windows, you usually have to "Quit" the application if you really want it gone. This is useful for a couple reasons:
- You can "Quit" the application without closing all the windows, and then the next time you start the application, your windows can come back.
- You can close all the windows without "Quit"ting the application, and you don't have to wait for the application to load again in order to open a window later.
Additionally, since application lifecycle is managed separately from the open windows, apps can do cool things like saving and restoring the set of open windows through a system restart. Which Windows and Linux still haven't managed. (Maybe Windows can try to restart the processes... I think I saw that becoming an option more recently)
I've never rebooted often in general, even when I daily-drove Windows. Then, it was because it was annoying to get my preferred workspace back after a Windows restart. Now, I daily-drive macOS and I don't often reboot until the machine gets slow/janky because the machine doesn't really need a reboot until then. And I don't hate reboots as much as I would for Windows because macOS is a lot better at session restoration
I remember a big debate "back in the day" about the effects of shutting down your PC at night and the effect on the health of the CPU. The theory at the time was that by shutting down your PC every night, the temperature fluctuations would put more stress on the CPU, shorting its life span. However, the other side said that leaving on your PC all day and night would spend more time running and reduce its life span, so only having it running when you needed it was better. I think a website did a test and found it makes no difference, but I remember it being a big topic around the 2000's (it might have been related to AMD chips at the time running extremely hot)
I reboot one of my machines all the time. It's a Mac Mini running 'Little Snitch', which informs me about all of the network connects my apps make, especially browsers. One cool feature of that program is that one can temporarily grant access to a connection, for instance until the request quits, or one logs out, or one restarts a machine. I'm slowly developing permanent allow / ban lists, but I also use this feature to temporarily utilize some website, aand then reboot to avoid cross-contamination.
The downside is that I often get shunted off into additional authentication workflows, since the prolonged delay caused by my manual approvals triggers some alerts. One of the entertainment ticket buying services is really convinced I'm committing some kind of fraud.
So, in general, I reboot everytime I start using that machine, at least once per day, sometimes more frequently.
Fun fact: in a former life, I worked for a retailer with 1000s of remotely deployed machines and no field-based tech support. One of the OSes we used back in the day had a bug that caused their license authorization service to fail after a certain amount of uptime. We had hundreds of machines that reached that uptime, all on the same day. Suffice it to say, that was not fun.
Sadly, my computer has apparently rebooted multiple times this week. I didn't do it, but Microsoft decided it was for the best. I remember when a restart was something you were asked to consent to, and before that you had to affirmatively decide to perform an update.
Is it really different from that short time ago? It feels like this has been the normal for much longer than 5 years. I do remember there being fewer restarts to update, but I feel like that was way back in the snow leopard days.
As to why, I assumed it’s because security fixes are in basically every update these days. And it’s easier to change core systems with a restart than live
I restarted my Mac the other day and my free disk space went from 4GB to 40GB. Things are also noticeably zippier soon after a restart. Annoyingly, I can't reboot often because I'd lose all my incognito tabs. It's possible that quitting all applications would have the same effect (except the swap space, which seems not to fully release until reboot), but it's just as much hassle to do that as to fully restart the machine.
Anyone who is using full disk encryption will be turning off their computer when they're not around. Hibernation is an option if you want to keep your state.
A couple of years ago I noticed that my mac starts collecting weird little bugs if I don’t reboot for a really long time. The cursor starts misbehaving (it won’t reliably change over links, or in graphic editors), switching between apps might take a few seconds, and once I had my keyboard input latency increased by ~500-700ms for every keystroke. These issues go away on reboot. I’m trying rebooting once a week or so now.
No extra hardware, stock macbooks and an imac. No fancy apps either, RayCast is probably the only one that overrides default system behavior. It used to be better, a few years ago macOS would run stable for months, but even then I had to resort to ‘killall Dock’ for occasional glitches.
Can confirm. I have similar problems with very long uptimes on my MBA M1. By long, I mean two months or more. The most common recurring problem is the Mac forgetting it's connected to a monitor. But the problems are often very random. I've had most of the ones you described.
Though I shouldn't use the word "common" as the occurrences are rare. My guess is 4-6 times a year over the past five years. Would love to know what causes it but the randomness of the symptoms would make investigating a bit difficult.
Ever since I got my MacBook, I've only restarted it about twice a month. With Windows, I used to restart my pc/laptop almost every time I finished using it.
my department manages a fleet of ~10k Windows PCs and it's pulling teeth to get the users to allow an automated reboot once a month for updates. they invent all kinds of silly ways to avoid it. your situation seems atypical.
My understanding for Win10 was that Restart was "more complete" than rebooting by a manual power-off/power-on.
Found it: "By default, Windows computers use a "Fast Startup" feature when you click Shut Down." It actually performs a sort of hibernate, saving state data of the system (but not necessarily of all running programs - that's another setting). Restart clears those state registers and begins a new, fresh Windows session.
So, ideally: Perform a Restart, not Shut Down, at the end of your day.
FreeBSD is my daily driver and I only reboot for major upgrades (which is required). I never power off cause I work on it, off and on, throughout the day and night (for my own company).
I have a terrible work / non-work balance, and one trivial habit I've established is turning off my (Mac mini & MacBook Air) computers & screens when my work time is done.
I don't want it to be trivially easy for me to just do one more thing…there be dragons.
My Saturday mornings are more often markers for running Onyx[1] for maintenance.
Rebooting desktops or laptops is ok, rebooting your servers is an anxiety induced task, rebooting your archos linux, well, be prepared to spend an hour troubleshooting afterwards.
I helped manage 1500 desktops and thousands of VMs over twelve years in a call center and I preached rebooting at the end of the day/shift. There is no doubt that this reduced ticket volume compared to other sites. This included individual and shared desktops.
No. This isn't some theoretical Star Trek neutrino emissions scenario. Lightning punches-out wherever it hits, including ground, which is directly connected to neutral.
i think this isn't common knowledge; as it's only tied at one panel, and separate in the other (in the US); so there's two busses in the main breaker panel, one for white and one for green/bare. It's only the utility/ingress panel that has the neutral and ground bonded. It's a fluke of the way we deliver power in the US, split phase, maybe.
Lightning is electricity that goes through hundreds of meters or even kilometers of air (supposedly a good electrical insulator) to reach the ground, it's not above travelling through electrical lines the opposite way they're intended to be used.
High voltage electric arcs can be surprisingly long. The tiny cap in strip is not enough to protect in nearby hits. For that fully disconnecting or proper separation is need.
i thought half of lightning came from the ground, like half the potential. Slow mo lightning strikes have them meeting in the center in the air, rather than striking from cloud to ground. I could be wrong.
Lightning hit an antenna that was disconnected but near a radio and blew up the radio, the PC it was connected to, and then everything connected to the switch that was connected to the PC via cat5, and just for good measure, everything connected to an outlet on that side of the house within 15' of the computer outlet. once it gets in, it doesn't matter if stuff is off or on or whatever.
I have a home office with a desktop workstation. I shut down at EOD. When I worked in an office we were instructed by IT to leave the machines running overnight and they would run their scans and nonsense outside working hours, which was neat.
I do the same. I am not a fan of laptops preferring instead to sit down at a desktop to work. When I'm done I exit all my programs and shut down. I don't understand people who drag their computer state around everywhere.
I have a Lenovo Legion and a Macbook Pro - I've had to restart the mac a couple of times due to VPN issues with work, but the Lenovo has probably been running for a few months.
Sometimes I shut down my computer at the end of the day to symbolically end my week.
That being said, I hibernate at the end of my day. For some reason, merely closing my Dell laptop just isn't as smooth on reopen as my Mac. The startup is almost as long as a full reboot.
Every couple of months typically I do an arch linux update and reboot. But that is about it.
I do hibernate sometimes though, and that is pretty much the same final state power-wise as doing a shutdown (more so for my laptop as it does not keep keyboard/mouse powered in S4 and its the same with the hall effect sensor for the lid).
Actually, it's more or less the opposite. In some OS's (Windows, at least) a reboot does additional purging and loss of state that a shutdown will not do. That's by design, so a normal shutdown/startup is fast, but if you're having a problem a reboot will be more thorough.
‘“Microsoft Edge is preve…” Bam! Force quit! Kill kill kill!’
Wait, what? Why is OP using Edge on a Mac? To each their own, it just caught me as odd.
And, as Betteridge’s Corollary or whatever demands, the answer to the headline is “no”. Is this like ancient wisdom about batteries, you’ve got to run them to zero once in a while or they’ll get a “memory”? (Which, of course, hasn’t been true for, like, twenty years.)
Nope. When I want to know when was the last time I came back from vacation, I type this at the CLI:
uptime
I turn off my desktop when I go on vacation for more than a few days. If I just leave for the week-end I don't turn it off.
Very rarely there's a published kernel fix leading to an exploit that could potentially affect my setup that requires rebooting, but that is exceedingly rare.
FWIW my desktop regularly reaches six months of uptime and I had a server at OVH which I kept just because I could that reached something silly like 3400 days of uptime (it just didn't reach 10 years). At some point (after maybe three years) the uptime was so cool I decided to just keep it and see how long it'd stay up (and, no, that one wasn't secure at all: kids, don't try this at home). When the fire at OVH took entire bays off, I wasn't affected so the thing kept cranking.
If we leave security concerns aside, OSes are really that stable now (unless we're talking about Microsoft products of course).
> Have You Restarted Your Computer This Week?
Now of course I've got something like 12 computers at home so it really depends which computer you're talking about. For example I've got a server with ECC memory that runs VMs and containers but... I only need it when I'm awake. So that one I typically turn off at night (for the energy consumption). I know, I know: desktop up and server down at night I must be doing something wrong right? But then it's my setup and I do what I want.
I have a cron job which restarts my computer every day (Linux Mint Debian edition). I like waking up to a "fresh" computer, and since I know that it will restart every day - this is a "forcing function" to (1) be diligent about saving things that are important, (2) treating browser tabs, random notes, etc as ephemeral, and bookmarking the important stuff.
I used to work at an office where we pair-programmed with clients all day (Pivotal Labs), and most of our computers had some sort of "automatically restart / restore from a known-good image". I liked this, as it resulted in less cruft over time, and some intentionality about what getting a computer into a productive state means. It also got me thinking of using automatic routines to accomplish goals, and not being so attached to my open tabs, etc. Let it gooo....
To be more specific about this - for those wanting to get into blogging/publishing, this could mean auto-opening the website project folder using VSCodium upon user login, so its ready to go for the morning coffee. More half the time I just close it - but as a "default", it makes it easy for me to do the thing I want to do.
A slightly more fun version:
I remember when Linux users were practically obsessive about uptime and restarting felt like a sign of failure. This was at a time when Windows seemingly needed to restart once or twice a day, at least.
These days I like to turn my work Mac off at the end of the week just so I feel a literal sense of closure. It's not really the applications minimizing and running in the background; it's ME.
I do still enjoy the odd >30 day uptime on my PC. Usually only reboot when a new kernel version is cut.
I used to reboot into every kernel patch but often I leave .0 running for a very long time now. They seem stable and the kernel moves fast enough nowadays there's often another .0 right around the corner. There might be exploits but they're not a valid threat model for my little desktop.
If something smaller like Mesa updates, I can reload everything simply by logging out/back in, no need for a full reboot/LUKS unlock.
In the mid-2000s I ran a. Fleet of RedHat servers that hosted millions of domains. I had boxes in that fleet that were up for over a year. Netcraft confirmed it!
Microsoft literally bought these 6 or 7 servers to migrate to IIS so they could “beat” Apache. It took more than double the servers, but after I did the initial work it was moved to a different team and I don’t know how the uptime compared.
It was a differentiator when distro updates where sparser, and in start comparison with Windows at the time which couldn't stay up for more than a couple of days without crashing (particularly the XP era).
> These days I like to turn my work Mac off at the end of the week just so I feel a literal sense of closure
It's also just nice to start Monday with a fresh boot.
If nothing else, it keeps me from getting to the point of 200 tabs open that I'm totally definitely going to need again "soon"
200 tabs? The children of summer are still among us, it seems (he says, glancing at the current tab count of slightly over 1800).
… Why…?
Think of it as a memory aide combined with a to-do list.
I think I have found my soulmate :)
Every crash cuts deep if it doesn't resume correctly.
2616. On an iPad pro. I am not updating the os because I am pretty sure that the current behavior is a bug. The hard limit has always been 500.
how do you see how many tabs you have open, an extension? i have tab session manager and it shows i have 80 tabs. about 60 of those are ephemeral, and the other 20 i'd have open on a new browser anyhow (email x3, goog cal, caldav cal, nextcloud files, router, local and remote proxmox, navidrome, the documentation server, etc) everything else is superfluous. although i'd probably be a bit sad if i lost all my tabs right now; hence tab session manager.
Sideberry
Just close them. You're never going to read them. If you really think there's something you need, export the browser state to an archive file, then delete in 10 years after you've never consulted it once.
(Disclaimer: I'm aware that there may be valid reasons for this workflow, but in most cases it's just digital hoarding and the above advice is sorely needed. If you really need 1800 tabs, you know who you are and you can safely ignore me.)
Brave has a function to bookmark all open tabs. I have used that from time to time. Or just made a temp file and written all the URLs to it, in case I want to open a few/dozen of them after rebooting.
Ahem... yeah... "were"...
I do actually reboot occasionally these days, because the world is so serious now.
As a rule, if you don't reboot your servers while you are near them watching for problems, they will reboot by themselves at 3am in the first day you get sick or are traveling.
My machine was rebooted this week due to a power outage. I don't recall the last time prior to that. It generally goes weeks if not months without a reboot.
I've followed the same routine each Friday for at least the past 10 years.
- Install all updates
- Save tabs off to Obsidian (or Raindrop now)
- Reboot
Feels good coming in on Monday to a fresh session.
Yes, I remember feeling pride in the stability of my systems when I saw a large uptime. I had a server that had 1000 days of uptime, once. Now when I see a large uptime, I'm terrified of what security patches the kernel may be missing!
Thankfully there's livepatching (e.g. https://ubuntu.com/security/livepatch )
6.19 added a new Live Update Orchestrator, which allows significantly more of the system to be retained while doing a kexec / Kernel Handover like transisiton to a new kernel too. https://www.phoronix.com/news/Linux-6.19-Live-Update-LUO https://lwn.net/Articles/1033364/
Systemd added support in recent 2.61. Theres also now ways to have user stores, that survive across switches. https://www.phoronix.com/news/systemd-261
I'm glad to see this. Almost 18 years ago I implemented a similar kexec device+memory preservation for a storage vendor. It was done on a Linux kernel of that day, and it had had a memory reservation and handoff protocol between the two kernels to keep some specific PCI device alive, allowing for state restoration at the application side. I'm proud of the fact that the kernel replacement was just under 1 second in execution (after init process optimization) and the whole kernel+app was less than 10 seconds.
Ksplice came out of MIT in 2008, which updates your kernel while it's running. No need to reboot! Supports Ubuntu.
I still remember the days of servers as pets, rather than cattle, and I was harping about server uptime. A wizened server admin piped in and said he rebooted his servers once a week. Said, if you do it any less frequently, then the odds of catching an error causing change while the person who made said change (possibly himself) is still around and can remember what they did go down precipitously. So, to avoid headaches and potential downtime when it mattered, he would just take servers out of rotation and reboot them, and make sure they came back online.
So true. We have one older, rather large machine in a data center that's been up for.. (checks uptime): 963 days. It has IPMI but at some point something stopped working and now we have to physically go to the data center to restart it. And since we use it every day we can't really afford to lose access to it.
Live Kernel Patching has been around for about 20 years[-1] now.
Red Hat Enterprise Linux[1] and Oracle (Enterprise Linux) Unbreakable Linux[2] both use it as a selling point.
This feature is still a bit ad hoc because, in most setups, rebooting a system isn't a huge burden and is much simpler than using boutique commands to live-patch it.
[-1] https://en.wikipedia.org/wiki/Ksplice
[0] https://www.ksplice.com/
[1] https://www.redhat.com/en/topics/linux/what-is-linux-kernel-...
[2] https://docs.oracle.com/en/learn/ol-ksplice/
Restarting windows twice a day meant a productive day, back in the days of windows 98 (which by the way lived well past windows 2000 and windows xp)
At Javasoft there were Solaris test machines that had been up for 2+ years, and we had to reboot the windows test machines multiple times a day. It felt really good to leave a large queue of work at the end of the day on the Solaris/Sparc machines, knowing it would be done the next morning.
I remember when I was asked to replace a core router with a more powerful model. The uptime of the Cisco router was ten years - and it was ten years after the datacenter went into service.
This is actually useful for smartphones. Sometimes smartphone malware is capable of infecting a device but not persisting, so reboots clean it back up.
At least if you trust the NSA's advice: https://s3.documentcloud.org/documents/21018353/nsa-mobile-d...
This is one of the features I appreciate with OneUI, I can set it to automatically restart it in the mornings.
The people that I know, in the security field, restart their phones, multiple times per day.
The same reason I barely restarted my iPhone for a few years. The `checkra1n` jailbreak had to be reinstalled each time (though it was easy):
https://checkra.in/
On GrapheneOS, restarting also brings the device to a BFU state, which makes it loads harder for an adversary with physical access to unlock it.
I shut my desktop down every night and bring it back up in the morning. It only takes all of 2 seconds these days with NVME drives, even with Fast Boot disabled.
It's kind of a power hog and generates a lot of heat, so I try not to run it if I won't be around.
Shut down != reboot, but you get the idea.
I also shut my PC down every evening and boot it up in the morning. Suspend to RAM draws too much power for my tastes and suspend to disk does too much writing to the NVME and I don't want to have to buy a new one before the AI death spiral ends in 2028.
I don't have any data to prove it but I think Mac users don't bother "cleaning up" after they are done with their computers.
I think windows and Linux users usually shut down their laptops when they are done.
I believe this is because of how Mac is designed, nothing really closes. You close an app and it's just "minimized". Same behavior as with the lid, you close the lid and it suspends.
If I recall correctly, at some point, this also affected the iPhone, you were not able to "fully close" apps and they decided to add a screen so you could swipe and "close" the app (some run in the background, same as android)
As a Linux user, it pisses me off whenever I am forced to reboot, and I'm very disappointed if my laptop uptime is measured in less than months.
Needing to shut down to me indicates something is broken.
What can possibly require a laptop to be up for months?
I have a Linux server that can run for years without needing a reboot. But my laptop I just shut it down after my work is done
Different reasons. Mine is on the table and I use it more like a desktop. It will just idle when I'm not around, because I come and go often. My current uptime shows on Debian 30 days, 49 min.
Although... 30 days is maybe a bit misleading, because I ran some heavy shaders without thinking that triggered the GPU watchdog and forced me out of my session. I think killing all user processes is almost like a reboot, although not according to uptime.
Not having to stop sessions of all kinds of things and restart them for no good reason.
It doesn't require it to stay up, and if things were better at retaining state across restarts I would care less, but it's a nuisance to have to log back into things, and get things back exactly how I left them.
I often have half a dozen projects up on different virtual desktops, and leaving them how they were when I worked on it last makes it easier to get back up to speed.
EDIT: I used to leave screen sessions running on servers instead, as the workaround to having to reboot my local machine. But it's nice not to need to.
Nothing requires it. But if I turn off my computer, it takes 15s or so to boot up. If I leave it on, it's available for me instantly. The latter is a more pleasant experience, so I gravitate towards it.
Keeping a PC running when you aren't doing anything with it sounds like a waste of electricity to me.
Electricity also wears down electronic components, so I think it also shortens the lifespan of your PC parts.
my every day use macbook I expect 150+ days uptime before something goes wonky that forces a reboot
I used to be in this camp, maybe not 150+ days but with month+ uptimes, but now with Docker I have to restart regularly as I frequently get notes about 'no more disk space' and the only way to reclaim is is to reboot.
I think your model of open/closed is incomplete and thus misleading. There are more states to a process than "active" and "inactive," and it is not optimal for the system to simply move processes between those two gross states. The obvious example is non-foreground apps during multitasking. A less obvious example is an app during a background refresh.
"Fully closing" a process is not necessarily cleaner than letting the system allocate intelligently, despite what one's puritanical upbringing might make them believe. (Consider how artists often need a messy space to optimally hold their processes.)
I think my point is that minimizing the process doesn't free the ram it's using. Closing it, even if it stays running in the background, should free up resources
> I believe this is because of how Mac is designed
Yes, that they actually got sleep working properly.
What's the point of sleeping your computer? If you are not using it then it's better to just turn it off
So I don't have to spend 10-15 minutes saving all my open files (including the scratchpad ones I haven't named) and then later reopening all my applications, recreating all of my tmux windows and panes, setting up my vim splits and tabs again, and starting all of my stopped Docker containers?
I have a feeling someone is going to jump in with a "solution" to each of these forgetting that lots of work is ephemeral/transient and undeserving of even the slightest bit of automation or pre-configuration.
funny, decent text editors like VS Code save even the unnamed unsaved files
Now that I have an nvme SSD in all my computers and boot times are roughly 10-15 seconds or so unless something has gone wrong, the advantage of sleeping is somewhat mitigated.
Back in the spinning rust era, though, a good unsuspend could be something like 50 times faster to get to a running computer. Possibly more, depending on what your OS needed to start up.
It is still more convenient to have my previous environment most of the time, and still faster to unsuspend than boot, but it isn't as much of an advantage as it used to be, no.
If you turn it off, it might attempt a 45 minute update when you start it again (yes this has happened to me with macos).
The same reason that you don't do a full shutdown every time you walk away from your computer. I don't really believe that you don't understand this.
It takes ages to cold boot. My desktop is ok-ish, but it doens't matter since I only use it occasionally.
My old HP laptop had a slow-ass BIOS that I was convinced had some kind of bug. I replaced it with a brand spanking new thinkpad 2-3 months ago. Guess what? The freaking BIOS is EVEN SLOWER somehow!
They all wake up instantly from sleep.
I therefore only shut them down when I know they'll be unplugged for a while, because for some reason the HP eats through the battery even when off. If suspended, the battery will be out of juice in like two days. Haven't tried any of this with the Lenovo yet.
Suspend used to work great, but since MS figured they should copy Apple half-assedly, suspend is borken. And I have really no idea what we've gained in exchange.
I still remember reaching into my backpack to retrieve my Macbook in sleep mode only to find it hot to the touch, having woken up for some goddamn stupid reason. We had "proper" sleep decades ago: we called it "hibernate". Modern "smart sleep" is a technological regression, and Apple is as big an offender as any.
I think a large part is also how long it takes to restart a Mac. Every so often a coworker has to restart and I could probably restart my Linux (or even Windows) laptop 3 times before they're back on.
Kind of reminds me of how slow Windows computers used to boot back in the Vista and 7 era.
What’s crazy is that boot time was a headline feature of Snow Leopard.
Wat? The apple silicon one on my desk restarts in under 30 seconds. Markedly faster than the Windows PC next to it
I'm glad it works for you, but I have witnessed several coworkers restart their macbooks (some M1, some M2, possibly M3) and I don't think I've ever seen a reboot shorter than about two minutes.
At one instance, I rolled over to a coworker who has just rebooted theirs and had a whole 5+ minute conversation.
I'd argue the opposite. My mac wakes up from sleep when I open the lid, and is functional in seconds with the fingerprint. Meanwhile sleep on windows is a complete dumpster truck and can result in any of "works fine", "a bunch of apps have got stuck" or "your battery drained in your backpack".
Also, my Win11 desktop is "fast" to get from POST (which takes > 2 minutes to do RAM check on every boot with 192GB RAM) to the login screen, but it's a good few minutes from log in before windows has started all the background stuff and it's actually functional.
That is not true, when you close apps on macOS the process(es) really are finished, just like on Windows or Linux.
I think they think of "closing an app" as closing its windows, which on Mac does not always "Quit" the app.
Right, I see. That is the traditional behaviour but there’s lots of apps that don’t do that, and closing the last window does also quit the app.
That's a perfectly acceptable practice for apps that only ever have one window. For document-based apps or apps that have multiple windows, usually the convention on Mac is for closing the last window to not also quit the app. But of course there are exceptions in both directions, it's not a hard and fast rule.
I think what you're talking about is how on Mac, an application can stay running without having any windows. Separate from closing all the windows, you usually have to "Quit" the application if you really want it gone. This is useful for a couple reasons:
- You can "Quit" the application without closing all the windows, and then the next time you start the application, your windows can come back.
- You can close all the windows without "Quit"ting the application, and you don't have to wait for the application to load again in order to open a window later.
Additionally, since application lifecycle is managed separately from the open windows, apps can do cool things like saving and restoring the set of open windows through a system restart. Which Windows and Linux still haven't managed. (Maybe Windows can try to restart the processes... I think I saw that becoming an option more recently)
I've never rebooted often in general, even when I daily-drove Windows. Then, it was because it was annoying to get my preferred workspace back after a Windows restart. Now, I daily-drive macOS and I don't often reboot until the machine gets slow/janky because the machine doesn't really need a reboot until then. And I don't hate reboots as much as I would for Windows because macOS is a lot better at session restoration
I remember a big debate "back in the day" about the effects of shutting down your PC at night and the effect on the health of the CPU. The theory at the time was that by shutting down your PC every night, the temperature fluctuations would put more stress on the CPU, shorting its life span. However, the other side said that leaving on your PC all day and night would spend more time running and reduce its life span, so only having it running when you needed it was better. I think a website did a test and found it makes no difference, but I remember it being a big topic around the 2000's (it might have been related to AMD chips at the time running extremely hot)
I reboot one of my machines all the time. It's a Mac Mini running 'Little Snitch', which informs me about all of the network connects my apps make, especially browsers. One cool feature of that program is that one can temporarily grant access to a connection, for instance until the request quits, or one logs out, or one restarts a machine. I'm slowly developing permanent allow / ban lists, but I also use this feature to temporarily utilize some website, aand then reboot to avoid cross-contamination.
The downside is that I often get shunted off into additional authentication workflows, since the prolonged delay caused by my manual approvals triggers some alerts. One of the entertainment ticket buying services is really convinced I'm committing some kind of fraud.
So, in general, I reboot everytime I start using that machine, at least once per day, sometimes more frequently.
Fun fact: in a former life, I worked for a retailer with 1000s of remotely deployed machines and no field-based tech support. One of the OSes we used back in the day had a bug that caused their license authorization service to fail after a certain amount of uptime. We had hundreds of machines that reached that uptime, all on the same day. Suffice it to say, that was not fun.
0:43 up 204 days
I need to reboot
Yes.
And I'll likely do it again.
Not always by choice. I can crash the system by playing a certain game (they still treat the Apple platform like crap).
I can also put it into limbo, with Xcode, one of the most bountiful bug farms on Earth.
Sadly, my computer has apparently rebooted multiple times this week. I didn't do it, but Microsoft decided it was for the best. I remember when a restart was something you were asked to consent to, and before that you had to affirmatively decide to perform an update.
Anecdotally was discussing with friend circle recently how our Macs have "you must restart now" updates far more often than 1/2/5 years ago.
Not sure how much is that quality of dev went down vs quantity of threats went up.
Is it really different from that short time ago? It feels like this has been the normal for much longer than 5 years. I do remember there being fewer restarts to update, but I feel like that was way back in the snow leopard days.
As to why, I assumed it’s because security fixes are in basically every update these days. And it’s easier to change core systems with a restart than live
I restarted my Mac the other day and my free disk space went from 4GB to 40GB. Things are also noticeably zippier soon after a restart. Annoyingly, I can't reboot often because I'd lose all my incognito tabs. It's possible that quitting all applications would have the same effect (except the swap space, which seems not to fully release until reboot), but it's just as much hassle to do that as to fully restart the machine.
If you need "incognito" tabs that last longer, it might be worth looking into something like the Temporary Containers addon for Firefox.
Appreciate it, will check this out!
Anyone who is using full disk encryption will be turning off their computer when they're not around. Hibernation is an option if you want to keep your state.
I was about to comment that exactly. If you computer is never switched off, your encryption is permanently bypassed.
A couple of years ago I noticed that my mac starts collecting weird little bugs if I don’t reboot for a really long time. The cursor starts misbehaving (it won’t reliably change over links, or in graphic editors), switching between apps might take a few seconds, and once I had my keyboard input latency increased by ~500-700ms for every keystroke. These issues go away on reboot. I’m trying rebooting once a week or so now.
Uhm, do you have a virus or other spyware?
hope not : ) I observed these across three computers on different versions of macOS.
I've been using MacOS for 20 years and I haven't encountered it. I rarely reboot.
Do you have some unusual hardware that requires a driver, or otherwise install something that requires a driver?
No extra hardware, stock macbooks and an imac. No fancy apps either, RayCast is probably the only one that overrides default system behavior. It used to be better, a few years ago macOS would run stable for months, but even then I had to resort to ‘killall Dock’ for occasional glitches.
does logging out fix it?
Can confirm. I have similar problems with very long uptimes on my MBA M1. By long, I mean two months or more. The most common recurring problem is the Mac forgetting it's connected to a monitor. But the problems are often very random. I've had most of the ones you described.
Though I shouldn't use the word "common" as the occurrences are rare. My guess is 4-6 times a year over the past five years. Would love to know what causes it but the randomness of the symptoms would make investigating a bit difficult.
Ever since I got my MacBook, I've only restarted it about twice a month. With Windows, I used to restart my pc/laptop almost every time I finished using it.
my department manages a fleet of ~10k Windows PCs and it's pulling teeth to get the users to allow an automated reboot once a month for updates. they invent all kinds of silly ways to avoid it. your situation seems atypical.
No, restarting is an occasional unfortunate workaround for subsystems that don't properly update in place (e.g. OS kernel).
uptime: `up 35 days`
it feels bad in some sense but I don't like my environment being interrupted!
No I power it off first and then I start it up again
For Windows, this may not be enough: https://m.majorgeeks.com/content/page/the_truth_about_window...
My understanding for Win10 was that Restart was "more complete" than rebooting by a manual power-off/power-on.
Found it: "By default, Windows computers use a "Fast Startup" feature when you click Shut Down." It actually performs a sort of hibernate, saving state data of the system (but not necessarily of all running programs - that's another setting). Restart clears those state registers and begins a new, fresh Windows session.
So, ideally: Perform a Restart, not Shut Down, at the end of your day.
My Mac and Linux machine get a reboot every now and then. On the other hand, my work Windows machine, welp…
FreeBSD is my daily driver and I only reboot for major upgrades (which is required). I never power off cause I work on it, off and on, throughout the day and night (for my own company).
There are enough crappy win32 applications that you probably should restart Windows PCs nightly.
The usual "Windoze suxxor amirite?" reply.
I have a terrible work / non-work balance, and one trivial habit I've established is turning off my (Mac mini & MacBook Air) computers & screens when my work time is done. I don't want it to be trivially easy for me to just do one more thing…there be dragons. My Saturday mornings are more often markers for running Onyx[1] for maintenance.
[1] https://www.titanium-software.fr/en/onyx.html
I had over a year last time :(
Yes, a few times. Thank you for asking, I hope you restart your computer some as well. :)
Rebooting desktops or laptops is ok, rebooting your servers is an anxiety induced task, rebooting your archos linux, well, be prepared to spend an hour troubleshooting afterwards.
If the server can't be rebooted without anxiety, something has been configured very poorly.
I helped manage 1500 desktops and thousands of VMs over twelve years in a call center and I preached rebooting at the end of the day/shift. There is no doubt that this reduced ticket volume compared to other sites. This included individual and shared desktops.
aren't there other old-school people like me that shut down everything at end of day and restart the next?
can't be hacked if it's completely off
can't get struck by lightning or surges if the surge-strip is flipped off
fans and spinning drives have lifetime on motors
>can't get struck by lightning or surges if the surge-strip is flipped off
That's not how electricity works. Hot may be open but your ground and return is not.
that's an interesting thought but would violate physics for lightning to come in through the ground line?
No. This isn't some theoretical Star Trek neutrino emissions scenario. Lightning punches-out wherever it hits, including ground, which is directly connected to neutral.
i think this isn't common knowledge; as it's only tied at one panel, and separate in the other (in the US); so there's two busses in the main breaker panel, one for white and one for green/bare. It's only the utility/ingress panel that has the neutral and ground bonded. It's a fluke of the way we deliver power in the US, split phase, maybe.
Lightning is electricity that goes through hundreds of meters or even kilometers of air (supposedly a good electrical insulator) to reach the ground, it's not above travelling through electrical lines the opposite way they're intended to be used.
it can jump from wherever it is to your highly attractive ground line
High voltage electric arcs can be surprisingly long. The tiny cap in strip is not enough to protect in nearby hits. For that fully disconnecting or proper separation is need.
i thought half of lightning came from the ground, like half the potential. Slow mo lightning strikes have them meeting in the center in the air, rather than striking from cloud to ground. I could be wrong.
Lightning hit an antenna that was disconnected but near a radio and blew up the radio, the PC it was connected to, and then everything connected to the switch that was connected to the PC via cat5, and just for good measure, everything connected to an outlet on that side of the house within 15' of the computer outlet. once it gets in, it doesn't matter if stuff is off or on or whatever.
“Ground is 0v everywhere” is a rule of thumb with a surprisingly limited scope of validity, not physics.
Lightning is a special case because it will jump through the air, regardless of the surge switch status.
I have a home office with a desktop workstation. I shut down at EOD. When I worked in an office we were instructed by IT to leave the machines running overnight and they would run their scans and nonsense outside working hours, which was neat.
I do the same. I am not a fan of laptops preferring instead to sit down at a desktop to work. When I'm done I exit all my programs and shut down. I don't understand people who drag their computer state around everywhere.
I have a Lenovo Legion and a Macbook Pro - I've had to restart the mac a couple of times due to VPN issues with work, but the Lenovo has probably been running for a few months.
Sometimes I shut down my computer at the end of the day to symbolically end my week.
That being said, I hibernate at the end of my day. For some reason, merely closing my Dell laptop just isn't as smooth on reopen as my Mac. The startup is almost as long as a full reboot.
Every couple of months typically I do an arch linux update and reboot. But that is about it.
I do hibernate sometimes though, and that is pretty much the same final state power-wise as doing a shutdown (more so for my laptop as it does not keep keyboard/mouse powered in S4 and its the same with the hall effect sensor for the lid).
notice that for some hw parts restart ≠ shutdown & reboot. if you really want to start fresh, shut your machine down once a week.
Actually, it's more or less the opposite. In some OS's (Windows, at least) a reboot does additional purging and loss of state that a shutdown will not do. That's by design, so a normal shutdown/startup is fast, but if you're having a problem a reboot will be more thorough.
yes, I always do.
But today I had to power it off, I accidentally created a fork bomb changing a couple of scripts on OpenBSD.
It did not freeze the system but I could not create any more processes. shutdown(8) could not even run, so a hard power off :)
‘“Microsoft Edge is preve…” Bam! Force quit! Kill kill kill!’
Wait, what? Why is OP using Edge on a Mac? To each their own, it just caught me as odd.
And, as Betteridge’s Corollary or whatever demands, the answer to the headline is “no”. Is this like ancient wisdom about batteries, you’ve got to run them to zero once in a while or they’ll get a “memory”? (Which, of course, hasn’t been true for, like, twenty years.)
I've seen a lot of discussion on this recently but I'm not a mac user so my opinion isn't very relevant. Here's a recent recap though <https://windowsforum.com/threads/microsoft-edge-on-mac-wins-...>
Nope. When I want to know when was the last time I came back from vacation, I type this at the CLI:
I turn off my desktop when I go on vacation for more than a few days. If I just leave for the week-end I don't turn it off.
Very rarely there's a published kernel fix leading to an exploit that could potentially affect my setup that requires rebooting, but that is exceedingly rare.
FWIW my desktop regularly reaches six months of uptime and I had a server at OVH which I kept just because I could that reached something silly like 3400 days of uptime (it just didn't reach 10 years). At some point (after maybe three years) the uptime was so cool I decided to just keep it and see how long it'd stay up (and, no, that one wasn't secure at all: kids, don't try this at home). When the fire at OVH took entire bays off, I wasn't affected so the thing kept cranking.
If we leave security concerns aside, OSes are really that stable now (unless we're talking about Microsoft products of course).
> Have You Restarted Your Computer This Week?
Now of course I've got something like 12 computers at home so it really depends which computer you're talking about. For example I've got a server with ECC memory that runs VMs and containers but... I only need it when I'm awake. So that one I typically turn off at night (for the energy consumption). I know, I know: desktop up and server down at night I must be doing something wrong right? But then it's my setup and I do what I want.