1
lorentz
1y

Accidentally started mkfs.ntfs without --fast.

Is there a way to kill a program without waiting for writes to finish?

Comments
  • 4
  • 0
    @IntrusionCM Tried that, still in the process list minutes later. I'm not even convinced it actually stopped equeuing more zeros, considering how long it took to actually halt from this point.

    I tried to power off after, all that achieved was to get stuck for like 5 minutes in the systemd shutdown sequence instead of a relatively usable state.
  • 1
    @lorentz It probably told the kernel already to do it and waits now till the kernel finishes that. There is not much you can do about if kill doesn't work, even a shutdown could hang because of this.
  • 0
    @happygimp0 that's exactly what I mean. Shame there isn't a program for that, but I guess some limits policy could improve the situation.
  • 1
    @lorentz

    This is just an assumption and I could be wrong, but might want to take a look at
    https://kernel.org/doc/html/...

    sysctl vm.dirty*

    For modern systems with SSDs and NVMEs it makes sense to reduce the dirty_bytes buffer to e.g. 256 MB.

    The device is fast... This means that a process can write up to 256 MiB before the process starts writeback.

    This way, you prevent a process writing tons of gigabyte into memory...

    Which then - I guess - leads to the situation you mentioned here. The OS killed (kill -9) the process, but there were still gigabytes of memory left to write... So it took its sweet time getting shit done.
  • 0
    @IntrusionCM I'll try when I get home
Add Comment