Skip to contentSkip to conversation

Testing migration under stress

Qemu-devel David Gibson 5 participants 12 messages Nov 2, 2012 – Nov 6, 2012

lore
Share & tools
lore
#0 lore raw

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

Does anyone have some ideas for testing this better: workloads that are less likely to trigger this behaviour, or settings to tweak in the migration itself to make it more likely to complete migration while the workload is still active.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#1 lore raw
Quoted 10 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

As you are doing local migration one option is to setting the speed higher than line speed , as we don't actually send the data, another is to set high downtime.

Quoted 7 lines

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

The workload you chose is really bad for live migration, as all the guest does is dirtying his memory. I recommend looking for workload that does some networking or disk IO. Vinod succeeded running SwingBench and SLOB benchmarks that converged ok, I don't know if they run on pseries, but similar workload should be ok(small database/warehouse). We found out that SpecJbb on the other hand is hard to converge.
Web workload or video streaming also do the trick.

Cheers,
Orit

Quoted 5 lines

Does anyone have some ideas for testing this better: workloads that are less likely to trigger this behaviour, or settings to tweak in the migration itself to make it more likely to complete migration while the workload is still active.

#2 lore raw
Quoted 11 lines · Orit Wasserman
Quoted 9 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

Quoted 3 lines

As you are doing local migration one option is to setting the speed higher than line speed , as we don't actually send the data, another is to set high downtime.

I'm not entirely sure what you mean by that. But I do have suspicions based on this and other factors that the default bandwidth it is limiting to is horribly, horribly low.

Quoted 9 lines
Quoted 7 lines

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

The workload you chose is really bad for live migration, as all the guest does is dirtying his memory.

Well, I realised that was true of the matrix multiply. For video encode though, the output data should be much, much smaller than the input, so I wouldn't expect it to be dirtying memory that fast.

Quoted 7 lines

I recommend looking for workload
that does some networking or disk IO. Vinod succeeded running SwingBench and SLOB benchmarks that converged ok, I don't know if they run on pseries, but similar workload should be ok(small database/warehouse). We found out that SpecJbb on the other hand is hard to converge. Web workload or video streaming also do the trick.

Hrm. As something really simple and stupid, I did try migrationg an ls -lR /, but even that didn't converge :/.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#3 lore raw
Quoted 42 lines · David Gibson
Quoted 11 lines · Orit Wasserman
Quoted 9 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

Quoted 3 lines

As you are doing local migration one option is to setting the speed higher than line speed , as we don't actually send the data, another is to set high downtime.

I'm not entirely sure what you mean by that. But I do have suspicions based on this and other factors that the default bandwidth it is limiting to is horribly, horribly low.

Quoted 9 lines
Quoted 7 lines

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

The workload you chose is really bad for live migration, as all the guest does is dirtying his memory.

Well, I realised that was true of the matrix multiply. For video encode though, the output data should be much, much smaller than the input, so I wouldn't expect it to be dirtying memory that fast.

Quoted 7 lines

I recommend looking for workload
that does some networking or disk IO. Vinod succeeded running SwingBench and SLOB benchmarks that converged ok, I don't know if they run on pseries, but similar workload should be ok(small database/warehouse). We found out that SpecJbb on the other hand is hard to converge. Web workload or video streaming also do the trick.

Quoted 2 lines

Hrm. As something really simple and stupid, I did try migrationg an ls -lR /, but even that didn't converge :/.

That is strange, it should converge even with the defaults, Any special about your storage setup ?

Quoted 1 line
#4 lore raw
Quoted 43 lines · Orit Wasserman
Quoted 42 lines · David Gibson
Quoted 11 lines · Orit Wasserman
Quoted 9 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

Quoted 3 lines

As you are doing local migration one option is to setting the speed higher than line speed , as we don't actually send the data, another is to set high downtime.

I'm not entirely sure what you mean by that. But I do have suspicions based on this and other factors that the default bandwidth it is limiting to is horribly, horribly low.

Quoted 9 lines
Quoted 7 lines

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

The workload you chose is really bad for live migration, as all the guest does is dirtying his memory.

Well, I realised that was true of the matrix multiply. For video encode though, the output data should be much, much smaller than the input, so I wouldn't expect it to be dirtying memory that fast.

Quoted 7 lines

I recommend looking for workload
that does some networking or disk IO. Vinod succeeded running SwingBench and SLOB benchmarks that converged ok, I don't know if they run on pseries, but similar workload should be ok(small database/warehouse). We found out that SpecJbb on the other hand is hard to converge. Web workload or video streaming also do the trick.

Quoted 4 lines
Quoted 2 lines

Hrm. As something really simple and stupid, I did try migrationg an ls -lR /, but even that didn't converge :/.

That is strange, it should converge even with the defaults, Any special about your storage setup ?

I didn't think so. Do you mean host or guest storage setup?

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#5 lore raw
In reply to Orit Wasserman
Quoted 21 lines · Orit Wasserman
Quoted 10 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

As you are doing local migration one option is to setting the speed higher than line speed , as we don't actually send the data, another is to set high downtime.

Quoted 7 lines

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

Quoted 6 lines

The workload you chose is really bad for live migration, as all the guest does is dirtying his memory. I recommend looking for workload that does some networking or disk IO. Vinod succeeded running SwingBench and SLOB benchmarks that converged ok, I don't know if they run on pseries, but similar workload should be ok(small database/warehouse). We found out that SpecJbb on the other hand is hard to converge.
Web workload or video streaming also do the trick.

My ffmpeg workload is simple encoding h263+ac3 to h263+ac3, 64*36 pixels. So it should not be dirtying memory too much. Or is it?

(qemu) info migrate
capabilities: xbzrle: off
Migration status: completed
total time: 14538 milliseconds
downtime: 1273 milliseconds
transferred ram: 389961 kbytes
remaining ram: 0 kbytes
total ram: 1065024 kbytes
duplicate: 181949 pages
normal: 97446 pages
normal bytes: 389784 kbytes

How many bytes were actually transferred? "duplicate" * 4K = 745MB?

Is there any tool in QEMU to see how many pages are used/dirty/etc? "info" does not seem to have any kind of such statistic.

btw the new guest did not resume (qemu still responds on commands) but this is probably our problem within "pseries" platform. What is strange is that "info migrate" on the new guest shows nothing:

(qemu) info migrate
(qemu)

Quoted 9 lines

Cheers,
Orit

Quoted 5 lines

Does anyone have some ideas for testing this better: workloads that are less likely to trigger this behaviour, or settings to tweak in the migration itself to make it more likely to complete migration while the workload is still active.

Signature · 1 line
Alexey
#6 lore raw
Quoted 30 lines · Alexey Kardashevskiy
Quoted 21 lines · Orit Wasserman
Quoted 10 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

As you are doing local migration one option is to setting the speed higher than line speed , as we don't actually send the data, another is to set high downtime.

Quoted 7 lines

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

Quoted 6 lines

The workload you chose is really bad for live migration, as all the guest does is dirtying his memory. I recommend looking for workload that does some networking or disk IO. Vinod succeeded running SwingBench and SLOB benchmarks that converged ok, I don't know if they run on pseries, but similar workload should be ok(small database/warehouse). We found out that SpecJbb on the other hand is hard to converge.
Web workload or video streaming also do the trick.

Quoted 2 lines

My ffmpeg workload is simple encoding h263+ac3 to h263+ac3, 64*36 pixels. So it should not be dirtying memory too much. Or is it?

Oh.. if your encoding the same format to the same format it may well be optimized and therefore memory limited. I was envisaging encoding an uncompressed format to a highly compressed format, which should be compute limited rather than memory bandwidth limited. The size and resolution of the input doesn't really matter as long as:
* the output size is much smaller than the input size
and * it takes several minutes for the full encode to give a
reasonable amount of time for the migrate to converge.

Quoted 13 lines

(qemu) info migrate
capabilities: xbzrle: off
Migration status: completed
total time: 14538 milliseconds
downtime: 1273 milliseconds
transferred ram: 389961 kbytes
remaining ram: 0 kbytes
total ram: 1065024 kbytes
duplicate: 181949 pages
normal: 97446 pages
normal bytes: 389784 kbytes

Quoted 7 lines

How many bytes were actually transferred? "duplicate" * 4K = 745MB?

Is there any tool in QEMU to see how many pages are used/dirty/etc? "info" does not seem to have any kind of such statistic.

btw the new guest did not resume (qemu still responds on commands) but this is probably our problem within "pseries" platform. What is

Uh, that's a bug, and I'm not sure when it broke. If the migrate isn't even working we're premature in attempting to work out why it isn't happening when we expect.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#7 lore raw
Quoted 31 lines · David Gibson
Quoted 30 lines · Alexey Kardashevskiy
Quoted 27 lines · Orit Wasserman
Quoted 10 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

As you are doing local migration one option is to setting the speed higher than line speed , as we don't actually send the data, another is to set high downtime.

Quoted 7 lines

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

The workload you chose is really bad for live migration, as all the guest does is dirtying his memory. I recommend looking for workload that does some networking or disk IO. Vinod succeeded running SwingBench and SLOB benchmarks that converged ok, I don't know if they run on pseries, but similar workload should be ok(small database/warehouse). We found out that SpecJbb on the other hand is hard to converge.
Web workload or video streaming also do the trick.

Quoted 5 lines
Quoted 2 lines

My ffmpeg workload is simple encoding h263+ac3 to h263+ac3, 64*36 pixels. So it should not be dirtying memory too much. Or is it?

Oh.. if your encoding the same format to the same format it may well be optimized and therefore memory limited.

No, it is not optimized, it still decodes and encodes as I inserted some filter in a chain.

Quoted 7 lines

I was envisaging encoding
an uncompressed format to a highly compressed format, which should be compute limited rather than memory bandwidth limited.

The size and
resolution of the input doesn't really matter as long as:
* the output size is much smaller than the input size

This is another scenario, I run both. I just tried to reduce memory consumption as it was recommended here and see if anything changes.

Originally it was 1280*720 to 64*36 but I am not sure it does not use much memory as (I suspect at least sometime) ffmpeg may decode a series of full size frames to do motion detection or something.

Quoted 2 lines

and * it takes several minutes for the full encode to give a
reasonable amount of time for the migrate to converge.

90 seconds each file, if I run a script which does encoding in a loop, the pause between encodings is not big enough to finish migration anyway if I encode big video to small video.

However if it is 64*36, migration finishes (the first qemu succeeds and stops) but the new guest does not resume.

Quoted 18 lines
Quoted 18 lines

(qemu) info migrate
capabilities: xbzrle: off
Migration status: completed
total time: 14538 milliseconds
downtime: 1273 milliseconds
transferred ram: 389961 kbytes
remaining ram: 0 kbytes
total ram: 1065024 kbytes
duplicate: 181949 pages
normal: 97446 pages
normal bytes: 389784 kbytes

How many bytes were actually transferred? "duplicate" * 4K = 745MB?

Is there any tool in QEMU to see how many pages are used/dirty/etc? "info" does not seem to have any kind of such statistic.

Quoted 6 lines
Quoted 2 lines

btw the new guest did not resume (qemu still responds on commands) but this is probably our problem within "pseries" platform. What is

Uh, that's a bug, and I'm not sure when it broke. If the migrate isn't even working we're premature in attempting to work out why it isn't happening when we expect.

Here I wanted to emphasize that I would like to find some way to get information about how migration is doing (or done) in the new guest - there is no statistic about it.

Signature · 1 line
Alexey
#8 lore raw
In reply to Alexey Kardashevskiy
Quoted 44 lines · Alexey Kardashevskiy
Quoted 21 lines · Orit Wasserman
Quoted 10 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

As you are doing local migration one option is to setting the speed higher than line speed , as we don't actually send the data, another is to set high downtime.

Quoted 7 lines

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

Quoted 6 lines

The workload you chose is really bad for live migration, as all the guest does is dirtying his memory. I recommend looking for workload that does some networking or disk IO. Vinod succeeded running SwingBench and SLOB benchmarks that converged ok, I don't know if they run on pseries, but similar workload should be ok(small database/warehouse). We found out that SpecJbb on the other hand is hard to converge.
Web workload or video streaming also do the trick.

My ffmpeg workload is simple encoding h263+ac3 to h263+ac3, 64*36 pixels. So it should not be dirtying memory too much. Or is it?

(qemu) info migrate
capabilities: xbzrle: off
Migration status: completed
total time: 14538 milliseconds
downtime: 1273 milliseconds
transferred ram: 389961 kbytes
remaining ram: 0 kbytes
total ram: 1065024 kbytes
duplicate: 181949 pages
normal: 97446 pages
normal bytes: 389784 kbytes

Quoted 1 line

How many bytes were actually transferred? "duplicate" * 4K = 745MB?

For duplicate we send one byte and those are usually zero pages + the page header. transferred is the actual amount of bytes sent so here is around 389M was sent.

Quoted 2 lines

Is there any tool in QEMU to see how many pages are used/dirty/etc?

sadly no.

Quoted 7 lines

"info" does not seem to have any kind of such statistic.

btw the new guest did not resume (qemu still responds on commands) but this is probably our problem within "pseries" platform. What is strange is that "info migrate" on the new guest shows nothing:

(qemu) info migrate
(qemu)

the "info migrate" command displays outgoing migration information not incoming ..

Quoted 14 lines
Quoted 12 lines

Cheers,
Orit

Quoted 5 lines

Does anyone have some ideas for testing this better: workloads that are less likely to trigger this behaviour, or settings to tweak in the migration itself to make it more likely to complete migration while the workload is still active.

#9 lore raw
In reply to David Gibson

Il 02/11/2012 04:10, David Gibson ha scritto:

Quoted 17 lines

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

Quoted 4 lines

Does anyone have some ideas for testing this better: workloads that are less likely to trigger this behaviour, or settings to tweak in the migration itself to make it more likely to complete migration while the workload is still active.

Have you set the migration speed (migrate_set_speed) to something higher than the default 32MB/sec?

Paolo

#10 lore raw
In reply to David Gibson
Quoted 17 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

Quoted 4 lines

Does anyone have some ideas for testing this better: workloads that are less likely to trigger this behaviour, or settings to tweak in the migration itself to make it more likely to complete migration while the workload is still active.

You can:

migrate_set_downtime 2s (or so)

I normally run stress, and you move the memory that it dirties until it converges (depends a lot of your networking).

Doing anything that is really memory intensive is basically never gonig to converge.

Later, Juan.

#11 lore raw
Quoted 23 lines · Juan Quintela
Quoted 17 lines · David Gibson

Asking for some advice on the list.

I have prorotype savevm and migration support ready for the pseries machine. They seem to work under simple circumstances (idle guest). To test them more extensively I've been attempting to perform live migrations (just over tcp->localhost) which the guest is active with something. In particular I've tried while using octave to do matrix multiply (so exercising the FP unit) and my colleague Alexey has tried during some video encoding.

However, in each of these cases, we've found that the migration only completes and the source instance only stops after the intensive workload has (just) completed. What I surmise is happening is that the workload is touching memory pages fast enough that the ram migration code is never getting below the threshold to complete the migration until the guest is idle again.

Quoted 4 lines

Does anyone have some ideas for testing this better: workloads that are less likely to trigger this behaviour, or settings to tweak in the migration itself to make it more likely to complete migration while the workload is still active.

Quoted 6 lines

You can:

migrate_set_downtime 2s (or so)

I normally run stress, and you move the memory that it dirties until it converges (depends a lot of your networking).

So, I'm using tcp to localhost, so it should be really fast, but it doesn't seem to be :/. I suspect there are some other bugs here.

Quoted 2 lines

Doing anything that is really memory intensive is basically never gonig to converge.

Well, I didn't think the loads I chose would be memory limited (especially the video encode), but..

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson