[SOLVED] USB Key and cache problem?

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] USB Key and cache problem?

Postby alopez » Jul 20th, '14, 14:10

Hi,

currently using M3, I noticed that when I insert a USB key and write some large (1~1.5Gb) files using nautilus, the progress bar moves incredibly fast (reported transfer speed is also very high), until a moment when it completely freezes and stays there for several (up to 15) minutes. Usually this happens when the file is reported to be copied up to 99%, but depending on the number and sizes of the files, this can happen before. This progress bar is then completely useless, because it means nothing.

My guess is that the progress bar is reporting the information it gets from fuse which is actually reporting fake information because it is write-caching the file. And when it receives the last byte of the files, it blocks until the cache is completely written to the key. This is a safe behavior, but makes the cache useless because the operation will not end until the last byte is written to the device. There is no gain using this cache.

So my question is, do you guys think I'm right thinking it is a write-cache problem? If yes, do you know how I can disable the write-cache only for USB keys? My guess is that it should be gvsfd.

I searched the internet but found no one complaining about this specific behavior, although I found several people with related but slightly different problems with solutions that don't apply to mine.

Thanks.
Last edited by alopez on Dec 21st, '14, 20:45, edited 1 time in total.
User avatar
alopez
 
Posts: 65
Joined: Aug 17th, '13, 18:26
Location: France

Re: USB Key and cache problem?

Postby doktor5000 » Jul 20th, '14, 21:06

Actually that's a question how the kernel itself or more specifically the usb and filesystem device drivers handles that, syncronous or asyncronous.

You may want to check
http://superuser.com/questions/526248/t ... untu-linux
http://askubuntu.com/questions/5051/how ... ting-to-it
http://www.linuxquestions.org/questions ... an-424136/
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18020
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: USB Key and cache problem?

Postby alopez » Jul 22nd, '14, 22:51

Thanks doktor5000 for your answer.

I had already seen those pages and they only propose to manually use hdparm to disable the cache. I want this done automatically when the device is plugged into the system, at the same time it is auto-mounted. I was hoping Mageia would include a way to do this, but now I guess it doesn't.

I think udev might be of use, using the DRIVER=usb-storage condition, but I don't have much experience with udev and I'm not sure how to proceed with out breaking anything. I'll give it a try during the week-end.

Any other idea to use instead of udev?
User avatar
alopez
 
Posts: 65
Joined: Aug 17th, '13, 18:26
Location: France

Re: USB Key and cache problem?

Postby doktor5000 » Jul 23rd, '14, 20:32

This is nothing that Mageia can provide, this is closely tied to the various mount helpers, depending on what desktop environment you're using. Sadly for most of them, advanced options cannot be configured.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18020
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: USB Key and cache problem?

Postby alopez » Dec 21st, '14, 20:40

It seems that the recent kernels fixed this problem.
User avatar
alopez
 
Posts: 65
Joined: Aug 17th, '13, 18:26
Location: France


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest