3 ms·
> The first sync might take extra long (say 30s) because there could be tons of stuff unsynced. that would have to be an awful lot of data, or a very slow dri
by zabzonk 3y ago
> The first sync might take extra long (say 30s) because there could be tons of stuff unsynced.
that would have to be an awful lot of data, or a very slow drive, perhaps a floppy?
your other assumptions are sensible, to an extent. but way back when, we typically had a script that sent a message to all ttys saying "system going down in 30 seconds, please log off" - in fact ALL the other systems i used back then (Dec10, VAX, IBM 4381) did this before the sync (or whatever they did).
- jandrese 3y agoI’ve seen extreme sync times when writing large files to an old slow USB thumb drive. Often you will see the first part of the copy run at full USB speed but then it slows to a crawl. Then the unmount (which does a sync) pays back that initial burst of speed. I’ve seen it take more than 5 minutes (a kernel warning about the slow sync appears in dmesg after 300 seconds IIRC).
- mike_hock 3y agoDon't you have any shitty ass USB sticks that only do ~6MB/s writes? 180MB worth of dirty pages is nothing.
- bayindirh 3y agoOnly 6MB/sec? That would be lightning fast when I first started to use USB flash drives. I have used USB 1.1 drives which are rated a mind boggling ~900kB/sec sustained transfer speeds. Good Kingstons did 5MB/sec, top of the line ones did 11MB/sec.
- rektide 3y agoIn any production machine, I would strive very much to avoid this circumstance, yes. Better tune your system. Either allow less dirty data in the first place (dirty_background_ratio defaults to 15% of memory... even if you have 2TB of ram) or lower your dirty_writeback_centisecs so not as many seconds of dirty writes get buffered if this happening, pretty please. My example used more illustrative than real numbers. Still, 10s seems not totally uncommon, which is only 3x off.