LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   USB copying really really slow on Slackware (https://www.linuxquestions.org/questions/slackware-14/usb-copying-really-really-slow-on-slackware-4175490329/)

moisespedro 01-06-2014 12:43 PM

USB copying really really slow on Slackware
 
I know it is not the port nor the pendrive because on Windows it copies just fine. When I try to copy an archive to it, it starts at something like 30~40MiB/s (pretty impressive) but it starts to drop fast, in the middle it is at something like 5MiB/s (sort of like Windows if I recall it correctly). Unfortunately, it keeps dropping and then it goes to less than 1MiB/s. It can take more than 3 hours to copy 5GiB.

zuzoa 01-06-2014 01:13 PM

What filesystem is the drive formatted as (ex: NTFS, FAT32)? How are you mounting the drive (as what type with which options)?

moisespedro 01-06-2014 01:40 PM

NTFS (since FAT32 can't handle larger files), usually mounted just double clicking on it on XFCE. It is so slow that is faster to transfer the file to the windows partition, boot on windows, copy the file.

zuzoa 01-06-2014 01:52 PM

Check and make sure you have ntfs-3g installed and up-to-date.

Could also you try mounting it manually through the command line instead and see if that helps, or returns any warnings/errors? Something like, mount -t ntfs-3g /dev/sdb1 /your/mountpoint/here -o rw,users,umask=0000

I would also try running the copy command through the CLI to see if it returns any warnings or errors there too.

moisespedro 01-06-2014 03:06 PM

I have ntfs-3g working fine. I can access the windows's partition with no problem. Mounted the pendrive using the command line and it is fine too.

EDIT: I am copying it using dd and it started at 11Mb/s, 400 seconds later and now it is copying at 3,5Mb/s. Not really fast but that is more or less how it goes on windows. Still need to wait since it drops more at the end.

moisespedro 01-06-2014 03:12 PM

2,7 Mb/s and it doesn't stop dropping. Damn.

zuzoa 01-06-2014 03:16 PM

Have you tried mounting the drive with the option -o noatime?

moisespedro 01-06-2014 03:19 PM

No, gonna try that later. Will wait until it gets near the end (when it drops to like 200Kb/s).

moisespedro 01-06-2014 03:30 PM

Trying with noatime now, it makes me sad how it always starts copying at 12Mb/s. Lets see how it goes.

moisespedro 01-06-2014 03:42 PM

noatime option is giving me the same results, that sucks.

stormbr 01-06-2014 03:47 PM

Just a question: are you using a initrd? If so maybe your usb modules are not being loaded in the correct order....
In my setup they are: modprobe ehci_hcd
modprobe ehci_pci
modprobe uhci_hcd
modprobe ohci_hcd

moisespedro 01-06-2014 03:54 PM

Yes, I am using one. How exactly do I check/change that?

EDIT: By the way, it seems it will stop dropping at 1,9 Mb/s. Still sucks but it is less worse than before.

zuzoa 01-06-2014 03:55 PM

Anything related about the USB drive during mount/copy in dmesg | tail?

moisespedro 01-06-2014 03:58 PM

This:
Code:

[13243.881008] sd 5:0:0:0: [sdd] Mode Sense: 23 00 00 00
[13243.881630] sd 5:0:0:0: [sdd] No Caching mode page found
[13243.881632] sd 5:0:0:0: [sdd] Assuming drive cache: write through
[13243.885254] sd 5:0:0:0: [sdd] No Caching mode page found
[13243.885256] sd 5:0:0:0: [sdd] Assuming drive cache: write through
[13243.906368]  sdd: sdd1
[13243.912610] sd 5:0:0:0: [sdd] No Caching mode page found
[13243.912613] sd 5:0:0:0: [sdd] Assuming drive cache: write through
[13243.912616] sd 5:0:0:0: [sdd] Attached SCSI removable disk
[13692.254180] Peer 148.246.180.162:65243/62750 unexpectedly shrunk window 1115412022:1115417386 (repaired)


stormbr 01-06-2014 04:05 PM

Check if all modules are in your initrd. I have had that problem at various occasions due to an old brain forgetting to put them all in the initrd.

rm%rf 01-06-2014 04:07 PM

Hi, I have a similar problem here as well, doesn't udev control the options to the mounted usb device.

I just created a 1G file and copied via terminal to a usb2 drive This was the timing results

real 4m27.082s
user 0m0.006s
sys 0m1.825s

When doing this via Thunar it starts off well and then seems to pause for quite a while.

How do we see the transfer rate in thunar ?

File system on usb device is

Device Boot Start End Blocks Id System
/dev/sdb1 2048 31266815 15632384 b W95 FAT32

Tried a direct write of a 1G file to the usb2 drive and this is the result

1024000000 bytes (1.0 GB) copied, 271.299 s, 3.8 MB/s

4.5 minuses so dd was faster than the copy reported transfer rate is 3.8 MB/s (What are we expecting to achieve though ? / at least to match windoze transfer rate)

Replugged the usb device and it is using ehci

usb 2-1.3: new high-speed USB device number 49 using ehci-pci

Modules report
ehci_hcd 39275 1 ehci_pci

Regards

dugan 01-06-2014 04:16 PM

Yeah, writing to NTFS drives in Linux is really fscking slow. I recommend reformatting the drive to exfat, which does handle large files.

rm%rf 01-06-2014 04:18 PM

deleted

moisespedro 01-06-2014 04:23 PM

Quote:

Originally Posted by stormbr (Post 5093124)
Check if all modules are in your initrd. I have had that problem at various occasions due to an old brain forgetting to put them all in the initrd.


Errr, I don't know exactly how to do that *feels dumb*

Gonna try exfat, thanks

EDIT: btw with noatime it stabilized at 2,1 Mb/s. Kinda sucks but way better than before (less than 1Mb/s).

stormbr 01-06-2014 04:30 PM

Try something like

Code:

mkinitrd -c -k 3.10.17 -f ext4 -r /dev/sda4 -m usbhid:ehci-hcd:ehci-pci:ohci-hcd:xhci-hcd:jbd2:mbcache:ext4 -l br-abnt2 -u -o /boot/initrd-3.10.17.gz
My own is a bit more elaborated but this must do as an example.
By the way if the problem is bad module ordering, changing filesystem will not help you.

willysr 01-06-2014 04:49 PM

i used to have this problem on my laptop, but it turns out to be firmware fault, so i updated the firmware and now it works fast

rm%rf 01-07-2014 11:45 AM

Hi
Tried the same file in windows today and transfer rate sat between 25.5 and 28.2 MB, guess windows is just faster in some areas ;-(

moisespedro 01-07-2014 11:59 AM

Quote:

Originally Posted by rm%rf (Post 5093615)
Hi
Tried the same file in windows today and transfer rate sat between 25.5 and 28.2 MB, guess windows is just faster in some areas ;-(

This really sucks


All times are GMT -5. The time now is 07:52 AM.