S
S
syxoi2016-07-12 19:39:36
linux
syxoi, 2016-07-12 19:39:36

Why is the write speed low with sync?

FS - xfs, I noticed that with the sync option (I need it so that nothing is cached in the frame, but immediately written to disk) recording to an external hard drive via a USB 2.0 interface, the write speed is already ~ 2! mebibyte, and without it - ~ 24 mebibyte. Sobsno why such a low speed? And how to deal with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2016-07-12
@leahch

Simply, if you write in small blocks with the sync option, you get a lot of overhead, which in USB takes 20-30%. In other words, for each block of data, the system will wait for confirmation from the device about the record.
If this is a matter of caching (which is what the cache does) and / or writing in large blocks, then the speed will increase.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question