When I do something like:
dd if='fedora.iso' of=/dev/sdb status=progress
I only get around 6 megabytes per second on a USB 2 Sandisk Cruzer Blade flashdrive (store bought, not fleabay) plugged directly into a motherboard's USB 3 port - one that's not sharing its host with any other ports in use.
Surely it should be going a lot faster?
When plugged in, dmesg shows this for the drive:
[337595.365826] usb 1-4: new high-speed USB device number 24 using xhci_hcd [337595.489415] usb 1-4: New USB device found, idVendor=0781, idProduct=5567, bcdDevice= 1.00 [337595.489426] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [337595.489433] usb 1-4: Product: Cruzer Blade [337595.489439] usb 1-4: Manufacturer: SanDisk [337595.489445] usb 1-4: SerialNumber: 00007014102520061826 [337595.557718] usb-storage 1-4:1.0: USB Mass Storage device detected [337595.557933] scsi host6: usb-storage 1-4:1.0 [337595.557995] usbcore: registered new interface driver usb-storage [337595.560673] usbcore: registered new interface driver uas [337596.561807] scsi 6:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 6 [337596.562686] sd 6:0:0:0: Attached scsi generic sg2 type 0 [337596.563276] sd 6:0:0:0: [sdb] 60088320 512-byte logical blocks: (30.7 GB/28.6 GiB) [337596.564047] sd 6:0:0:0: [sdb] Write Protect is off [337596.564057] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00 [337596.564305] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [337596.584964] sdb: sdb1 [337596.586991] sd 6:0:0:0: [sdb] Attached SCSI removable disk [337609.674186] usb 1-11: USB disconnect, device number 19
On 14/03/2021 21.00, Tim via users wrote:
When I do something like:
dd if='fedora.iso' of=/dev/sdb status=progress
I only get around 6 megabytes per second on a USB 2 Sandisk Cruzer Blade flashdrive (store bought, not fleabay) plugged directly into a motherboard's USB 3 port - one that's not sharing its host with any other ports in use.
Surely it should be going a lot faster?
Not in my experience, this is what one often gets with many USB2 disks. They go much faster reading from USB.
When plugged in, dmesg shows this for the drive:
[337595.365826] usb 1-4: new high-speed USB device number 24 using xhci_hcd [337595.489415] usb 1-4: New USB device found, idVendor=0781, idProduct=5567, bcdDevice= 1.00 [337595.489426] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [337595.489433] usb 1-4: Product: Cruzer Blade [337595.489439] usb 1-4: Manufacturer: SanDisk [337595.489445] usb 1-4: SerialNumber: 00007014102520061826 [337595.557718] usb-storage 1-4:1.0: USB Mass Storage device detected [337595.557933] scsi host6: usb-storage 1-4:1.0 [337595.557995] usbcore: registered new interface driver usb-storage [337595.560673] usbcore: registered new interface driver uas [337596.561807] scsi 6:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 6 [337596.562686] sd 6:0:0:0: Attached scsi generic sg2 type 0 [337596.563276] sd 6:0:0:0: [sdb] 60088320 512-byte logical blocks: (30.7 GB/28.6 GiB) [337596.564047] sd 6:0:0:0: [sdb] Write Protect is off [337596.564057] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00 [337596.564305] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [337596.584964] sdb: sdb1 [337596.586991] sd 6:0:0:0: [sdb] Attached SCSI removable disk [337609.674186] usb 1-11: USB disconnect, device number 19
On 14/03/2021 18:00, Tim via users wrote:
dd if='fedora.iso' of=/dev/sdb status=progress
I only get around 6 megabytes per second on a USB 2 Sandisk Cruzer Blade flashdrive (store bought, not fleabay) plugged directly into a motherboard's USB 3 port - one that's not sharing its host with any other ports in use.
Do you get better perfomance if you use a larger block size?
Using USB3 and the default block size I get about 12.6 MB/s
Changing to bs=65536 I get overall 93.5 MB/s on a 2.1 GB iso transfer.
On 2021-03-14 7:05 a.m., Ed Greshko wrote:
On 14/03/2021 18:00, Tim via users wrote:
dd if='fedora.iso' of=/dev/sdb status=progress
I only get around 6 megabytes per second on a USB 2 Sandisk Cruzer Blade flashdrive (store bought, not fleabay) plugged directly into a motherboard's USB 3 port - one that's not sharing its host with any other ports in use.
Do you get better perfomance if you use a larger block size?
Using USB3 and the default block size I get about 12.6 MB/s
Changing to bs=65536 I get overall 93.5 MB/s on a 2.1 GB iso transfer.
I've gotten into the habit of using bs=4M (matches the extent size of most LVM backing devices, so md5sum'ing the source and destination is more reliably useful).
Writing to flash has more to do with how the flash firmware works. To write to flash a full block needs to be erased and then you can write to it. Some firmware/devices keep free already zero'ed blocks and those can be written to fast but once those run out then it has to erase before writes. The more expensive ones can erase faster and/or keep more zero'ed blocks in reserve.
When shopping for them, the better manufactures will give you both read and write speeds because of this. If yours did not have a speed listed then I would assume it is slow.
On Sun, Mar 14, 2021 at 6:06 AM Ed Greshko ed.greshko@greshko.com wrote:
On 14/03/2021 18:00, Tim via users wrote:
dd if='fedora.iso' of=/dev/sdb status=progress
I only get around 6 megabytes per second on a USB 2 Sandisk Cruzer Blade flashdrive (store bought, not fleabay) plugged directly into a motherboard's USB 3 port - one that's not sharing its host with any other ports in use.
Do you get better perfomance if you use a larger block size?
Using USB3 and the default block size I get about 12.6 MB/s
Changing to bs=65536 I get overall 93.5 MB/s on a 2.1 GB iso transfer.
-- People who believe they don't make mistakes have already made one.
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
On Mon, Mar 15, 2021 at 12:45 AM Samuel Sieb samuel@sieb.net wrote:
On 3/14/21 4:05 AM, Ed Greshko wrote:
Changing to bs=65536 I get overall 93.5 MB/s on a 2.1 GB iso transfer.
Just a suggestion that using bs=64K might be easier to remember and type, although I usually use at least bs=1M.
A hack that works sometimes
$ renice -n -18 -p $(pgrep usb-storage) $ renice -n -18 -p $(pgrep dd) $ ionice -c 2 -n 2 -p $(pgrep usb-storage) $ ionice -c 2 -n 2 -p $(pgrep dd)
--- Lee
When I do something like:
dd if='fedora.iso' of=/dev/sdb status=progress
I only get around 6 megabytes per second on a USB 2 Sandisk Cruzer Blade flashdrive (store bought, not fleabay) plugged directly into a motherboard's USB 3 port - one that's not sharing its host with any other ports in use.
Surely it should be going a lot faster?
...
AFAIK, flashdrives operates the same as ssd's. while SSD's and pricey flashdrive (e.g. Sandisk Extreme) support the trim command to erase occupied space the sheaper flashdrives do not support trim, what means they get slower over time. deleted contents still remains on that flashdrives what means writing new data leads to an erase/write cycle.
*I* long (not quick) format those slow flashdrives under windows. - I currently don't know if the gnome disk has an equivalent for "long format", I guess it's the "fill with zero's thing" -
On 3/16/21 6:32 AM, elder sixpack13 wrote:
AFAIK, flashdrives operates the same as ssd's. while SSD's and pricey flashdrive (e.g. Sandisk Extreme) support the trim command to erase occupied space the sheaper flashdrives do not support trim, what means they get slower over time. deleted contents still remains on that flashdrives what means writing new data leads to an erase/write cycle.
*I* long (not quick) format those slow flashdrives under windows.
- I currently don't know if the gnome disk has an equivalent for "long format", I guess it's the "fill with zero's thing" -
How would that help? You've now made sure that the entire storage has valid data that will need to be erased on a write. And you've also used one write cycle for the entire storage.