Sujet : Re: Move bookworm system from SSD to NVME
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.sys.raspberry-piDate : 03. Aug 2024, 10:02:07
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwvsevmvv1s.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
The Natural Philosopher <
tnp@invalid.invalid> writes:
On 02/08/2024 15:03, Björn Lundin wrote:
dd'ing 500 Gb to an ssd disk, I've seen sync taking 30 s or more
and sync is of course started AFTER dd is done
So - how do you know it is done its internal business?
Not all drives have blinking LEDs
sync makes it easy to know
Even sync may not be enough.
SSDS/NVM have their own internal caching.
The sync syscall (and command) will flush those too.
Unless you’ve paid extra for a drive with a huge cache I would expect
the extra delay while the on-drive cache is flushed to be absolutely
tiny in human terms, and certainly tiny compared to flushing the OS’s
cache, which can be multiple gigabytes.
References:
*
https://www.kernel.org/doc/Documentation/block/writeback_cache_control.txt*
https://linux.die.net/man/2/sync*
https://github.com/torvalds/linux/blob/master/fs/sync.c#L87-- https://www.greenend.org.uk/rjk/