Skip to contentSkip to conversation

TCG slowdown

Qemu-devel Edgar E. Iglesias 2 participants 3 messages Aug 20, 2011

lore
Share & tools
lore
#0 lore raw

Lately, my TCG emulated machines have been running terribly slow. Like a factor 3 or 4 slower, hardly usable.

I bisected it to this:

commit d5ab9713d2d4037fd56b0adddd26c8d4dc11cf09

Author: Jan Kiszka <[email protected]>
Date:   Tue Aug 2 16:10:21 2011 +0200

Avoid allocating TCG resources in non-TCG mode

Do not allocate TCG-only resources like the translation buffer when running over KVM or XEN. Saves a "few" bytes in the qemu address space and is also conceptually cleaner.

It turns out that the init of the tb cache is now moved to before ram_size gets it's default value. And because the default tb cache size, if no -tb-size option is given, is based on the ram_size it is now zero..

Cheers

#1 lore raw
Quoted 15 lines · Edgar E. Iglesias

Lately, my TCG emulated machines have been running terribly slow. Like a factor 3 or 4 slower, hardly usable.

I bisected it to this:

commit d5ab9713d2d4037fd56b0adddd26c8d4dc11cf09

Author: Jan Kiszka <[email protected]>
Date:   Tue Aug 2 16:10:21 2011 +0200

Avoid allocating TCG resources in non-TCG mode

Do not allocate TCG-only resources like the translation buffer when running over KVM or XEN. Saves a "few" bytes in the qemu address space and is also conceptually cleaner.

Quoted 7 lines

It turns out that the init of the tb cache is now moved to before ram_size gets it's default value. And because the default tb cache size, if no -tb-size option is given, is based on the ram_size it is now zero..

Yes, already stumbled over that regression myself. See
http://thread.gmane.org/gmane.comp.emulators.qemu/113547

Jan

#2 lore raw
Quoted 20 lines · Jan Kiszka
Quoted 19 lines · Edgar E. Iglesias

Lately, my TCG emulated machines have been running terribly slow. Like a factor 3 or 4 slower, hardly usable.

I bisected it to this:

commit d5ab9713d2d4037fd56b0adddd26c8d4dc11cf09

Author: Jan Kiszka <[email protected]>
Date:   Tue Aug 2 16:10:21 2011 +0200

Avoid allocating TCG resources in non-TCG mode

Do not allocate TCG-only resources like the translation buffer when running over KVM or XEN. Saves a "few" bytes in the qemu address space and is also conceptually cleaner.

Quoted 6 lines
Quoted 3 lines

It turns out that the init of the tb cache is now moved to before ram_size gets it's default value. And because the default tb cache size, if no -tb-size option is given, is based on the ram_size it is now zero..

Yes, already stumbled over that regression myself. See
http://thread.gmane.org/gmane.comp.emulators.qemu/113547

OK, thanks. I've pushed your fix.

Cheers