On 9/28/18 2:28 PM, Dave Ulrick wrote:
Thanks, that makes sense. Any idea of why unlink()ing the file seems to be faster than truncating it?


As best I understand it, one process is async and parallel:

unlink, clear block list, sync to disk
open, write, close, sync to disk

Where the other process is synchronous and linear:

open, truncate, clear block list, write, close, sync to disk

Filesystem benchmark tools (bonnie++ for example) test file write and file re-write separately, and it's normal for re-write to be slower.
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to