upvote
A full kernel dump is indeed writing the entire contents of RAM to disk. If you have 64GB of RAM then it is writing 64GB to disk.

Also it doesn’t get the full ten seconds. The power button timer is ~5 seconds before dump collection is even triggered. That is then racing the 10 seconds before the hardware restarts.

Five seconds to write potentially tens of GB to disk is not much time, even with an NVME SSD.

reply
"Kernel dump" sounds like the wrong word for that... But is that what windows insider builds do? Normal windows throws out a minidump in the megabyte range.
reply
It is configurable. The defaults may differ for insider builds. A full kernel dump includes all memory. A small kernel dump is only in the kilobyte range and has no user mode memory.

https://learn.microsoft.com/en-us/windows-hardware/drivers/d...

reply
> Even a mechanical hard drive is doing >150MB/s,

Only in a sequential read/write operations and only for 3.5" and 2.5" 10k drives. 2.5" can do it on the outside tracks sometimes.

Now add the fragmentation of the filesystem and now it's sub 10MB/s.

> SSDs/NVMEs are doing multiples of that

Only in 'good' conditions. Fragmentation of the filesystem, fragmentation of the flash itself, size of the erase block, write amplification - all of these can plummet the performance[0] of a flash drive. And some cheap tablets/2-in-1 are using eMMC which is way worse than even a SATA SSD.=

[0] https://ssd.userbenchmark.com/SpeedTest/1218310/Samsung-SSD-... scroll to "User Benchmarks" under "Average Bench", look at "Random 4k" - oops, average is ~50MB/s

reply
Is the page file not contiguous?
reply
Not guaranteed to be, not at all, given that windows grows and shrinks it dynamically
reply
Sure, sure, but the question stands.

When I hold the power button for 10 seconds on my linux machine because I want it off 'now' and not 'when it's good and ready', it is off very shortly after 10 seconds. When I did so on the same device when it was running Windows a year ago, there was no "please give us a sec".

So the "why" is "why does this (the machine turns off gracefully in the time I ask it to) not hold for only the most recent versions of a Windows machine"? What is the Windows machine doing now that it didn't do before that it cannot accomplish in the timeframe it's had for a very long time? Is there no optimization that can be done to avoid yet another userspace interruption? Is it that it needs some extra time for telemetry? That it needs some new undocumented verification step? That it's calling home to check for updates it could apply during this 'unscheduled' shutdown? What? What is it? Why? Why is it?

This just rings of the old "eject your USB" thing where the only reason to do so was the OS deciding to cache writes for the future instead of doing them at or as near as possible to the time the user requested them. The only reason my USB wouldn't have the files I expected it to is if the OS is behaving counter to the expectation that it'd already set for me of files being written at the time the button/script was executed.

There is no reason that we couldn't get a "your device is ensuring synchronization with the USB device" message back then, and no reason we can't get a "your machine may experience issues if you continue to hold the power button" message now.

As it stands, there is no reason to suspect (from only the message) that there will be any issues, and so users will ignore it. There is no reason in either the USB case or this one to not include a sentence detailing potential ramifications to allow the user to decide whether or not the requested action is genuinely required.

reply
Linux doesn’t care about you shutting down before the whole kernel dump and or a clean shutoff. Even macOS doesn’t do this. A clean shutoff though might prevent file system integrity . This is also an aside but macOS can reserve some RAM so you can close an application or process that is exhausting your RAM.
reply
> What is the Windows machine doing now that it didn't do before that it cannot accomplish in the timeframe it's had for a very long time?

Windows really wants to shut down cleanly. Shutting down cleanly often took more than 10 seconds, or you wouldn't be holding the button.

Now it's detecting you are holding the power button, and at least it triggers user messaging. Maybe it tries to shutdown again, with feeling? Maybe it includes a memory dump or other telemetry?

> There is no reason in either the USB case or this one to not include a sentence detailing potential ramifications to allow the user to decide whether or not the requested action is genuinely required.

I mean, brutual experience has taught developers that users will not read any information provided to them. For shutdown, you get a message to please let it shut down nicely, and then you'll get another message when you start it up telling you it's taking longer and you may have lost data because you did it wrong.

For USB, it's similar, when you insert it after you removed it uncleanly, it takes longer and yells at you some more.

reply
> Shutting down cleanly often took more than 10 seconds, or you wouldn't be holding the button.

I don't follow. The normal case for a forced power off is that the computer has crashed. The problem isn't that the shutdown process takes more than 10 seconds, it's that the shutdown process isn't working.

Under the assumption that a clean shutdown never takes more than one second, you'd still need to hold the button down for 12 seconds, because you can't trigger a shutdown anyway.

reply
First of all you are comparing very different OSes with very different behaviours under the boot. You can't translate how it goes in one OS to another one.[0]

Also, "10 seconds" are clearly related to the laptops because they don't have the proper power button and need both the "ACPI shutdown" and "Force power-off". The latter should be controlled by the BMC but considering this is a tablet...

And to clarify:

> This is how I understand it: Windows now gets a signal whenever the user holds the power button

in the TFA is exactly the ACPI shutdown signal received by the OS from BMC.

Now:

> What is the Windows machine doing now that it didn't do before that it cannot accomplish in the timeframe it's had for a very long time?

Well, considering this is happening at the attempt to force a power-off then I can suggest this:

- there were enough edge cases when the user needed to perform a forced power-off

- quite unsurprisingly there not a lot of things still working when the shutdown sequence already initiated

- there was some addition telemetry added to capture these edge cases but the forced power-off prevented the capture of the data would could help to diagnose the issue => plead was added

And the things aren't fast because:

- the last thing you want to do when you are writing the telemetry at the shutdown is to mess up the filesystem, up to the unusable state => so you do write it with the write caching turned off. This is slow even on SSD, just check it

- (maybe, I don't know) this is a bit more than just a 'memory dump' so the system actually runs some tests - these take time despite all the bazillions of IOPS in tehe normal operations environment

So you have at least:

- the half of the OS aren't running - it's shutdown sequence

- things aren't right in the first place - that's why the user is holding the power button!

- things aren't fast because you don't want them to get even worse

- last, but not least: at least previously there were the Surface tablets with the eMMC. These are slow.

Now add the last ingredient to the mix: Average Joe who doesn't understand shit. He doesn't care about 'write buffers aren't flushed', he only notices the files he wrote to a thumbdrive aren't there - and blames the OS, Gates personally and whoever else - but not himself. Capisce?

[0] even more amusing what you are thinking what Linux is just good and fast OS. I have a lot of different servers running different distros and versions - and most of them aren't shutting down fast nor even try to.

reply
>even more amusing what you are thinking what Linux is just good and fast OS.

That's my experience even using Ubuntu; on my hardware it takes about twice as long for Win11 to boot as for Kubuntu 26.04, and about five times as long to shutdown (normal shutdown; updates take forever).

Sometimes Windows decides after a while doing it's shutdown that it doesn't want to and pops a dialog (eg that another user is logged on {they aren't, it's a bug}). If you already left the room then it's just going to stay on until the next day.

Kubuntu has had slow boot before, but it gives you simple tools to see what it's doing, it's not obfuscating telemetry nor keeping programs running that you don't want.

When I say startup, I mean to the login prompt - going from login to desktop takes ages on Win 11 too, and it doesn't load up the previous application states/positions so you still have that to do. Then when you do load an app, eg Outlook, it tries to use the network before it is ready, claims it can't authenticate (it's right, but...) and messes up the session.

Sorry, I'm moaning. Essentially I'm surprised you don't find Windows slow.

reply
> Average Joe who doesn't understand shit. He doesn't care about 'write buffers aren't flushed', he only notices the files he wrote to a thumbdrive aren't there - and blames the OS, Gates personally and whoever else - but not himself

Why should he blame himself for poorly designed systems and user interfaces? Why should he not expect Windows to eject a USB drive quickly when it doesn't even bother to communicate the reason it takes longer?

We shouldn't blame users who still somehow manage to have standards instead of silently accepting that computers are simply always broken.

And would it really be so catastrophically bad if the OS just flushed the buffers right after the file copy operation? Would it be that much worse than potential data loss?

reply
> And would it really be so catastrophically bad if the OS just flushed the buffers right after the file copy operation? Would it be that much worse than potential data loss?

For writes to USB drives, that's a pretty good plan. But for general purposes, most file writes are followed by other, related, file writes, and buffering them can end up putting less strain on hardware since you'll be able to batch writes that went to similar disk areas. So flushing buffers immediately (which is not quite the same as not having buffers at all but comes pretty close) does have a real cost. It's not the obviously correct answer in all cases.

reply
Sounds like an on-access situation “antivirus” is famous for
reply