Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Very Slow USB Sticks [SOLVED]
#1
Wink 
Thanks to everybody who so nicely helped me with this issue.

I made all sorts of tests over the weekend and to make a long story short the solution that made a difference was disabling the transparent huge pages. Thanks to cleverwise (Jeremy Mr. Server) for pointing it out.

In order to provide more information I tested a bunch of things following jspoonamore's comments.

Transparent huge pages Enabled:
* Since I was using a USB hub, I tried inserting the USB stick on a dedicated USB port. No difference. -> Slow
* I unplugged the USB hub completely and the only USB device left was the keyboard. No difference. -> Slow

Transparent huge pages Disabled:
* The USB stick in its own port. -> Max USB stick's write speed.
* The USB stick back in the USB hub. -> Max USB stick's write speed. 
* Copying from an external USB drive to the USB stick, both in the same USB hub. (Worst case scenario) -> Max USB stick's write speed. 

What I noticed looking and "glances" is that with the Transparent huge pages Enabled the Write Speed would drop to 0 for goods amount of time. As soon as I disabled the Transparent huge pages, the write speed never went to 0. It would fluctuate but never to 0.

I tried copying 25.7 GB several times and it consistently took 70 min (185 min before). Exactly the same time that Windows took.  Those 70 min. include "sync" to flush the buffers.

Thanks everyone,
David


--------------------------------------------------------------------------------------
Original Post:

Hello everyone,

Running Mint 18.3 and copying large amounts of data into a USB stick takes for ever (and sometimes even longer Smile).

I am looking at 3-4 hours to copy 25 GB.  Waaaaay toooo loooooong !

I looked everywhere and I saw that a lot of people have the same problem, but I could not find any solution that would work for me.

I tried FAT32, NTFS since I need to transfer the files  to a Windows machine and no dice. It takes the same time (more less).

My USB external HD works great. Other people's too... but the USB stick is terrible.


Any help would be greatly appreciated...

TIA,
David
Reply
#2
Do you know if you are using USB 2.0 or USB 3.0?
Jeremy (Mr. Server)

* Desktop: Ubuntu MATE
* Windows are for your walls, Apple is for your health, Linux is for your computer
Reply
#3
(08-17-2018, 07:54 PM)crazy_spaniard Wrote: Hello everyone,

Running Mint 18.3 and copying large amounts of data into a USB stick takes for ever (and sometimes even longer Smile).

I am looking at 3-4 hours to copy 25 GB.  Waaaaay toooo loooooong !

I looked everywhere and I saw that a lot of people have the same problem, but I could not find any solution that would work for me.

I tried FAT32, NTFS since I need to transfer the files  to a Windows machine and no dice. It takes the same time (more less).

My USB external HD works great. Other people's too... but the USB stick is terrible.


Any help would be greatly appreciated...

TIA,
David

I'll ask the obvious... (1) How old is the Flash Drive and what is its make/model?  (2)  Is it USB 2 or 3?  (3) Did you buy this Flash Drive off of eBay for what seemed to be a Great Deal???
Reply
#4
(08-17-2018, 08:08 PM)jspoonamore Wrote:
(08-17-2018, 07:54 PM)crazy_spaniard Wrote: Hello everyone,

Running Mint 18.3 and copying large amounts of data into a USB stick takes for ever (and sometimes even longer Smile).

I am looking at 3-4 hours to copy 25 GB.  Waaaaay toooo loooooong !

I looked everywhere and I saw that a lot of people have the same problem, but I could not find any solution that would work for me.

I tried FAT32, NTFS since I need to transfer the files  to a Windows machine and no dice. It takes the same time (more less).

My USB external HD works great. Other people's too... but the USB stick is terrible.


Any help would be greatly appreciated...

TIA,
David

I'll ask the obvious... (1) How old is the Flash Drive and what is its make/model?  (2)  Is it USB 2 or 3?  (3) Did you buy this Flash Drive off of eBay for what seemed to be a Great Deal???


1 - One week old - Kingston DataTraveler G4 GB
2 - USB 3
3 - Not bought from eBay

(08-17-2018, 08:07 PM)cleverwise Wrote: Do you know if you are using USB 2.0 or USB 3.0?

Hi Jeremy, good to see you around here too... Smile

It is a Kingston USB 3.0

David
Reply
#5
Thanks.

Is the port USB 3.0 too?
Jeremy (Mr. Server)

* Desktop: Ubuntu MATE
* Windows are for your walls, Apple is for your health, Linux is for your computer
Reply
#6
(08-17-2018, 08:26 PM)cleverwise Wrote: Thanks.

Is the port USB 3.0 too?

Yes UBS 3 port
Reply
#7
You might have to disable transparent huge pages.  There can be other causes but this is one to try.

Check the status:

Code:
shell> cat /sys/kernel/mm/transparent_hugepage/enabled

You want to see never set.

To change in just runtime (will go back when you reboot)

Code:
shell> echo never > /sys/kernel/mm/transparent_hugepage/enabled

Now check again that it is never.  Then try copying USB.  If something goes wrong just reboot.
Jeremy (Mr. Server)

* Desktop: Ubuntu MATE
* Windows are for your walls, Apple is for your health, Linux is for your computer
Reply
#8
(08-17-2018, 08:20 PM)crazy_spaniard Wrote:
(08-17-2018, 08:08 PM)jspoonamore Wrote:
(08-17-2018, 07:54 PM)crazy_spaniard Wrote: Hello everyone,

Running Mint 18.3 and copying large amounts of data into a USB stick takes for ever (and sometimes even longer Smile).

I am looking at 3-4 hours to copy 25 GB.  Waaaaay toooo loooooong !

I looked everywhere and I saw that a lot of people have the same problem, but I could not find any solution that would work for me.

I tried FAT32, NTFS since I need to transfer the files  to a Windows machine and no dice. It takes the same time (more less).

My USB external HD works great. Other people's too... but the USB stick is terrible.


Any help would be greatly appreciated...

TIA,
David

I'll ask the obvious... (1) How old is the Flash Drive and what is its make/model?  (2)  Is it USB 2 or 3?  (3) Did you buy this Flash Drive off of eBay for what seemed to be a Great Deal???


1 - One week old - Kingston DataTraveler G4 GB
2 - USB 3
3 - Not bought from eBay

(08-17-2018, 08:07 PM)cleverwise Wrote: Do you know if you are using USB 2.0 or USB 3.0?

Hi Jeremy, good to see you around here too... Smile

It is a Kingston USB 3.0

David

I have this drive.  Kingston DataTraveler G4 16GB. I've had no problems with it.

Things I would check....

(1)  Do you have too many USB devices plugged in?
(2)  Are you trying to use a USB Hub instead of plugging directly into USB 3 port?
(3)  Will this drive work correctly on another computer?  If it doesn't, looks like you have a dud.

In the past, I've had mis-behaving USB Hubs or devices; sometimes USB devices do not like to work together.  If this Flash Drive works A-OK/Fast on another computer, I would start the diagnosis by unplugging all USB devices on your computer and just plug in the Flash Drive only.  Try different USB 3 ports.   Even try USB 2 ports.  If it starts to work fast, then start plugging in other devices until the drive starts to slow down again.  USB ports are suppose to provide 5 volts of power.  Not all motherboards are created equal and it may be unable to provide power for the all USB devices all the time.
Reply
#9
Gday

Can you please update the first post with

Whats the PC/Laptop your using
Whats the current OS your using
Whats the USB stick
Reply
#10
(08-17-2018, 08:43 PM)cleverwise Wrote: You might have to disable transparent huge pages.  There can be other causes but this is one to try.

Check the status:

Code:
shell> cat /sys/kernel/mm/transparent_hugepage/enabled

You want to see never set.

To change in just runtime (will go back when you reboot)

Code:
shell> echo never > /sys/kernel/mm/transparent_hugepage/enabled

Now check again that it is never.  Then try copying USB.  If something goes wrong just reboot.

Since this seems to be the solution (I edited my original post), how do you recommend I make this change permanent ?

Should I add an entry to /etc/rc.local ?
or
should I edit sysctl.conf ?



TIA,
David
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)