2

I have a 1 TB Western Digital External Harddisk. The read/write speed was very low, I read on askubuntu that using the async mount option helps. Then I started using it as follows:

mount -o async,rw /dev/sdb1 /media/a/

Every time I plugin the HDD, I first unmount it then go to command line to mount it using the above command. I also have a 16GB pendrive and that is slower on Ubuntu than Windows 7, I suspect using async could help me there as well.

  1. What does async do?
  2. Is there a way to make async as the default option during automounts?
  3. Is it advisable to do so?
2
  1. async means that when data is written to the drive it is not committed immediately. This causes writes to "bunch up" so you can write them all one at a time. It also means your commands won't have to wait for the write to complete.

  2. Yes, you can add an entry for the drive to /etc/fstab. The line would look something like this:

    /dev/sdb1 /media/a/ auto auto,async 0 0
    

    For an explanation of what each field means, please see man fstab.

  3. It's fine as long as you never plug out the disc without unmounting. I know people say you shouldn't do this on Windows either, but with async you really shouldn't do this. You might think that the drive is done writing, but writes can sit in the write queue for a surprisingly long time.

  • "Surprisingly long time" is the time it takes to copy files in the sync mode: 3 hours for a 2GB file. In async, copy is few seconds and wait 1 minute after ask to unplug. – Rael Gugelmin Cunha Jul 27 '18 at 12:40
  • Is there any documentation on how the write buffer is configured? How big is it, is the buffer buffering in memory? Does it spill onto local disk of some sort? Is there a sort of backpressures? – CMCDragonkai Sep 20 '18 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.