On weird fact of dd detail 24 May 2023, 04:26:29 Apologize if it'd be too meticulous getting to know few Linux works but cant helpHow is dd utility copying in some HW / SW condition at least here, copied 3.5 GB onto Usb disk with OS give freed 7 GB memory, its process speed decreases by a significant amount fromstart ~70 MB/s to ~ 41 MB/s in a minutethen to ~27 MB/s in another minute till to ~13.7 MB/s after 4 minutes from startthen remain so till the end, all complete in ~6 minhow can we set or beef it up to do all more efficiently to drop just by slight number ?
Re: On weird fact of dd detail Reply #1 – 24 May 2023, 09:25:49 That's because of caching, unfortunately there are many such levels, one in your case being dirty/writeback memory (which you can limit to maybe get a more constant speed, but it does that for the whole system which is detrimental overall), and among the others being at controller level (where there is nothing you can do).Paradoxically I found that a fast usb3.0 drive that does writes at more than 50 MB/s has a much more constant apparent write speed than slow low end ones.To get your real speed you can always consult iotop, section "Actual DISK WRITE". 1 Likes
Re: On weird fact of dd detail Reply #2 – 25 May 2023, 11:53:40 Will likely adding following linesvm.dirty_background_ratio = 5vm.dirty_ratio = 10into /etc/sysctl.confwork as found, done by a 'Ubuntu guy' ?
Re: On weird fact of dd detail Reply #3 – 25 May 2023, 19:05:39 Flash media (SSDs included) are equipped with a micro-controller/processor and a certain amount of cache memory. The controller, well, controls the read/write operations, reallocates failing cells etc; it uses the internal cache to hold data while they're written on the flash memory.So, in the beginning, the reported speed is high but as the operation progresses and the buffer is saturated, it drops to the real medium's capability. This is called sustained write speed and the true measurement of the disk's speed (flash media aren't actually 'disks', but you get my meaning).For small files the writes appear very fast; for continuous large file writes only the top-silicon drives live up to their advertised speeds. 2 Likes
Re: On weird fact of dd detail Reply #4 – 25 May 2023, 20:52:51 I have a PTP camera, to transfer files by USB cable it needs the package gvfs-gphoto2. You plug it in and turn it on and it gets mounted, then I can open that dir in caja, copy all the pictures and movies, then open another directory and paste them in. It gives a time estimation of several hours which increases as the transfer proceeds, the progress bar barely moves, but that's completely wrong and bears no relation whatsoever to reality, actually it's very quick to complete transfer, not noticeably different to physically removing the SD card and plugging it in directly.You also have to be careful with cp, sometimes if a file is already in RAM it might return the cursor very fast but then you should run sync and that might take a lot longer because the data has only been cached ready to write to an external drive but not actually written to it yet. 1 Likes