Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
usb2 storage: Speed issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
eronde
n00b
n00b


Joined: 25 Dec 2004
Posts: 73
Location: The Netherlands

PostPosted: Fri Feb 22, 2013 7:53 pm    Post subject: usb2 storage: Speed issue Reply with quote

Hello,

I've a problem with correct writing on an usb device and I've really no idea how to solve it.

Problem:

When I write files to an usb2 device the first 2.2gigs goes with an average speed of 60mb/s, but after that it slows down to a speed of 5mb/s. I've already to format the drive to ntfs/ext4/xfs, but with the same result.

I've also tried to build the xhci_hcd module as Module and as buildin kernel module.

Adding pci=routeirq doesn't works also.

What can I do:

Kernel: gentoo-source-3.7.7
Code:

lsmod
Module                  Size  Used by
fuse                   56670  2
nfsd                   67759  11
lockd                  52874  1 nfsd
sunrpc                144124  19 nfsd,lockd
hwmon_vid               1957  0
ipt_REJECT              2034  0
xt_limit                1671  0
xt_tcpudp               2240  0
xt_conntrack            2746  0
ipv6                  225886  52
iptable_filter          1305  0
iptable_mangle          1401  0
iptable_nat             2391  0
nf_conntrack_ipv4      10872  1
nf_defrag_ipv4          1172  1 nf_conntrack_ipv4
nf_nat_ipv4             3065  1 iptable_nat
nf_nat                 11261  2 nf_nat_ipv4,iptable_nat
nf_conntrack           52352  5 nf_nat,nf_nat_ipv4,xt_conntrack,iptable_nat,nf_conntrack_ipv4
ip_tables              13587  3 iptable_filter,iptable_mangle,iptable_nat
x_tables               14193  7 ip_tables,xt_tcpudp,xt_limit,xt_conntrack,iptable_filter,ipt_REJECT,iptable_mangle
usbhid                 22721  0
acpi_cpufreq            6303  1
mperf                   1068  1 acpi_cpufreq
pata_acpi               3060  0
usb_storage            51396  1
snd_hda_codec_realtek    50390  1
ohci_hcd               24917  0
freq_table              2147  1 acpi_cpufreq
radeon                716809  2
i2c_algo_bit            4472  1 radeon
drm_kms_helper         21207  1 radeon
snd_hda_intel          21861  5
kvm                   209721  0
ttm                    52609  1 radeon
snd_hda_codec          65046  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               5127  1 snd_hda_codec
r8169                  46293  0
drm                   187885  4 ttm,drm_kms_helper,radeon
asus_atk0110            7078  0
snd_pcm                58115  3 snd_hda_codec,snd_hda_intel
mii                     3412  1 r8169
pata_via                8285  0
snd_page_alloc          6155  2 snd_pcm,snd_hda_intel
backlight               3761  1 radeon
snd_timer              15472  2 snd_pcm
i2c_piix4               7520  0
snd                    47811  14 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_hda_codec,snd_hda_intel
processor              25996  1 acpi_cpufreq
pata_atiixp             4420  0
ehci_hcd               44378  0
i2c_core               16325  5 drm,i2c_piix4,drm_kms_helper,i2c_algo_bit,radeon
k10temp                 2675  0
thermal_sys            12945  1 processor
button                  4438  0
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32098
Location: 56N 3W

PostPosted: Fri Feb 22, 2013 8:08 pm    Post subject: Reply with quote

eronde,

You cannot write at 60Mb/sec over USB2. The bus cannot carry useful data even close to that speed.

The 60Mb sec for 2.2G comes from filling your RAM with 'dirty' buffers being queued for writing.
The 5Mb/sec is what the device is really capable of and is what you see once there is no more space in RAM for buffers.

You don't say what the device is but it sounds like a flash memory stick.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eronde
n00b
n00b


Joined: 25 Dec 2004
Posts: 73
Location: The Netherlands

PostPosted: Sat Feb 23, 2013 2:04 pm    Post subject: Reply with quote

Thnx for the replay.

It's a verbatim 64gig.


I also dit a dd:
Code:

 dd count=1k bs=1M if=/dev/zero of=/mnt/cdrom/test.img
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 6.8789 s, 156 MB/s


With dd it writes with 3.8mb/s.

I did the same test with pv and the result are almost the same.

Is this a correct speed to write on a flash drive?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32098
Location: 56N 3W

PostPosted: Sat Feb 23, 2013 3:30 pm    Post subject: Reply with quote

eronde,

Speed comes at a price. ... Actually two prices.

High speed flash memory cots more
High speed flash memory needs more power.

A USB device is limited by the power the USB bus can supply to 2.5w (500mA at 5v)
My new SSD, needs 10w. The difference between a USB flash stick and a SSD is the power available and how much you want to pay for speed.

5Mb/sec continuous write speed is OK for a USB2 stick.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eronde
n00b
n00b


Joined: 25 Dec 2004
Posts: 73
Location: The Netherlands

PostPosted: Sat Feb 23, 2013 3:38 pm    Post subject: Reply with quote

NeddySeagoon,

Thnx for the info, have a nice day.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum