Skip to contentSkip to conversation

Multiple concurrent async ops per IoCtx?

DISCUSSION Rutger ter Borg 5 participants 10 messages Aug 29, 2012 – Aug 30, 2012

lore
Share & tools
lore
#0 lore raw

Dear list,

are Rados' IoCtx objects able to process multiple asynchronous operations at the same time, or is it necessary to wait for an operation to complete, before issuing a following operation?

I.e., can I do the following and expect it to work?

IoCtx ctx;
ctx.aio_read( ... read 1 ... );
ctx.aio_read( ... read 2 ... );
ctx.aio_read( ... read 3 ... );

... time passes ...

read 3 completes (e.g.)
read 1 completes
read 2 completes

TIA,
Cheers,

Rutger

#1 lore raw

qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

Hi,

I'm trying to take a full vm state snapshot with savevm monitor command (qemu 0.12rc1 + rbd 0.48.1)

it seem that vmstate is not saved in the snapshot. (I also don't notice any vm hang during snapshot) Snapshot of disk is correctly made.

using loadvm monitor command, rollback correctly to disk snapshot but vm hang.

starting qemu with -loadvm snapshotname give
kvm: Error -22 while loading VM state

Is it normal ? Not implemented ?

Regards,

Alexandre

#2 lore raw

Re: qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

Am 29.08.2012 15:40, schrieb Alexandre DERUMIER:

Quoted 4 lines

Hi,

I'm trying to take a full vm state snapshot with savevm monitor command (qemu 0.12rc1 + rbd 0.48.1)

Have you tried qemu 1.1.1? 0.12 seems very old!

Signature · 22 lines
Mit freundlichen Grüßen,

Florian Wiessner

Smart Weblications GmbH
Martinsberger Str. 1
D-95119 Naila

fon.: +49 9282 9638 200
fax.: +49 9282 9638 205
24/7: +49 900 144 000 00 - 0,99 EUR/Min*
http://www.smart-weblications.de

--
Sitz der Gesellschaft: Naila
Geschäftsführer: Florian Wiessner
HRB-Nr.: HRB 3840 Amtsgericht Hof
*aus dem dt. Festnetz, ggf. abweichende Preise aus dem Mobilfunknetz
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

Re: qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

damn, I wanted to say, qemu 1.2rc1 ;)

----- Mail original -----

De: "Smart Weblications GmbH - Florian Wiessner" <[email protected]> À: "Alexandre DERUMIER" <[email protected]>
Cc: [email protected]
Envoyé: Mercredi 29 Août 2012 15:48:05
Objet: Re: qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

Am 29.08.2012 15:40, schrieb Alexandre DERUMIER:

Quoted 4 lines

Hi,

I'm trying to take a full vm state snapshot with savevm monitor command (qemu 0.12rc1 + rbd 0.48.1)

Have you tried qemu 1.1.1? 0.12 seems very old!

Signature · 46 lines
Mit freundlichen Grüßen, 

Florian Wiessner 

Smart Weblications GmbH 
Martinsberger Str. 1 
D-95119 Naila 

fon.: +49 9282 9638 200 
fax.: +49 9282 9638 205 
24/7: +49 900 144 000 00 - 0,99 EUR/Min* 
http://www.smart-weblications.de 

-- 
Sitz der Gesellschaft: Naila 
Geschäftsführer: Florian Wiessner 
HRB-Nr.: HRB 3840 Amtsgericht Hof 
*aus dem dt. Festnetz, ggf. abweichende Preise aus dem Mobilfunknetz 



-- 

-- 



	

Alexandre D e rumier 

Ingénieur Systèmes et Réseaux 


Fixe : 03 20 68 88 85 

Fax : 03 20 68 90 88 


45 Bvd du Général Leclerc 59100 Roubaix 
12 rue Marivaux 75002 Paris 

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw
In reply to Rutger ter Borg
Quoted 16 lines · Rutger ter Borg

Dear list,

are Rados' IoCtx objects able to process multiple asynchronous operations at the same time, or is it necessary to wait for an operation to complete, before issuing a following operation?

I.e., can I do the following and expect it to work?

IoCtx ctx;
ctx.aio_read( ... read 1 ... );
ctx.aio_read( ... read 2 ... );
ctx.aio_read( ... read 3 ... );

... time passes ...

Quoted 8 lines

read 3 completes (e.g.)
read 1 completes
read 2 completes

TIA,
Cheers,

Rutger

Yes, all the asynchronous functions can run in parallel. An IoCtx has little bearing on performance - it mostly just saves you from specifying the full set of parameters (i.e. pool, snapshot id, snapshot context, etc.) for each operation.

Are you seeing behavior that looks like the aio operations aren't being run in parallel?

Josh

#4 lore raw

Re: qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

In reply to Alexandre DERUMIER
Quoted 6 lines · Alexandre DERUMIER

Hi,

I'm trying to take a full vm state snapshot with savevm monitor command (qemu 0.12rc1 + rbd 0.48.1)

it seem that vmstate is not saved in the snapshot. (I also don't notice any vm hang during snapshot) Snapshot of disk is correctly made.

AFAIK the only block backend that supports saving the vmstate is qcow2. For rbd, the savevm/loadvm monitor commands are equivalent to 'rbd snap create' and 'rbd snap rollback'. They just save/rollback the disk.

Quoted 1 line

using loadvm monitor command, rollback correctly to disk snapshot but vm hang.

If you don't quiesce i/o i.e. via xfsfreeze (it works on the vfs level now, so it's not xfs-specific anymore) before snapshotting a running vm, the fs might require a fsck to be usable. This is only rolling back the disk, and not the memory state, so doing it while the vm is running is likely to cause problems.

Quoted 5 lines

starting qemu with -loadvm snapshotname give
kvm: Error -22 while loading VM state

Is it normal ? Not implemented ?

bdrv_{save|load}_vmstate are not implemented.

Quoted 4 lines

Regards,

Alexandre

#5 lore raw

Re: qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

Quoted 29 lines · Josh Durgin
Quoted 9 lines · Alexandre DERUMIER

Hi,

I'm trying to take a full vm state snapshot with savevm monitor command (qemu 0.12rc1 + rbd 0.48.1)

it seem that vmstate is not saved in the snapshot. (I also don't notice any vm hang during snapshot)
Snapshot of disk is correctly made.

AFAIK the only block backend that supports saving the vmstate is qcow2. For rbd, the savevm/loadvm monitor commands are equivalent to 'rbd snap create' and 'rbd snap rollback'. They just save/rollback the disk.

Quoted 2 lines

using loadvm monitor command, rollback correctly to disk snapshot but vm hang.

If you don't quiesce i/o i.e. via xfsfreeze (it works on the vfs level now, so it's not xfs-specific anymore) before snapshotting a running vm, the fs might require a fsck to be usable. This is only rolling back the disk, and not the memory state, so doing it while the vm is running is likely to cause problems.

Quoted 9 lines
Quoted 5 lines

starting qemu with -loadvm snapshotname give
kvm: Error -22 while loading VM state

Is it normal ? Not implemented ?

bdrv_{save|load}_vmstate are not implemented.

How complicated would it be to implement it? Looking at the api it seems trivial. We can add a new block with a .vmstate prefix and keeps the raw data on it. We should probably add some librbd functionality that stores and retrieves alternative data payloads and use it for that.

Yehuda

#7 lore raw

Re: qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

In reply to Josh Durgin

Thanks Josh,

that's exactly what I want to know.

(BTW: I think that sheepdog block driver also support the save of the vmstate
http://lists.wpkg.org/pipermail/sheepdog/2010-April/000368.html
)

Regards,

Alexandre
----- Mail original -----

De: "Josh Durgin" <[email protected]>
À: "Alexandre DERUMIER" <[email protected]>
Cc: [email protected]
Envoyé: Mercredi 29 Août 2012 18:15:17
Objet: Re: qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

Quoted 6 lines · Alexandre DERUMIER

Hi,

I'm trying to take a full vm state snapshot with savevm monitor command (qemu 0.12rc1 + rbd 0.48.1)

it seem that vmstate is not saved in the snapshot. (I also don't notice any vm hang during snapshot) Snapshot of disk is correctly made.

AFAIK the only block backend that supports saving the vmstate is qcow2. For rbd, the savevm/loadvm monitor commands are equivalent to 'rbd snap create' and 'rbd snap rollback'. They just save/rollback the disk.

Quoted 1 line

using loadvm monitor command, rollback correctly to disk snapshot but vm hang.

If you don't quiesce i/o i.e. via xfsfreeze (it works on the vfs level now, so it's not xfs-specific anymore) before snapshotting a running vm, the fs might require a fsck to be usable. This is only rolling back the disk, and not the memory state, so doing it while the vm is running is likely to cause problems.

Quoted 5 lines

starting qemu with -loadvm snapshotname give
kvm: Error -22 while loading VM state

Is it normal ? Not implemented ?

bdrv_{save|load}_vmstate are not implemented.

Quoted 4 lines

Regards,

Alexandre

Signature · 22 lines
-- 



	

Alexandre D e rumier 

Ingénieur Systèmes et Réseaux 


Fixe : 03 20 68 88 85 

Fax : 03 20 68 90 88 


45 Bvd du Général Leclerc 59100 Roubaix 
12 rue Marivaux 75002 Paris 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

Re: qemu-rbd : savevm monitor command don't save vmstate, is it normal ?

In reply to Yehuda Sadeh
Quoted 39 lines · Yehuda Sadeh
Quoted 29 lines · Josh Durgin
Quoted 9 lines · Alexandre DERUMIER

Hi,

I'm trying to take a full vm state snapshot with savevm monitor command (qemu 0.12rc1 + rbd 0.48.1)

it seem that vmstate is not saved in the snapshot. (I also don't notice any vm hang during snapshot)
Snapshot of disk is correctly made.

AFAIK the only block backend that supports saving the vmstate is qcow2. For rbd, the savevm/loadvm monitor commands are equivalent to 'rbd snap create' and 'rbd snap rollback'. They just save/rollback the disk.

Quoted 2 lines

using loadvm monitor command, rollback correctly to disk snapshot but vm hang.

If you don't quiesce i/o i.e. via xfsfreeze (it works on the vfs level now, so it's not xfs-specific anymore) before snapshotting a running vm, the fs might require a fsck to be usable. This is only rolling back the disk, and not the memory state, so doing it while the vm is running is likely to cause problems.

Quoted 9 lines
Quoted 5 lines

starting qemu with -loadvm snapshotname give
kvm: Error -22 while loading VM state

Is it normal ? Not implemented ?

bdrv_{save|load}_vmstate are not implemented.

Quoted 8 lines

How complicated would it be to implement it? Looking at the api it seems trivial. We can add a new block with a .vmstate prefix and keeps the raw data on it. We should probably add some librbd functionality that stores and retrieves alternative data payloads and use it for that.

Yehuda

We probably wouldn't want to keep it in a single object, since it could be very large, but it wouldn't be hard to reuse the regular I/O code to stripe it across objects as well. It wouldn't be very complicated to implement.

Josh

#9 lore raw
In reply to Josh Durgin
Quoted 9 lines · Josh Durgin

Yes, all the asynchronous functions can run in parallel. An IoCtx has little bearing on performance - it mostly just saves you from specifying the full set of parameters (i.e. pool, snapshot id, snapshot context, etc.) for each operation.

Are you seeing behavior that looks like the aio operations aren't being run in parallel?

Josh

Thanks, that's all I wanted to check at this point!

Cheers,

Rutger