LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How to diagnose - slow dog system when copying from sdcard (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-diagnose-slow-dog-system-when-copying-from-sdcard-4175563213/)

erickFis 01-06-2016 09:34 AM

How to diagnose - slow dog system when copying from sdcard
 
Whenever I start copying a large amount of data from sdcard my system becomes really slow, almost crashed, like chocked to death.

How can I diagnose and fix this?

Code:

erickfis@erickfis-K45A:~$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description:    Linux Mint 17.2 Rafaela
Release:        17.2
Codename:      rafaela
erickfis@erickfis-K45A:~$

Code:

erickfis@erickfis-K45A:~$ uname -a
Linux erickfis-K45A 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
erickfis@erickfis-K45A:~$


business_kid 01-06-2016 10:42 AM

(sudo) hdparm -tT /path/to/sdcard


If you get 20 Meg/S in real time, it's good. Here's my sdcard reader (inbuilt)
Code:

bash-4.3$ sudo hdparm -tT /dev/mmcblk0p1

/dev/mmcblk0p1:
 Timing cached reads:  11982 MB in  2.00 seconds = 5995.16 MB/sec
 Timing buffered disk reads:  50 MB in  3.06 seconds =  16.33 MB/sec


BW-userx 01-06-2016 03:43 PM

Quote:

Originally Posted by erickFis (Post 5473902)
Whenever I start copying a large amount of data from sdcard my system becomes really slow, almost crashed, like chocked to death.

How can I diagnose and fix this?

Code:

erickfis@erickfis-K45A:~$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description:    Linux Mint 17.2 Rafaela
Release:        17.2
Codename:      rafaela
erickfis@erickfis-K45A:~$

Code:

erickfis@erickfis-K45A:~$ uname -a
Linux erickfis-K45A 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
erickfis@erickfis-K45A:~$


I've found when I copy lots of files off HDD through a USB / SDCard if I take small bytes of it it will go faster rather then all of it at once.

erickFis 01-07-2016 05:42 AM

business_kid,
thank you for your input. hdparm results below:

Code:

erickfis@erickfis-K45A:~$ sudo hdparm -tT /dev/sdb1
[sudo] password for erickfis:

/dev/sdb1:
 Timing cached reads:  9990 MB in  2.00 seconds = 4996.64 MB/sec
 Timing buffered disk reads:  48 MB in  3.12 seconds =  15.39 MB/sec
erickfis@erickfis-K45A:~$

BW-userx,

this is not a good way to solve the problem: a guy should be able to move his por, er I mean, files, from/to sdcard without halting the OS. I want to select all the files/folders, move/copy them and then get back to work and to my music. Sometimes even the music chokes.

I'm doing this right now - copying 3 Gb of fotos/movies from sdcard to my hdd.
This notebook (Asus k45A) has a built-in card reader.

Music is gagging and system is really unresponsive, can't even write properly here.

Dmesg gives me nothing, only the usual:

Code:

[69692.324323] usb 3-4: new high-speed USB device number 15 using xhci_hcd
[69692.763538] usb 3-4: New USB device found, idVendor=0bda, idProduct=0138
[69692.763544] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[69692.763547] usb 3-4: Product: USB2.0-CRW
[69692.763549] usb 3-4: Manufacturer: Generic
[69692.763550] usb 3-4: SerialNumber: 20090516388200000
[69692.769352] ums-realtek 3-4:1.0: USB Mass Storage device detected
[69692.784905] scsi15 : usb-storage 3-4:1.0
[69693.788813] scsi 15:0:0:0: Direct-Access    Generic- Multi-Card      1.00 PQ: 0 ANSI: 0 CCS
[69693.789775] sd 15:0:0:0: Attached scsi generic sg2 type 0
[69694.687337] sd 15:0:0:0: [sdb] 60932096 512-byte logical blocks: (31.1 GB/29.0 GiB)
[69694.687591] sd 15:0:0:0: [sdb] Write Protect is off
[69694.687595] sd 15:0:0:0: [sdb] Mode Sense: 03 00 00 00
[69694.687841] sd 15:0:0:0: [sdb] No Caching mode page found
[69694.687844] sd 15:0:0:0: [sdb] Assuming drive cache: write through
[69694.690603]  sdb: sdb1


erickFis 01-07-2016 05:54 AM

UPDATE

I've just found out that the problem only happens when I'm copying/moving from sdcard to my NTFS partition on HDD.
The same operation goes smooth when the target is my /home, an ext4 partition

My fstab below:

Code:

UUID=68dfa559-a048-4fcf-8a19-ad276b1b7e04  /              ext4    errors=remount-ro                  0      1
UUID=5DAC13AF38DAD590                      /geral          ntfs    auto,defaults,gid=100,uid=1000      0      0
UUID=83a506c7-178e-40ab-8e86-25e2f86210a8  /home          ext4    defaults                            0      2
UUID=87536ae0-1851-497d-8206-ed80688ae6e4  none            swap    sw                                  0      0


business_kid 01-07-2016 06:25 AM

Endure it.
sdcards are slow - period..

michaelk 01-07-2016 06:58 AM

In addition, reading/writing to NTFS will not be as fast as a native linux file system. The NTFS driver is a fuse filesystem which operates in userspace versus the kernel which is one reason it is slower.

BW-userx 01-07-2016 08:06 AM

Quote:

Originally Posted by erickFis (Post 5474315)
business_kid,
thank you for your input. hdparm results below:

Code:

erickfis@erickfis-K45A:~$ sudo hdparm -tT /dev/sdb1
[sudo] password for erickfis:

/dev/sdb1:
 Timing cached reads:  9990 MB in  2.00 seconds = 4996.64 MB/sec
 Timing buffered disk reads:  48 MB in  3.12 seconds =  15.39 MB/sec
erickfis@erickfis-K45A:~$

BW-userx,

this is not a good way to solve the problem: a guy should be able to move his por, er I mean, files, from/to sdcard without halting the OS. I want to select all the files/folders, move/copy them and then get back to work and to my music. Sometimes even the music chokes.

I'm doing this right now - copying 3 Gb of fotos/movies from sdcard to my hdd.
This notebook (Asus k45A) has a built-in card reader.

Music is gagging and system is really unresponsive, can't even write properly here.

Dmesg gives me nothing, only the usual:

Code:

[69692.324323] usb 3-4: new high-speed USB device number 15 using xhci_hcd
[69692.763538] usb 3-4: New USB device found, idVendor=0bda, idProduct=0138
[69692.763544] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[69692.763547] usb 3-4: Product: USB2.0-CRW
[69692.763549] usb 3-4: Manufacturer: Generic
[69692.763550] usb 3-4: SerialNumber: 20090516388200000
[69692.769352] ums-realtek 3-4:1.0: USB Mass Storage device detected
[69692.784905] scsi15 : usb-storage 3-4:1.0
[69693.788813] scsi 15:0:0:0: Direct-Access    Generic- Multi-Card      1.00 PQ: 0 ANSI: 0 CCS
[69693.789775] sd 15:0:0:0: Attached scsi generic sg2 type 0
[69694.687337] sd 15:0:0:0: [sdb] 60932096 512-byte logical blocks: (31.1 GB/29.0 GiB)
[69694.687591] sd 15:0:0:0: [sdb] Write Protect is off
[69694.687595] sd 15:0:0:0: [sdb] Mode Sense: 03 00 00 00
[69694.687841] sd 15:0:0:0: [sdb] No Caching mode page found
[69694.687844] sd 15:0:0:0: [sdb] Assuming drive cache: write through
[69694.690603]  sdb: sdb1


I'm not all that savy about numbers, I do know they are relitive and not actual, its all theory mostly. on a good day you should get max deliverly off data transfeer stats. It too depends on the class of SD CARD from what I've read as well.

I go command line if I have a lot to copy over to a sdcard, after resampling them in handbrake to get the size down more. I do not need BlueRay data on a phone or my laptop.

I have found it goes faster, when not trying to do a major amount of data at once. using drag and drop. I just got done transferring 1TB of data onto another HDD using the command line and it only took me around 5 or 6 hours.

looking at the stats is not always the answer because it is mostly theoretical yield and not actual yield that the company prints out to the public. just Like 3G and 4G phones are not acutally 3G or 4G phones.

they are much slower then the math says it has to be in order to be 3G or 4G. if one is choking the kid on food, stop feeding him so much at one time.


there too is this what class is the sd card?

basic logic, and do not expect the specs to acually be real time stats, its theoretical.

business_kid 01-08-2016 05:41 AM

You can expect tyhe usb to be usb-2.0, with a practical max speed of 20Mb/s. The realtek slows that slightly, but windows couldn't manage over 12MB/S copying between usb disks.

There's a complicated write procedure sometimes. If you set a copy going as luser on a console, you should be able to go back to X and work away.

erickFis 01-08-2016 07:41 AM

Hello guys! I'm marking this as SOLVED.

After looking into my fstab I noticed that the driver for the NTFS partition (my target for copying) was NTFS.
I did changed it to NTFS-3G and now things are really smooth and fast - no more choking anywhere.

With NTFS driver in fstab, it took me almost 10 minutes to copy 3 Gb of data (300 files) from sdcard to my NTFS partition - and the system was choking all the time.

With NTFS-3G driver in fstab, it took me only 1 minute, I swear! and the system stayed smooth all the time - music playing, thunderbird+firefox working with multiple tabs and a lot more.

This is a clas 10 sd-hc card.

Thank you guys for your input!

Habitual 01-08-2016 09:34 AM

Good job and well done!


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