Skip to contentSkip to conversation

Setting disk parameters in a VM

DISCUSSION Bill Davidsen 2 participants 3 messages Mar 13, 2009 – Mar 15, 2009 KVM

lore
Share & tools
lore
#0 lore raw

Based on a discussion in another list on ioschedulers, I added a few lines to my rc.local to set the scheduler to "noop" for disks with model QEMU*, to the scheduling in the VM will not be computing with the scheduling in the host.

I wonder if the same thinking applies to the "rotational" feature added to /sys/block in 2.6.29, intended for SSD but probably appropriate for virtual and nbd devices as well.

Signature · 3 lines
Bill Davidsen <[email protected]>
 "Woe unto the statesman who makes war without a reason that will still
 be valid when the war is over..." Otto von Bismark 
#1 lore raw
Quoted 3 lines · Bill Davidsen

Based on a discussion in another list on ioschedulers, I added a few lines to my rc.local to set the scheduler to "noop" for disks with model QEMU*, to the scheduling in the VM will not be computing with the scheduling in the host.

I wonder if the same thinking applies to the "rotational" feature added to /sys/block in 2.6.29, intended for SSD but probably appropriate for virtual and nbd devices as well.

A virtual disk backed by a rotational physical disk probably should be marked rotational, at least with cache=off.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw
Quoted 7 lines · Avi Kivity
Quoted 3 lines · Bill Davidsen

Based on a discussion in another list on ioschedulers, I added a few lines to my rc.local to set the scheduler to "noop" for disks with model QEMU*, to the scheduling in the VM will not be computing with the scheduling in the host.

I wonder if the same thinking applies to the "rotational" feature added to /sys/block in 2.6.29, intended for SSD but probably appropriate for virtual and nbd devices as well.

A virtual disk backed by a rotational physical disk probably should be marked rotational, at least with cache=off.

The question was more regarding virtual drives backed by files, but even so I would think the bad case would be to let the host decide what methods should be used, rather than the VM, which is more likely to do things wrong based on incomplete information.

Feel free to clarify if you think there's a case where the VM and the host should both be doing caching and scheduling. The only one I can imagine is if a USB port is passed to the VM and it has a storage device attached. That's not really a common configuration, I would guess.

Signature · 3 lines
Bill Davidsen <[email protected]>
 "Woe unto the statesman who makes war without a reason that will still
 be valid when the war is over..." Otto von Bismark