Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The problem is that it takes minutes to transfer data to the stick and only seconds to transfer data from the stick. I know it takes longer to write data than it does to read, however, I don 't understand why it takes 3 seconds to copy the data off the stick and 3.5 minutes to copy it back to the stick.
I have Kernel 2.4.22-1.2194.nptl, runing on Redhat 9
I am using KDE 3.1.
I have a few other issues, however one at a time ;-)
The first thing to look at would be that the
device is a) actually plugged into a USB 2.0
port on the comp, and b) which drivers RH has
loaded for the chipset.
Can you post the output of lsmod?
It seems a bit odd, though, that the process is
so different for reading and writing. Have a look
at /var/log/messages and /var/log/debug as well.
I have an NEC USB 2.0 card as well as the onboard usb which is 1.0
I have the stick plugged into the NEC card. I have disabled the onboard usb.
I have read lots of information on lots of sites and they have been sketchy at best, everyone seems to have their own opinion, and very little facts. They seem to explain the capabilities,however not the actual meat and potatoes. I am missing something here, it could be the way the driver is being loaded.
Jetflash was not even suppose to work according to some people, I jus never gave up. After two weeks I almost did, and then realized something after using a windows box. The damn stick had an identity crisis, USB HD or USB Zip disk. I have looked at the log messages, jus a couple of errors, nothging too serious.
Here she is
______________________________________________________________________
LSMOD
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: JetFlash Model: TS128MJF2L Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
sda: Unit Not Ready, sense:
Current 00:00: sense key Unit Attention
Additional sense indicates Not ready to ready change,medium may have changed
SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
sda: sda1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
USB Mass Storage support registered.
usb.c: USB disconnect on device 00:09.2-3 address 4
usb.c: deregistering driver usb-storage
scsi : 1 host left.
hub.c: new USB device 00:09.2-3, assigned address 5
usb.c: USB device 5 (vend/prod 0xea0/0x2168) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: JetFlash Model: TS128MJF2L Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
sda: Unit Not Ready, sense:
Current 00:00: sense key Unit Attention
Additional sense indicates Not ready to ready change,medium may have changed
SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
sda: sda1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 5
USB Mass Storage support registered.
Unplug the pen, unload usb-uhci, usb-ohci and ehci-hcd
Re-load ehci-hcd.
Plug the pen back in and try again :)
Often USB chipsets will "respond proper" to
either ehci-hcd or or usb-ohci, and if the ohci
get's the jack-pot the transfer speed is bound to
be low ...
It isn 't having a problem picking the right driver, it is just having a low throughput. the rate of transfer to the stick is about 250k/s and at other times it will work at higher. I have noticed this with smaller files, it is the larger files that it is having an issue with. Getting the information from the stick is not a problem, it is lightening fast. It is when I transfer data to the stick. I have upto thirty sticks to load; they take 3.5 min to load each.
The file system I am using on the pendrive is ext2, it has to be this in order to be compatible with the equipment I am using
My USB 2.0 card is an NEC 3100LP, I don 't think the system is loading the right drivers for it, because Linux is not even displaying the right vendor and product id's
when you copy files from the usb stick is the light coming on? When Linux loads usb storage devices it likes to read everything on them and put them into cache, which would explain the really fast read times and the slow write times. I too get fast read times and really slow read times. Just something to think about.
tleadley, I just bought a Transcend JetFlash 2GB and I'm having the same problem.
Have you found any solution this?
Write speeds are incredibly slow and read speeds are normal for a USB 2.0 device.
Any help would be enjoyed. (Waiting 15+ minutes to copy 500mb from HD to Pendrive is a bit weird...)
Thanks,
k;
At the time I did this post I was doing everything throught the gui, which tends to slow this down a tremendous amount. Number two a flash device when it writes information it will take upto three times a long to write depending on factures of your PC's hd speed and bus throughput. Do not use sync with your usb device, otherwise that will slow you down even more.
this is what I do.
I copy everything using the command line interface
I never use the sync switch when I mount a device when I am finished copying I unmount the device.
50 M should take about 15 to 20 seconds using USB 2, upto 90 seconds using USB 1.1
At the time I did this post I was doing everything throught the gui, which tends to slow this down a tremendous amount. Number two a flash device when it writes information it will take upto three times a long to write depending on factures of your PC's hd speed and bus throughput. Do not use sync with your usb device, otherwise that will slow you down even more.
this is what I do.
I copy everything using the command line interface
I never use the sync switch when I mount a device when I am finished copying I unmount the device.
50 M should take about 15 to 20 seconds using USB 2, upto 90 seconds using USB 1.1
I already do every file management through command line, and rarely use a file manager, like Konqueror, but the write speed still is _TOO_ slow.
I did not tried the "async" option at mount, I'm gonna try. But on the PCs I have not administrator privileges (like at university) I can't to much about this...
This is normal for a flash drive. The reason why has to do with the way the technology works. The speed of the memory is only fast for reading but slow for writeing this is why its not used as ram in computers. There is unfortunatly no way to fix it as it is a technology limitation and not anything to do with drivers or whatnot.
Hm, I've read this and other similar threads with great interest ... I am still quite puzzled.
It may be true that flash drives are just slow, but can anyone explain what's going on here?
I wanted to transfer ogg encoded music files on my mp3/ogg player. I did use the GUI, and yes, I also used Konqueror. The download "speed" started at an incredible 150kB/s and slowed down to 40-60kB/s over the next five minutes or so. With still about 50% to go I cancelled.
To see if there is anything wrong with my flash player I plugged it into my old Windows 2000 laptop, set up a Samba share and dragged the same music files in Konqueror from my linux hard drive window to the samba share/player window to transfer the files over my network. The whole thing transferred at 1.5-2MB/s and was done in seconds rather than minutes.
Now 2MB/s may still be slow but it's at least a ten-fold improvement and it shows that it is not the flash drive as such but there seems to be a problem with Linux and flash drives. I guess I need to figure out how to do the ehci-hcd/usb-ohci thing that Tinkster suggests above.
Any other suggestions are appreciated too.
I tried copying data in an Windows environment, directly to my JetFlash pendrive, but the write speed is as slow as in Linux. I think the problem is not the Operating System but the hardware itself.
I had exactly the same problem with my trekstor vibez, write throughput was as slow as 56 kB/s. But I mounted the device with the 'sync' option. Mounting it without this option gives way better results. The corresponding line in my fstab looks like this (note that async is the default):
/dev/sda /media/vibez auto user,noauto 0 0
So now
% time cp ubuntu-6.06.1-alternate-i386.iso && time umount /media/vibez
takes together 144 seconds, which makes a transfer rate of ~ 5000 kB/s (!)
[...]But I mounted the device with the 'sync' option. Mounting it without this option gives way better results.[...]
Good for you! I have slow transfer rates of about 300-400 kB/s with my A-Data USB2.0 Flash Disk-RB1 and I'm not mounting it with the sync option. Interestingly, when I start typing on the USB keyboard or moving the USB mouse, CPU load jumps to 100%, about 50% of that being system load. Collisions on the USB bus?
The read speed is all right, about 10-15 MB/s.
The worst part of the story is that writing data to the pendrive is much faster on Windows XP, I get transfer rates of about 3-4 MB/s. However, when I try the same from a Windows XP running under VMWare, I get the same slow speeds (300-400 kB/s) as on Linux.
I know my kernel is rather old (2.6.7) but I have little control of it since this is a company laptop.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.