usb flash, drives, cameras etc

Message
Author
User avatar
Jerry3904
Administrator
Posts: 21944
Joined: Wed Jul 19, 2006 6:13 am

Re: usb flash, drives, cameras etc

#11 Post by Jerry3904 »

I love the MXlinux manual. It is the best written manual on anything I have seen . Almost a tutorial on linux as well. Extremely well done.
We'll pass that on to the authors, thanks.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
cyrilus31
Posts: 629
Joined: Thu Nov 03, 2016 3:24 pm

Re: usb flash, drives, cameras etc

#12 Post by cyrilus31 »

Jerry3904 wrote: Wed Mar 13, 2019 3:38 pm
I love the MXlinux manual. It is the best written manual on anything I have seen . Almost a tutorial on linux as well. Extremely well done.
We'll pass that on to the authors, thanks.
:celebrate: (I can't find a hilarious smiley)

User avatar
figueroa
Posts: 1053
Joined: Fri Dec 21, 2018 12:20 am

Re: usb flash, drives, cameras etc

#13 Post by figueroa »

dolphin_oracle wrote: Wed Mar 13, 2019 2:46 pm actually that isn't true. its very possible that the file operation as far as the OS is concerned is finished, but its actually still in a cached state waiting to be completed on the usb.

its tough to make that delay shorter without making the copy operation longer, IIRC.
Not meaning to be difficult, but I experience no delay in being able to unmount a USB flash drive after writing to it. It will unmount and/or eject as fast I can point and click once the copy operation is done.
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

User avatar
figueroa
Posts: 1053
Joined: Fri Dec 21, 2018 12:20 am

Re: usb flash, drives, cameras etc

#14 Post by figueroa »

rs55 wrote: Wed Mar 13, 2019 2:44 pm figueroa - thanks. My usb flash is a bog standard samsung bar - formatted ntfs. And I dont think I have done any messing about with settings on the usb. Encouraging to hear that the 2 minute delay to unmount is not standard behavior - I 'll need to keep working on it.
A bog standard flash drive isn't formatted NTFS. You should expect a FAT formatted flash drive to mount itself in a few seconds.
On the cameras - I tried my wife's canon powershot and my Fuji X... - shotwell seems to handle it fine, but none of the others ( i tried gthumb, rapid-photo-downloader and darktable). And the camera still does not show up at all in my spacefm file manager.
My more or less standard cameras mount themselves and show up in Thunar. one of them is a Canon EOS sxi SLR. My MX installation is near pristine.

BTW, the main (almost only) reason Thunar is sometimes slow to open is because there is a problem with a mounted drive or partition. The only reason it will open more than one instance is because it is selected more than once. This kind of thing also affects other file managers and any other program inspecting your mounts to varying degrees.

ADDED: a few cameras even present themselves as a standard flash drive. I seldom plug in the camera. I almost always pull the flash card and deal with that directly through the file manager or (usually) the terminal.
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

rs55
Posts: 273
Joined: Sun Feb 24, 2019 4:24 pm

Re: usb flash, drives, cameras etc

#15 Post by rs55 »

OK - I reformatted my 64 GB samsung bar flash to FAT32. Then I copied 11 GB of data on to it (took about 4 minutes). Then I ejected it. It then took 3 minutes and 40 seconds before it would eject.
There is definitely something that needs to be tweaked. Linux Mint does not do this. Maybe it has to do with file sizes? Buffering? No clue. Its probably some parameter that is not set correctly in the disk copy mechanism.

rs55
Posts: 273
Joined: Sun Feb 24, 2019 4:24 pm

Re: usb flash, drives, cameras etc

#16 Post by rs55 »

I have been running the liquorix kernel 4.20... . So for fun, I went back to the basic 4.9 kernel and tried the same operation, FAT32. The copy took 7:30 , but the eject was instantaneous.
So, there seems to be the expected behavior with kernel 4.9.

The overall time : copy+eject seems to be about the same., in all cases and with NTFS or FAT32.

So, I am going to stay with FAT32, and kernel 4.9. Its more important to me that the eject is fast.

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: usb flash, drives, cameras etc

#17 Post by BitJam »

rs55 wrote: Thu Mar 14, 2019 12:33 am OK - I reformatted my 64 GB samsung bar flash to FAT32. Then I copied 11 GB of data on to it (took about 4 minutes). Then I ejected it. It then took 3 minutes and 40 seconds before it would eject.
There is definitely something that needs to be tweaked. Linux Mint does not do this. Maybe it has to do with file sizes? Buffering? No clue. Its probably some parameter that is not set correctly in the disk copy mechanism.
Yes, this sounds like a buffering problem. The default buffer sizes on Linux are way too large. The live-usb-maker programs run the following command to reduce the buffers to a reasonable size:

Code: Select all

sysctl vm.dirty_bytes=20000000
As a side benefit, this also increases the overall speed of transfers to usb devices by 5% to 10%. Try running that command (with sudo) before doing the copy and see if the situation improves. If it does then put the command in your /etc/rc.local file.

BTW: I use system monitors (conky and gkrellm) that show me graphs of cpu usage, disk IO, and network usage. If you are curious about stuff like this then these monitors are invaluable. Otherwise it is like driving with your windshield painted black. For example, a graph of the disk IO would have shown that the writing didn't stop when the copy command did. You would have seen it continue until the eject finally completed.
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."

-- Richard Feynman

User avatar
chrispop99
Global Moderator
Posts: 3179
Joined: Tue Jan 27, 2009 3:07 pm

Re: usb flash, drives, cameras etc

#18 Post by chrispop99 »

Out of interest, are you able to try other USB sticks to see if they are slow?

Transfer performance varies hugely, and is pretty much unrelated to manufacturers claims. Also, in spite of the fact that it shouldn't be the case, I have some USB 2.0 drives that perform terribly if used in USB 3.0 slots.

Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

rs55
Posts: 273
Joined: Sun Feb 24, 2019 4:24 pm

Re: usb flash, drives, cameras etc

#19 Post by rs55 »

yes , I also have a 3 year old sandisk extreme pro - that runs faster than my new samsung - bar.
But still hangs around for a smoke after being ejected !

rs55
Posts: 273
Joined: Sun Feb 24, 2019 4:24 pm

Re: usb flash, drives, cameras etc

#20 Post by rs55 »

BitJam:
Thanks so much! That is exactly the issue I think. Been digging into this dirty-bytes business. it seems liquorix makes some drastic changes to these parameters - which explains the difference I saw.
trying out background-dirty at 100 MB and dirty at 200 MB.
My understanding of the process is as follows:
; when you initiate a disk write, the Process starts writing into ram. when it gets to 100MB ,the Flusher starts writeback
; if the ram is filled to 200MB, then the Process starts writeback directly

Now if you are operating with large amounts of data and external drives that are always attached - it makes sense to have large amounts cached and occassionally written out to disk, improving system responsiveness.
But - if you have a thumb drive, the situation is different. It is not always attached. generally you plug it in to read or write a specific file , then eject it. In this case, smaller cache makes sense.
This OS stuff is very interesting. Did I get that kinda right?

Post Reply

Return to “Software / Configuration”