InterviewSolution
| 1. |
Why Ntfs-3g's Write Performance So Poor With Macfuse On Os X? |
|
Answer» The ntfs-3g program opens and does I/O to the block device (/dev/diskN) of the NTFS volume in question. Mac OS X does not have a VM buffer cache for block devices when they are accessed in this way. That's the most overwhelming factor, because both metadata operations and file data I/O boil down to read/writes by ntfs-3g to the block device. Suppose we somehow AUTOMAGICALLY provided unified buffer caching for block devices by essentially making a disk look like a GIANT file. Even then, OS X and its buffer cache is REALLY happy only when you do I/O that is in UNITS of page size (4KB) and aligned on a page boundary. To get the most out of the I/O subsystem in OS X, ntfs-3g (or any other program for that matter) would really want to do I/O in multiples of 4KB. For comparison, you should try writing to an NTFS disk image--you will see that it's considerably faster because you do have some caching in that case. There are versions of ntfs-3g available that have additional user-space caching with DRASTICALLY improved performance. The ntfs-3g program opens and does I/O to the block device (/dev/diskN) of the NTFS volume in question. Mac OS X does not have a VM buffer cache for block devices when they are accessed in this way. That's the most overwhelming factor, because both metadata operations and file data I/O boil down to read/writes by ntfs-3g to the block device. Suppose we somehow automagically provided unified buffer caching for block devices by essentially making a disk look like a giant file. Even then, OS X and its buffer cache is really happy only when you do I/O that is in units of page size (4KB) and aligned on a page boundary. To get the most out of the I/O subsystem in OS X, ntfs-3g (or any other program for that matter) would really want to do I/O in multiples of 4KB. For comparison, you should try writing to an NTFS disk image--you will see that it's considerably faster because you do have some caching in that case. There are versions of ntfs-3g available that have additional user-space caching with drastically improved performance. |
|