I’ve a Mac working 10.14 as a file server. I’ve been copying information to it and in the present day I observed some very unusual caching/buffering habits. The drive is an exterior USB 2 HDD, so it tops out at round 40MB/s (and transfers to the share are the identical). In the present day the community pace abruptly went as much as round 100 MB/s (maxing out ethernet), then it simply stops. iStat menus on the server, I discover that smbd would not truly begin writing knowledge to the disk till what I assume is its write buffer getting crammed up, then it begins writing the information. This causes the switch on my finish to freeze (clearly) however it additionally causes your complete share to freeze for my pc, so interacting with it in any approach leads to a beachball.
Not solely that, however as a result of this delays the precise write-back to the disk, it takes far longer, because it spends time doing nothing ready for this buffer to replenish, then blocks the switch and slowly writes the information it may (ought to) have been writing all alongside. Then it cycles once more, it stops writing, waits for the buffer to fill, then begins writing once more. The buffer is someplace above 1.6 GB or so, as that was the smallest file I had and it copied all of it earlier than it even began writing to the disk.
I’ve not modified something, I’ve been copying knowledge to it for just a few days now and I’ve by no means seen this habits earlier than (nor have I ever seen this habits at any level previously, even with small transfers it will instantly write them to the disk, on this pc or every other, I discover it odd that something would permit that a lot knowledge to stay unwritten). It would not appear to matter if I exploit Finder or cp
on the consumer, nor does it appear to matter if I exploit SMB or AFP.
Chatting with the unwritten knowledge half, whereas energy outages usually are not the most important concern, the truth that my knowledge is not truly being written to the disk till a lot later is regarding as properly.