Mailing List Archive

Re: testing the balloon driver
The balloon driver is not at all polite about rate-limiting its
allocations. This needs fixing (e.g., rate limit to a page per jiffy).

-- Keir

> Am I mean? Maybe a little...
>
> Anyway, I'm now running the following test of the balloon driver
> with 2.6.8.1 and the latest Xen tree, on a 128MB domain 0 and a
> 64MB domain 1:
>
> # while sleep 1 ; do xm balloon 0 `echo $((($RANDOM % 64) + 60))`; done &
> # while sleep 1 ; do xm balloon 1 `echo $((($RANDOM % 32) + 30))`; done &
>
> Simultaneously, I'm running yum inside domain 1, putting a load
> on the loop device driver in domain 0 and the VM inside domain 1.
>
> This causes a number of page allocation failures inside domain 1,
> as well as:
>
> VM: killing process yum
>
> I'm off to investigate whether it's a VM bug, or whether I should
> make the balloon driver a little friendlier on the VM. Chances
> are I'll end up sending out a patch later, either here or to the
> linux-kernel mailing list ;)
>
> --
> "Debugging is twice as hard as writing the code in the first place.
> Therefore, if you write the code as cleverly as possible, you are,
> by definition, not smart enough to debug it." - Brian W. Kernighan
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: testing the balloon driver [ In reply to ]
> I'm off to investigate whether it's a VM bug, or whether I should
> make the balloon driver a little friendlier on the VM. Chances
> are I'll end up sending out a patch later, either here or to the
> linux-kernel mailing list ;)

Probably the balloon driver being unfriendly. Rate limiting was on the list
after getting the 2.6 port, ctrlif, etc working. We also need to fix the way
ballooned pages are recorded, since the current scheme breaks under
migration.

Expect a unified driver for 2.4 and 2.6 shortly.

Mark


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: testing the balloon driver [ In reply to ]
On Thu, 21 Oct 2004, Mark A. Williamson wrote:

> > I'm off to investigate whether it's a VM bug, or whether I should
> > make the balloon driver a little friendlier on the VM. Chances
> > are I'll end up sending out a patch later, either here or to the
> > linux-kernel mailing list ;)
>
> Probably the balloon driver being unfriendly. Rate limiting was on the list
> after getting the 2.6 port, ctrlif, etc working. We also need to fix the way
> ballooned pages are recorded, since the current scheme breaks under
> migration.

I was able to reproduce the problem without resizing
the VM, too. It could just be a 2.6.8.1 thing...

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: testing the balloon driver [ In reply to ]
On Thu, 21 Oct 2004, Rik van Riel wrote:

> I was able to reproduce the problem without resizing
> the VM, too. It could just be a 2.6.8.1 thing...

Looks like yum just needed more than 100MB of RAM and
100MB of swap. Adding another 200MB of swap makes yum
run fine, though slowly, while doing the random ballooning
of both the unprivileged guest and guest 0 once a second.

The system seems stable, if horribly slow ;)

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: testing the balloon driver [ In reply to ]
> Looks like yum just needed more than 100MB of RAM and
> 100MB of swap. Adding another 200MB of swap makes yum
> run fine, though slowly, while doing the random ballooning
> of both the unprivileged guest and guest 0 once a second.

Eek! I'd found previously that yum was rather resource hungry but didn't
know it was *that* hungry!!! No wonder my machine at home runs slowly :-)

It seems you were quite cruel with the balloon driver, so I'm glad the
driver itself didn't cause an explosion ;-)

Mark


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: testing the balloon driver [ In reply to ]
On Thu, 21 Oct 2004, Mark Williamson wrote:

> Eek! I'd found previously that yum was rather resource hungry but didn't
> know it was *that* hungry!!! No wonder my machine at home runs slowly :-)

I've seen yum eat up to around 200 MB memory.

> It seems you were quite cruel with the balloon driver, so I'm glad the
> driver itself didn't cause an explosion ;-)

Amazingly the system is still running. I'm resizing both of the
VMs by up to half their maximum size every second, which seems to
interact "quite poorly"[1] with the VM. I'm currently wondering
whether to find a way to improve this, or whether it's just a
"doctor, it hurts" thing.

cheers,

Rik
[1] yes, this is quite an understatement
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: testing the balloon driver [ In reply to ]
> On Thu, 21 Oct 2004, Rik van Riel wrote:
>
> > I was able to reproduce the problem without resizing
> > the VM, too. It could just be a 2.6.8.1 thing...
>
> Looks like yum just needed more than 100MB of RAM and
> 100MB of swap. Adding another 200MB of swap makes yum
> run fine, though slowly, while doing the random ballooning
> of both the unprivileged guest and guest 0 once a second.
>
> The system seems stable, if horribly slow ;)

I'm kinda surprised that the balloon driver's aggressive memory
grabbing doesn't cause the OOM killer to start selecting
victims for extermination.

If it really seems stable then maybe we don't have to add rate
limiting to the balloon driver after all? We grab the pages with
GFP_HIGHUSER. Maybe that's sufficiently non aggressive as-is?

I still think we should make all increase/decrease reservation
calls (e.g. those associated with netfront) go through the
balloon driver so that we can handle some of the low memory cases
more gracefully.

Ian


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: testing the balloon driver [ In reply to ]
On Thu, 21 Oct 2004, Ian Pratt wrote:

> I'm kinda surprised that the balloon driver's aggressive memory
> grabbing doesn't cause the OOM killer to start selecting
> victims for extermination.

It appears the system is ok, as long as you have enough
swap.

> If it really seems stable then maybe we don't have to add rate
> limiting to the balloon driver after all? We grab the pages with
> GFP_HIGHUSER. Maybe that's sufficiently non aggressive as-is?

It may be aggressive, but it's no worse than the worst
userspace programs. This means the VM is already able
to withstand this kind of load.

> I still think we should make all increase/decrease reservation
> calls (e.g. those associated with netfront) go through the
> balloon driver so that we can handle some of the low memory cases
> more gracefully.

I suspect that for the drivers we might want a mempool,
so it is guaranteed that the system will make progress.
I'll try harder to make the system crash, so I can tell
for sure whether this is needed.

One thing we should probably do is add the balloon
memory size to /proc/meminfo, so utilities can see
how much memory we really have and how much has been
given up.



--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel