LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-01-2018, 06:00 AM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
write speed to usb stick slows with time


Bought a new 32GB usb 3.0 memory stick. If I copy a lot of stuff to it, it starts off fast 5+MB/s, but slows eventually to KBs.

I also noted this when writing to my external hd sometimes.

Is there a logical reason for this?
 
Old 05-01-2018, 07:28 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Read this.

Logical ?. Hmmm ....
 
Old 05-01-2018, 09:19 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
that's a nice article (i remember reading it before), but:

Quote:
This kind of change could conceivably be merged for 3.13; fancier solutions, obviously, will take longer.
shouldn't we be way beyond that point by now, even for conservative distros?

Quote:
Originally Posted by Pedroski View Post
Bought a new 32GB usb 3.0 memory stick. If I copy a lot of stuff to it, it starts off fast 5+MB/s, but slows eventually to KBs.
how do you copy? command line, or gui filemanager?
i noticed that some filemanagers aren't good at this, and a command line 'cp' is faster.

how do you measure the speeds?
 
Old 05-01-2018, 06:09 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Sorry, it really answers another q, not the one asked.
And no, the defaults haven't changed as at 4.15.

As for this, in the light of morning, I'd be guessing USB specific buffer issue.
 
Old 05-01-2018, 09:06 PM   #5
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
I just right click a folder, then click 'copy to', not being an expert in these matters.

Just tried again: my Music folder is 12.5 GB

Starts out reasonably fast, but within a couple of minutes, it says: 2 hour 25 mins to complete.

I thought usb 3.0 should copy at 27 MB/s

Is there anything I can do about this?? Otherwise I will return the usb stick.
 
Old 05-02-2018, 07:29 PM   #6
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
I will send this Kingston 32GB usb 3.0 stick back, so I thought I better delete all the files.

Have a look at this screenshot!
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2018-05-03 08-26-36.png
Views:	10
Size:	11.4 KB
ID:	27548  
 
Old 05-02-2018, 07:35 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Just mkfs over the top - NTFS zeroes by default.
 
Old 05-03-2018, 12:35 AM   #8
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Could that be the problem, the usb is formatted msdos?
 
Old 05-03-2018, 11:50 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
45000 files? that's a lot.
i repeat, a simple 'rm -r' would have been much faster (but still noticeable witht hat many files)

and "msdos" is not a filesystem; how exactly is the drive formatted?
could well have sth to do with it.
Code:
sudo fdisk -l /dev/sdX
(replace X with the device letter)
 
Old 05-03-2018, 01:02 PM   #10
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29
Quote:
Originally Posted by Pedroski View Post
Bought a new 32GB usb 3.0 memory stick. If I copy a lot of stuff to it, it starts off fast 5+MB/s, but slows eventually to KBs.

I also noted this when writing to my external hd sometimes.

Is there a logical reason for this?
which kind of stick.

some cheap brands are very slow

and having many files, which is the case in your case, also slows it down

--

just make one big archive and copy the archive. than you will see what the best speed of your hardware is.
 
Old 05-03-2018, 03:28 PM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Some sticks slow down a lot when you go > 50% of the capacity. Some sticks are just slow.
 
Old 05-03-2018, 08:18 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
True, msdos is not a filesystem but most of the utilities to format a FAT filesystem have dos in the name i.e. mkdosfs = mkfs.msdos = mkfs.vfat.

There could be multiple reasons why file transfer is slow but FAT32 is inefficient when writing a large number of files. FAT32 also becomes inefficient when the filesystem is large which one of the reasons why Microsoft artificially created the upper limit at 32GB in its formatting utilities.

Here is one site that shows the numbers.

https://www.flexense.com/fat32_exfat...omparison.html

Last edited by michaelk; 05-03-2018 at 08:29 PM.
 
Old 05-04-2018, 01:45 AM   #13
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Well, I sent it back, complained. See what they say!

The 16GB Kingston usb 3.0 works fine!
 
Old 05-04-2018, 09:45 PM   #14
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
They gave me a new one:

pedro@pedro-school2:~$ sudo fdisk -l /dev/sdb
[sudo] password for pedro:
Disk /dev/sdb: 28.8 GiB, 30943995904 bytes, 60437492 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x596f7a2f

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 63 60435647 60435585 28.8G b W95 FAT32
pedro@pedro-school2:~$

Hope it works better! No time to try now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
usb stick - no write permissions kox444 Linux - Hardware 3 01-07-2013 01:17 AM
software raid 5 write slows down after a time with ext3 gmgarner Linux - General 4 02-23-2009 12:24 PM
Cannot write to usb stick todders Slackware 8 11-29-2006 03:37 PM
USB Stick with speed limit? Suse 10rc1 mykrob SUSE / openSUSE 9 10-20-2005 03:54 PM
Can't WRITE to USB stick, Mount OK NO WRITE! ClericPreston Linux - Newbie 4 12-04-2004 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration