Unofficial Hacker News companion — get notified on comment replies, and more.

"This message has been on the screen for almost two hours now." (opens external site)

340 points by firloop 4 days ago | unsung.aresluna.org | 226 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (4)

  1. > 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?

    Replies (2)
    1. > 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.

    2. > 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?

      I would just point to a comment I made just recently[0]

      > And would it really be so catastrophically bad if the OS just flushed the buffers right after the file copy operation

      Yes. You vastly overestimate the speed of the USB storage. Even now you can buy a drive which is fancy-shmancy and have a Type-C connector and still be a slow USB2.0 device. The flash in is of course slow as hell because you don't need a fast one with 2.0.

      Now, USB operations are serial and half-duplex for 2.0 - and this is not a problem if you writing a single small file. This is not even a problem if this is a single big file - you would just need to wait. But if you are writing a multitude of small files on a slow USB storage over a slow USB version without caching - you can literally go make a cup of tea/coffee, drink it, get back only to find what you still somewhere at the first 20%.

      If you are using Windows when just plug a thumbdrive, open devmgmt.msc, disable caching for the drive and copy ~1000 small files on it.

      [0] https://news.ycombinator.com/item?id=50609695

      Replies (1)
      1. I did not say writing without caching, I meant flushing the cache after the entire file copying operation finished for all files the user had selected. Is it necessary to make every user always click on "safely remove drive" when you can just do that automatically? And if the user still copies another couple files then that's just the same as freshly plugging in the drive again.

        Regarding your recently made comment...

        > Make the interface for an idiot and the universe would make an even bigger idiot

        Make an idiotic interface design and your users will look like idiots.