LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   slow writing to flash drive (https://www.linuxquestions.org/questions/linux-newbie-8/slow-writing-to-flash-drive-398174/)

obstinatesod 12-31-2005 12:49 PM

slow writing to flash drive
 
Hi can anyone tell me why Suse 10 is so slow writing to my pen drive? it takes ages for a few MB's

BinJajer 12-31-2005 12:51 PM

Sorry, the technology of flashdisks is still pretty primitive...
It takes ages to do that on windoze too.

obstinatesod 12-31-2005 01:55 PM

thanks BinJajer, but its quite quick in XP and very slow in Suse 10.0 shouldn't they be of similer speed?

mpetrov 01-02-2006 12:30 AM

I would suggest plugging in the drive and right after typing 'dmesg' in a shell. There should be some output at the very end about 'sda:' or 'sdb:' on about 10-20 lines. That could tell us which kernel driver is grabbing the device - it could be using the USB 1.1 driver instead of the USB 2.0 driver (if it's a USB 2.0 drive).

BFGeier 01-02-2006 12:49 AM

I had a question about flash drives. How do you get SUSE 10.0 to even see them?

mpetrov 01-02-2006 12:57 AM

Well most likely it detects the drive but does not mount it, perform the step from my message above after plugging in your drive and see if the kernel recognizes the device. Once the kernel sees the drive you should be able to mount it with a command along the lines of 'mount /dev/sda1 /mnt/usb_stick' (sda1 depends on the dmesg output, sometimes this can be sdb or sdc, but the 1(this is the partition number) should follow if you got a standard FAT32 drive with one partition).

obstinatesod 01-02-2006 03:07 AM

slow flash
 
hi
I should mention my motherboard does not support usb 2, the flash drive is usb 2 but it works a lot quicker in wnindoze, this is the output I got from doing what you said to try.

usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
SFW2-INext-DROP-DEFLT IN=dsl0 OUT= MAC= SRC=88.110.226.244 DST=88.110.127.192 LE N=64 TOS=0x00 PREC=0x00 TTL=46 ID=26347 DF PROTO=TCP SPT=2394 DPT=445 WINDOW=537 60 RES=0x00 SYN URGP=26213 OPT (020405B4010303030101080A000000000000000001010402 )
Vendor: USB Model: Flash Disk Rev: 2.00
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
sda: sda1
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0
usb-storage: device scan complete
SFW2-INext-DROP-DEFLT IN=dsl0 OUT= MAC= SRC=88.110.226.244 DST=88.110.127.192 LE N=64 TOS=0x00 PREC=0x00 TTL=46 ID=26770 DF PROTO=TCP SPT=2394 DPT=445 WINDOW=537 60 RES=0x00 SYN URGP=0 OPT (020405B4010303030101080A000000000000000001010402)

mpetrov 01-02-2006 09:58 AM

Here are my first 4 usb related lines after plugging in my device, so if you could please post a few more lines above what you posted. To be specific I am interested in 'USB device using uhci_hcd' that is the driver that took it.

usb 4-2: new full speed USB device using uhci_hcd and address 2
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning

Also please paste the output of 'hdparm -Tt /dev/sda' when the device is plugged in, this will run some read timing tests on the device. For example my output for a 1.1 usb drive using the uhci_hcd driver is:

/dev/sda:
Timing cached reads: 3280 MB in 2.00 seconds = 1638.61 MB/sec
Timing buffered disk reads: 4 MB in 4.41 seconds = 929.78 kB/sec

cs-cam 01-02-2006 05:16 PM

Is Suse automounting it? If so it might be using the sync option which is cool because it means if you rip the disk out mid-write you won't lose lots of data but it's bad in that it is so incredibly anal about how it does it's writes that it's super slow. I accidently had sync enabled on my iPod and copying a few GB over took hours, turn that off and it takes less than a minute.

Run this the the flash drive mounted and see if it says 'sync' anywhere in the parenthesis at the end:
Code:

mount | grep sda

obstinatesod 01-03-2006 02:03 AM

thanks cs-cam here's what I got: /dev/sda1 on /media/U-STORAGE type subfs (rw,nosuid,nodev,sync,fs=floppyfss,proc uid,utf8=true)
Q, how do I turn it off?

cs-cam 01-03-2006 02:42 AM

Well now you know your problem at least. I don't know the answer though, I don't use any kind of automounter and from what I've heard, if you edit /etc/fstab it'll just revert itself next time you reboot. Ask on the Suse forums, you'll get a better answer. For a temporary solution, after the device has automounted then run this series of commands from a terminal as root to unmount and it remount it without the sync option. Find out from the Suse guys how to do it permenantly.

Code:

umount /dev/sda1
mount -o umask=0,rw /dev/sda1 /media/U-STORAGE


obstinatesod 01-03-2006 03:14 AM

thanks for your help cs, Adrian


All times are GMT -5. The time now is 02:17 AM.