Copy files to usb (slow)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Copy files to usb (slow)

George
Hello.
Im trying to copy files from my laptop to a usb stick.
The speed varies between 300kB/sec and 400kB/sec. Its really slow.
my fstab is

ef1bca26af91f0cd.b none swap sw
ef1bca26af91f0cd.a / ffs rw,softdep 1 1
ef1bca26af91f0cd.k /home ffs rw,softdep,nodev,nosuid 1 2
ef1bca26af91f0cd.d /tmp ffs rw,softdep,nodev,nosuid 1 2
ef1bca26af91f0cd.f /usr ffs rw,softdep,nodev 1 2
ef1bca26af91f0cd.g /usr/X11R6 ffs rw,softdep,nodev 1 2
ef1bca26af91f0cd.h /usr/local ffs rw,softdep,wxallowed,nodev 1 2
ef1bca26af91f0cd.j /usr/obj ffs rw,softdep,nodev,nosuid 1 2
ef1bca26af91f0cd.i /usr/src ffs rw,softdep,nodev,nosuid 1 2
ef1bca26af91f0cd.e /var ffs rw,softdep,nodev,nosuid 1 2
/dev/sd2i /mnt/usb msdos rw,noauto 0 0
/dev/cd0a /mnt/cdrom  cd9660 ro,noauto 0 0

dmesg is


$ dmesg
OpenBSD 6.0-stable (GENERIC.MP) #1: Sun Jan 29 16:16:31 EET 2017
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
RTC BIOS diagnostic error 80<clock_battery>
real mem = 8474267648 (8081MB)
avail mem = 8212963328 (7832MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xe6dc0 (71 entries)
bios0: vendor LENOVO version "0XCN23WW" date 03/21/2016
bios0: LENOVO 80SR
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP TCPA UEFI UEFI SSDT SSDT TPM2 MSDM SSDT DBGP
DBG2 ASF! ASPT BOOT DBGP HPET LPIT APIC MCFG SSDT SSDT SSDT SSDT DMAR FPDT
acpi0: wakeup devices GLAN(S3) XHC_(S3) XDCI(S4) HDAS(S3) PXSX(S3)
RP01(S3) PXSX(S3) RP02(S3) PXSX(S3) RP03(S3) PXSX(S3) RP04(S3) PXSX(S3)
RP05(S3) PXSX(S3) RP06(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 23999999 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz, 2395.19 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz, 2394.44 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz, 2394.44 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz, 2394.44 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (RP01)
acpiprt2 at acpi0: bus -1 (RP02)
acpiprt3 at acpi0: bus -1 (RP03)
acpiprt4 at acpi0: bus -1 (RP04)
acpiprt5 at acpi0: bus 1 (RP05)
acpiprt6 at acpi0: bus 2 (RP06)
acpiprt7 at acpi0: bus -1 (RP07)
acpiprt8 at acpi0: bus -1 (RP08)
acpiprt9 at acpi0: bus -1 (RP09)
acpiprt10 at acpi0: bus -1 (RP10)
acpiprt11 at acpi0: bus -1 (RP11)
acpiprt12 at acpi0: bus -1 (RP12)
acpiprt13 at acpi0: bus -1 (RP13)
acpiprt14 at acpi0: bus -1 (RP14)
acpiprt15 at acpi0: bus -1 (RP15)
acpiprt16 at acpi0: bus -1 (RP16)
acpiprt17 at acpi0: bus -1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpibat0 at acpi0: BAT0 model "L15M2PB5" serial  4971 type LiP oem "SMP"
"VPC2004" at acpi0 not configured
"INT3F0D" at acpi0 not configured
"MSFT0001" at acpi0 not configured
"SYN2B59" at acpi0 not configured
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
"PNP0C14" at acpi0 not configured
"MSFT0101" at acpi0 not configured
"INT340E" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 2395 MHz: speeds: 2501, 2500, 2400, 2300, 2100,
2000, 1800, 1700, 1500, 1300, 1200, 1000, 800, 700, 600, 400 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 6G Host" rev 0x08
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 520" rev 0x07
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x21: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
pchtemp0 at pci0 dev 20 function 2 "Intel 100 Series Thermal" rev 0x21
"Intel 100 Series MEI" rev 0x21 at pci0 dev 22 function 0 not configured
ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x21: msi,
AHCI 1.3.1
ahci0: port 0: 6.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG MZYLN256, EMT6> SCSI3
0/direct fixed naa.5002538d00000000
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
cd0 at scsibus1 targ 1 lun 0: <HL-DT-ST, DVDRAM GUE0N, T.02> ATAPI
5/cdrom removable
ppb0 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci1 at ppb0 bus 1
re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x10: RTL8168GU/8111GU
(0x5080), msi, address 50:7b:9d:f4:e3:3c
rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0
ppb1 at pci0 dev 28 function 5 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 2
iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 3165" rev
0x99, msi
pcib0 at pci0 dev 31 function 0 "Intel 100 Series LPC" rev 0x21
"Intel 100 Series PMC" rev 0x21 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 100 Series HD Audio" rev 0x21: msi
azalia0: codecs: Conexant/0x510f, Intel/0x2809, using Conexant/0x510f
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x21:
apic 2 int 16
iic0 at ichiic0
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 8.1
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uhidev0 at uhub0 port 1 configuration 1 interface 0 "Microsoft USB
Optical Mouse" rev 2.00/2.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
uvideo0 at uhub0 port 4 configuration 1 interface 0 "K3BG6I41V
EasyCamera" rev 2.00/0.06 addr 3
video0 at uvideo0
ugen0 at uhub0 port 5 "Generic USB2.0-CRW" rev 2.00/39.60 addr 4
ugen1 at uhub0 port 7 "Intel product 0x0a2a" rev 2.01/0.01 addr 5
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
sd1: 244190MB, 512 bytes/sector, 500102858 sectors
root on sd1a (ef1bca26af91f0cd.a) swap on sd1b dump on sd1b
iwm0: hw rev 0x210, fw ver 16.242414.0, address b8:81:98:61:f6:61
umass0 at uhub0 port 2 configuration 1 interface 0 "Kingston
DataTraveler 2.0" rev 2.00/1.10 addr 6
umass0: using SCSI over Bulk-Only
scsibus4 at umass0: 2 targets, initiator 0
sd2 at scsibus4 targ 1 lun 0: <Kingston, DataTraveler 2.0, PMAP> SCSI4
0/direct removable serial.09306545BFA069478E0A
sd2: 14766MB, 512 bytes/sector, 30240768 sectors
thunderbird(60903): mmap W^X violation
$



Thanks in advance

Reply | Threaded
Open this post in threaded view
|

Re: Copy files to usb (slow)

temp+101
G <[hidden email]> wrotes:
>Hello.
>Im trying to copy files from my laptop to a usb stick.
>The speed varies between 300kB/sec and 400kB/sec. Its really slow.

I also have the same problem.
It seems that block files are slow and it is not possible to mount raw
files.
I tested it with dd(1) and found that fastest way to transfer data is
using raw devices:

# dd if=/dev/rsd1c of=temp.fs bs=1m
# vnconfig vnd0 temp.fs
# mount /dev/vnd0i /mnt/usb
# ... do copy ...
# umount /mnt/usb
# vnconfig -u vnd0
# dd if=temp.fs of=/dev/rsd1c bs=1m

Reply | Threaded
Open this post in threaded view
|

Re: Copy files to usb (slow)

edward wandasiewicz
From your dmesg, your machine has USB 3.0 hardware ports

usb0 at xhci0: USB revision 3.0

and you're using a USB 2.0 flash drive - rev 2.00/1.10

umass0 at uhub0 port 2 configuration 1 interface 0 "Kingston
DataTraveler 2.0" rev 2.00/1.10 addr 6

You could upgrade to a USB 3.0 flash drive.

On USB 3.0 hardware port with a USB 3.0 flash drive ( not an SSD ), with a

MSDOS file system, I get about 2.5 MB/s

4.2BSD file system, I get about 7 MB/s

with rsync --info=progress2 ./SOURCE/ /DEST transferring a single 1GB file.

Attempting to dd an image, I get about 20 MB/s

# dd if=img bs=1m | pv -s 16GB | dd of=/dev/rsd1c bs=1m

On Sun, Jan 29, 2017 at 6:57 PM, Ali Farzanrad <[hidden email]> wrote:

> G <[hidden email]> wrotes:
>>Hello.
>>Im trying to copy files from my laptop to a usb stick.
>>The speed varies between 300kB/sec and 400kB/sec. Its really slow.
>
> I also have the same problem.
> It seems that block files are slow and it is not possible to mount raw
> files.
> I tested it with dd(1) and found that fastest way to transfer data is
> using raw devices:
>
> # dd if=/dev/rsd1c of=temp.fs bs=1m
> # vnconfig vnd0 temp.fs
> # mount /dev/vnd0i /mnt/usb
> # ... do copy ...
> # umount /mnt/usb
> # vnconfig -u vnd0
> # dd if=temp.fs of=/dev/rsd1c bs=1m

Reply | Threaded
Open this post in threaded view
|

Re: Copy files to usb (slow)

George
Thanks.
I used a 3.0 usb stick(msdos) and i get 6.6mb/sec.
I guess its ok.
thanks for your answer.


On 01/29/17 23:31, edward wandasiewicz wrote:

> From your dmesg, your machine has USB 3.0 hardware ports
>
> usb0 at xhci0: USB revision 3.0
>
> and you're using a USB 2.0 flash drive - rev 2.00/1.10
>
> umass0 at uhub0 port 2 configuration 1 interface 0 "Kingston
> DataTraveler 2.0" rev 2.00/1.10 addr 6
>
> You could upgrade to a USB 3.0 flash drive.
>
> On USB 3.0 hardware port with a USB 3.0 flash drive ( not an SSD ), with a
>
> MSDOS file system, I get about 2.5 MB/s
>
> 4.2BSD file system, I get about 7 MB/s
>
> with rsync --info=progress2 ./SOURCE/ /DEST transferring a single 1GB file.
>
> Attempting to dd an image, I get about 20 MB/s
>
> # dd if=img bs=1m | pv -s 16GB | dd of=/dev/rsd1c bs=1m
>
> On Sun, Jan 29, 2017 at 6:57 PM, Ali Farzanrad <[hidden email]> wrote:
>> G <[hidden email]> wrotes:
>>> Hello.
>>> Im trying to copy files from my laptop to a usb stick.
>>> The speed varies between 300kB/sec and 400kB/sec. Its really slow.
>>
>> I also have the same problem.
>> It seems that block files are slow and it is not possible to mount raw
>> files.
>> I tested it with dd(1) and found that fastest way to transfer data is
>> using raw devices:
>>
>> # dd if=/dev/rsd1c of=temp.fs bs=1m
>> # vnconfig vnd0 temp.fs
>> # mount /dev/vnd0i /mnt/usb
>> # ... do copy ...
>> # umount /mnt/usb
>> # vnconfig -u vnd0
>> # dd if=temp.fs of=/dev/rsd1c bs=1m