From: Anthony Liguori <anthony@codemonkey.ws>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH] Fake machine for scalability testing
Date: Thu, 20 Jan 2011 13:50:33 -0600 [thread overview]
Message-ID: <4D389209.8070202@codemonkey.ws> (raw)
In-Reply-To: <m31v47wlch.fsf@blackfin.pond.sub.org>
On 01/20/2011 11:12 AM, Markus Armbruster wrote:
> Anthony Liguori<anthony@codemonkey.ws> writes:
>
>
>> On 01/18/2011 02:16 PM, Markus Armbruster wrote:
>>
>>> The problem: you want to do serious scalability testing (1000s of VMs)
>>> of your management stack. If each guest eats up a few 100MiB and
>>> competes for CPU, that requires a serious host machine. Which you don't
>>> have. You also don't want to modify the management stack at all, if you
>>> can help it.
>>>
>>> The solution: a perfectly normal-looking QEMU that uses minimal
>>> resources. Ability to execute any guest code is strictly optional ;)
>>>
>>> New option -fake-machine creates a fake machine incapable of running
>>> guest code. Completely compiled out by default, enable with configure
>>> --enable-fake-machine.
>>>
>>> With -fake-machine, CPU use is negligible, and memory use is rather
>>> modest.
>>>
>>> Non-fake VM running F-14 live, right after boot:
>>> UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
>>> armbru 15707 2558 53 191837 414388 1 21:05 pts/3 00:00:29 [...]
>>>
>>> Same VM -fake-machine, after similar time elapsed:
>>> UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
>>> armbru 15742 2558 0 85129 9412 0 21:07 pts/3 00:00:00 [...]
>>>
>>> We're using a very similar patch for RHEL scalability testing.
>>>
>>>
>> Interesting, but:
>>
>> 9432 anthony 20 0 153m 14m 5384 S 0 0.2 0:00.22
>> qemu-system-x86
>>
>> That's qemu-system-x86 -m 4
>>
> Sure you ran qemu-system-x86 -fake-machine?
>
No, I didn't try it. My point was that -m 4 is already pretty small.
>> In terms of memory overhead, the largest source is not really going to
>> be addressed by -fake-machine (l1_phys_map and phys_ram_dirty).
>>
> git-grep phys_ram_dirty finds nothing.
>
Yeah, it's now ram_list[i].phys_dirty.
l1_phys_map is (sizeof(void *) + sizeof(PhysPageDesc)) * mem_size_in_pages
phys_dirty is mem_size_in_pages bytes.
>> I don't really understand the point of not creating a VCPU with KVM.
>> Is there some type of overhead in doing that?
>>
> I briefly looked at both main loops, TCG's was the first one I happened
> to crack, and I didn't feel like doing both then. If the general
> approach is okay, I'll gladly investigate how to do it with KVM.
>
I guess what I don't understand is why do you need to not run guest
code? Specifically, if you remove the following, is it any less useful?
diff --git a/cpu-exec.c b/cpu-exec.c
index 8c9fb8b..cd1259a 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -230,7 +230,7 @@ int cpu_exec(CPUState *env1)
uint8_t *tc_ptr;
unsigned long next_tb;
- if (cpu_halted(env1) == EXCP_HALTED)
+ if (fake_machine || cpu_halted(env1) == EXCP_HALTED)
return EXCP_HALTED;
Regards,
Anthony Liguori
next prev parent reply other threads:[~2011-01-20 19:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 20:16 [Qemu-devel] [RFC PATCH] Fake machine for scalability testing Markus Armbruster
2011-01-20 16:34 ` Anthony Liguori
2011-01-20 17:12 ` Markus Armbruster
2011-01-20 19:50 ` Anthony Liguori [this message]
2011-01-21 10:38 ` Markus Armbruster
2011-01-21 14:45 ` Anthony Liguori
2011-01-21 16:51 ` Markus Armbruster
2011-01-21 10:43 ` Daniel P. Berrange
2011-01-21 14:43 ` Anthony Liguori
2011-01-21 14:46 ` Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D389209.8070202@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).