Skip to contentSkip to conversation

kvm-77 Excessive Disk Access causes real time clock hang!

DISCUSSION Erik Rull 4 participants 9 messages Apr 24, 2009 – May 4, 2009 KVM

lore
Share & tools
lore

Erik Rull

author
#0 lore raw

Hi all,

I'm running kvm-77 and windows xp as guest. When I start the defragmentation of the virtualized drive within the windows guest (well this is not a fine way, but it should work :-)), the real time clock starts hanging - I recognized that because some underlying hardware with own timers began to run out of synchronization. I did some research, took a stopwatch and measured against the system time. During the measurement of ~ 30 seconds I got a difference to the linux time (I just called "watch -n 1 date" which should come from the mainboard system time, doesn't it?) of ~10 seconds! This was the biggest difference I could measure, sometimes it was a little bit less.

What's happening here? I reduced the io priority and the guest process priority to a very low one - it didn't help!

Oh - I'm running the stuff on an Intel Core2Duo T5600 @ 1.83GHz with 2 Gig of RAM (Windows gets 1.5 Gig), the disk is an SATA with 40 Gigs.

Best regards,

Erik

#1 lore raw

Erik,

Quoted 12 lines · Erik Rull

Hi all,

I'm running kvm-77 and windows xp as guest. When I start the defragmentation of the virtualized drive within the windows guest (well this is not a fine way, but it should work :-)), the real time clock starts hanging - I recognized that because some underlying hardware with own timers began to run out of synchronization. I did some research, took a stopwatch and measured against the system time. During the measurement of ~ 30 seconds I got a difference to the linux time (I just called "watch -n 1 date" which should come from the mainboard system time, doesn't it?) of ~10 seconds! This was the biggest difference I could measure, sometimes it was a little bit less.

Can you try kvm-85 with -rtc-td-hack option? kvm-84 added this option, from Gleb (CC'ed), to reinject lost RTC interrupts.

Quoted 9 lines

What's happening here? I reduced the io priority and the guest process priority to a very low one - it didn't help!

Oh - I'm running the stuff on an Intel Core2Duo T5600 @ 1.83GHz with 2 Gig of RAM (Windows gets 1.5 Gig), the disk is an SATA with 40 Gigs.

Best regards,

Erik

#2 lore raw
In reply to Erik Rull
Quoted 7 lines · Erik Rull

Hi all,

I'm running kvm-77 and windows xp as guest. When I start the defragmentation of the virtualized drive within the windows guest (well this is not a fine way, but it should work :-)), the real time clock starts hanging - I recognized that because some underlying hardware with own timers began to run out of synchronization. I did some research, took a stopwatch and measured against the system time. During the measurement of ~ 30 seconds I got a difference to the linux time (I just called "watch -n 1 date" which should come from the mainboard system time, doesn't it?) of ~10 seconds! This was the biggest difference I could measure, sometimes it was a little bit less.

What's happening here? I reduced the io priority and the guest process priority to a very low one - it didn't help!

Oh - I'm running the stuff on an Intel Core2Duo T5600 @ 1.83GHz with 2 Gig of RAM (Windows gets 1.5 Gig), the disk is an SATA with 40 Gigs.

Are you using qcow2? In some cases qcow2 will stall the guest cpu.

Note that defragmenting the guest drive may cause the qcow2 file to fragment even more, and will certainly increase its size. I recommend only defragmenting when using raw storage.

Signature · 1 line
error compiling committee.c: too many arguments to function
author
#3 lore raw

Hi Avi,

Quoted 3 lines · Avi Kivity

Are you using qcow2? In some cases qcow2 will stall the guest cpu.

Note that defragmenting the guest drive may cause the qcow2 file to fragment even more, and will certainly increase its size. I recommend only defragmenting when using raw storage.

I don't think so. I created a partition on my host "real" harddrive and provided this partition to my windows guest.

If you have an idea, which virtualized drive system could be the fastest (except giving a complete disk to the guest), your comments are welcome :-)

Best regards,

Erik

#4 lore raw
Quoted 9 lines · Erik Rull
Quoted 3 lines

Are you using qcow2? In some cases qcow2 will stall the guest cpu.

Note that defragmenting the guest drive may cause the qcow2 file to fragment even more, and will certainly increase its size. I recommend only defragmenting when using raw storage.

I don't think so. I created a partition on my host "real" harddrive and provided this partition to my windows guest.

If you have an idea, which virtualized drive system could be the fastest (except giving a complete disk to the guest), your comments are welcome :-)

interface: virtio
cache: none
format: raw, using a partition or logical volume

What are you using?

Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
author
#5 lore raw

Hi Avi,

Quoted 5 lines · Avi Kivity

interface: virtio
cache: none
format: raw, using a partition or logical volume

What are you using?

uhm, I'm not sure, I call qemu with:

qemu-system-x86_64 -usb -hda /dev/hda2 -m 1536 -net nic,macaddr=$MACADDR -net tap,script=/etc/qemu-ifup -no-acpi -monitor stdio -usbdevice tablet -boot c

The /dev/hda2 is NTFS formatted - does this make sense, because you wrote sth. with raw... Maybe another file system would be faster? Or is it ignored by the guest system?

Best regards,

Erik

#6 lore raw
Quoted 7 lines · Erik Rull

Hi Avi,

Quoted 4 lines · Avi Kivity

interface: virtio
cache: none
format: raw, using a partition or logical volume

Quoted 8 lines
Quoted 1 line

What are you using?

uhm, I'm not sure, I call qemu with:

qemu-system-x86_64 -usb -hda /dev/hda2 -m 1536 -net nic,macaddr=$MACADDR -net tap,script=/etc/qemu-ifup -no-acpi -monitor stdio -usbdevice tablet -boot c

The /dev/hda2 is NTFS formatted - does this make sense, because you wrote sth. with raw... Maybe another file system would be faster? Or is it ignored by the guest system?

The file system is the guest's business. Instead of '-hda /dev/hda2', try

-drive file=/dev/hda2,cache=none

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
#7 lore raw

Hi Avi,

Quoted 4 lines · Avi Kivity

Erik Rull wrote:
The file system is the guest's business. Instead of '-hda /dev/hda2', try

-drive file=/dev/hda2,cache=none

great!
cache=off worked - none caused an error.

The Timing problem is still present but the XP system is now much more interactive during file access (copy / defrag,...)

I will try out the 84 kvm with the irq-reinjection.

Best regards,

Erik

author
#8 lore raw
In reply to Avi Kivity

Hi Avi,

Quoted 4 lines · Avi Kivity

Erik Rull wrote:
The file system is the guest's business. Instead of '-hda /dev/hda2', try

-drive file=/dev/hda2,cache=none

great!
cache=off worked - none caused an error.

The Timing problem is still present but the XP system is now much more interactive during file access (copy / defrag,...)

I will try out the 84 kvm with the irq-reinjection.

Best regards,

Erik