* Host's write request is 4KB larger than that of the guest?
@ 2011-01-06 13:53 Duy Le (Dan)
2011-01-06 15:13 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Duy Le (Dan) @ 2011-01-06 13:53 UTC (permalink / raw)
To: kvm
Hi there,
I used a raw disk image to host a VM. I later used blktrace to capture
write requests issued from the guest to commit data to a physical disk
and found that the request size of the host is 8 blocks (4KB) larger
than that of the guest. Here is a part of the trace.
--- Guest
251,32 0 100 2.399993525 10 D W 18747926 + 8 [kblockd/0]
251,32 0 101 2.399996297 10 D W 18752462 + 24 [kblockd/0]
251,32 0 102 2.399998367 10 D W 18756566 + 8 [kblockd/0]
--- Host
8,16 0 155 2.415036111 32357 D W 19146095 + 16 [kvm]
8,16 0 156 2.415042667 32357 D W 19150639 + 32 [kvm]
8,16 0 158 2.415063867 32349 D W 19154743 + 16 [kvm]
The content of that additional written sectors on the disk can either
be "zero" or something else. Please let me know if you have a clue or
tell me which file in the package should I be looking at closer to
understand this behavior.
I really appreciate that.
-- Dan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Host's write request is 4KB larger than that of the guest?
2011-01-06 13:53 Host's write request is 4KB larger than that of the guest? Duy Le (Dan)
@ 2011-01-06 15:13 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2011-01-06 15:13 UTC (permalink / raw)
To: Duy Le (Dan); +Cc: kvm
On 01/06/2011 03:53 PM, Duy Le (Dan) wrote:
> Hi there,
>
> I used a raw disk image to host a VM. I later used blktrace to capture
> write requests issued from the guest to commit data to a physical disk
> and found that the request size of the host is 8 blocks (4KB) larger
> than that of the guest. Here is a part of the trace.
>
> --- Guest
> 251,32 0 100 2.399993525 10 D W 18747926 + 8 [kblockd/0]
> 251,32 0 101 2.399996297 10 D W 18752462 + 24 [kblockd/0]
> 251,32 0 102 2.399998367 10 D W 18756566 + 8 [kblockd/0]
>
> --- Host
> 8,16 0 155 2.415036111 32357 D W 19146095 + 16 [kvm]
> 8,16 0 156 2.415042667 32357 D W 19150639 + 32 [kvm]
> 8,16 0 158 2.415063867 32349 D W 19154743 + 16 [kvm]
>
> The content of that additional written sectors on the disk can either
> be "zero" or something else. Please let me know if you have a clue or
> tell me which file in the package should I be looking at closer to
> understand this behavior.
Most likely your guest partitions are not aligned to a 4k boundary; this
causes the host to add padding to the nearest 4k, which is consistent
with what you saw. You can use fdisk to confirm this.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-06 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 13:53 Host's write request is 4KB larger than that of the guest? Duy Le (Dan)
2011-01-06 15:13 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox