FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Wed May 12, 2021 01:00



Post new topic Reply to topic  [ 5 posts ] 
sync option 
Author Message

Joined: Wed Jan 30, 2013 23:32
Posts: 3
Post sync option
Hello everyone,

So I've been trying an automount with usb thumbdrives via udev and it's all running smoothly. My issue is that when I mount with sync the drives take up to a minute before they actually sync. With ext or fat32 I don't have this issue.

Does anyone have any suggestions for me?

Thanks in advance.


Thu Jan 31, 2013 00:22
Profile

Joined: Wed Jan 30, 2013 23:32
Posts: 3
Post Re: sync option
Update:

So I resolved the sync issue not being recognized by ntfs-3g. It now accepts it the issue is that once the device is mounted file transfers are painfully slow and if a write is happening on the device then everything else that attempts device access freezes until it's done. For instance if I plug an NTFS thumbdrive into the machine and attempt to download a file from Chromium into it, Chomium's download status will be frozen until the file transfer is finished as well as any directory listings of the mount point. I am using the 1.13.2013 version of ntfs-3g on a USB 2.0 device. Has anyone dealt with this issue before?

Thanks again.


Fri Feb 01, 2013 16:12
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: sync option
Hi,

Quote:
the issue is that once the device is mounted file transfers are painfully slow and if a write is happening on the device then everything else that attempts device access freezes until it's done.

This is what is to be expected. The sync option disables the write caches so that all write requests are immediately synced to device.

The FAQ says "do not use sync unless you have a good reason to do so".

Regards

Jean-Pierre


Mon Feb 04, 2013 12:37
Profile

Joined: Wed Jan 30, 2013 23:32
Posts: 3
Post Re: sync option
Right, and I do. The reason is that the device I am using needs to be capable of having a USB drive plugged in and auto-mounted with the expectation that it could be yanked out at any point. Therefore if someone copies a file "to the device" or realistically in cache and they pull the device out within the next 30 seconds or so they'll lose their data. Hence the need for 'sync'. When I add 'sync' to a FAT or EXT partition I do not have these write problems and everything runs smoothly, also in Windows this problem does not present itself with an NTFS usb device. Are there some other mount options I should try?

Thanks again.


Mon Feb 04, 2013 16:52
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: sync option
Hi,

Quote:
When I add 'sync' to a FAT or EXT partition I do not have these write problems and everything runs smoothly, also in Windows this problem does not present itself with an NTFS usb device.

On ntfs, when writing a piece of user data, you have to update the size and time stamps in the file table and in the parent directory. This triples the number of writes and shortens the life of the device when using sync. Other file systems have different organizations (and above all are not in user space and require fewer context switches).
Quote:
Are there some other mount options I should try?

You might try to associate "big_writes" and "sync", the former will reduce the number of metadata updates. This is however sensitive to how the write requests are issued.

Regards

Jean-Pierre


Tue Feb 05, 2013 23:03
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.