On Sun, Jul 24, 2016 at 1:28 PM, Benoît Canet <ben...@cloudius-systems.com>
wrote:

>
> But, Benoit, is it possible that ZFS *is* trying to coalesce writes, just
>> somehow misconfigured to aim at the wrong size? What I mean is, if you do
>> write() operations of 10 bytes, will you see 10-byte operations, or are
>> they still coalesced to  512-byte sizes?
>> If there is coalescing, just to 512 bytes (not 4096 as you would have
>> hoped), then clearly ZFS can coalesce the writes but is somehow
>> misconfigured to make them so small.
>>
>
> It round writes to 512 bytes.
>

Interesting. So if you write() at 10 byte chunks but still see 512-byte
writes to disk, then OSv's ZFS is correctly batching the writes - it's just
deciding to do this at 512 byte blocks instead of 4096 bytes (or, arguably,
much more... what's holy about 4096 byte writes to virtio?).

I guess now you can try to figure out where this "512" number comes from.
Perhaps some sector size configuration - although we should ideally have
two separate configuration parameters, one for the smallest write allowed
(the sector size), and one for the amount of writes to batch together to
one command for the disk (could ideally be more than one sector).

>
>
>>
>>
>>> > So basically in OSv, any write() to ZFS is using O_DIRECT even if you
>>> > didn't ask for that.
>>> No. Not intentional anyway.
>>>
>>
>> Oh. Good to know.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to