+ All Categories
Home > Documents > QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source...

QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source...

Date post: 06-Jun-2020
Category:
Upload: others
View: 5 times
Download: 1 times
Share this document with a friend
24
QEMU BACKUP STATUS Vladimir Sementsov-Ogievskiy October 2018
Transcript
Page 1: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

QEMU BACKUP STATUSVladimir Sementsov-OgievskiyOctober 2018

Page 2: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

2

QEMU Backup

• Incremental

• External API

• Architecture & performance

Page 3: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

3

0 1 1 1 0 0 1 0

Incremental backup

disktarget

dirty bitmap

Page 4: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

4

Page 5: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

5

Bitmaps: persistent (2.10)

qmp: block-dirty-bitmap-add (persistent=true)

close()

open()

persistent bitmapin Qemu

persistent bitmapin Qcow2

Page 6: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

6

Bitmaps: migration (2.12)

mergepostcopysource Qemu

qmp: migrate-set-capabilities (capabilities= [{capability: dirty-bitmaps, state: True}])qmp: migrateqmp: migrate-start-postcopy

0 1 1 1 0 0 1 0

target Qemu0 0 0 0 0 0 0 0

0 1 1 1 0 0 1 0

Page 7: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

7

Bitmaps: migration through storage (2.10)

source Qemu

qmp: migrate

0 1 1 1 0 0 1 0

target Qemu0 1 1 1 0 0 1 0

shared Qcow20 1 1 1 0 0 1 0

downtime

Page 8: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

8

Bitmaps: snapshots

make a snapshot switch to the snapshot

do nothing all bitmaps are invalid• mark them all dirty• drop all the bitmaps• error

Page 9: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

9

Bitmaps: snapshots

make a snapshot switch to the snapshot

do nothing all bitmaps are invalid• mark them all dirty• drop all the bitmaps• error

enable dirty-bitmaps migration capability

drop all the bitmaps and load them from vmstate

Page 10: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

10

Bitmaps: snapshotsLegend: snapshot active state

Page 11: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

11

Bitmaps: snapshotsLegend: snapshot active state incremental backup

Page 12: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

12

Bitmaps: snapshots

0 1 1 1 0 0 1 0

Legend: snapshot active state incremental backup

Page 13: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

13

Bitmaps: snapshots

0 1 1 1 0 0 1 0

Legend: snapshot active state incremental backup

Page 14: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

14

Bitmaps: snapshots

0 0 0 0 0 0 0 0

0 1 1 1 0 0 1 0

Legend: snapshot active state incremental backup

Page 15: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

15

Bitmaps: NBD Export (3.0)Negotiation phase: select metadata contexts

• Commands:• NBD_OPT_LIST_META_CONTEXT• NBD_OPT_SET_META_CONTEXT

• base:allocation - common block status (2.12)• qemu:dirty-bitmap:<bitmap-export-name> (3.0)

Transmission phase: get metadata• NBD_CMD_BLOCK_STATUS

Page 16: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

16

Bitmaps: QMP APIbasic (2.4)

• block-dirty-bitmap-add- persistent (2.10)- x-disabled (3.0)

• block-dirty-bitmap-remove• block-dirty-bitmap-clear

new (3.0)• x-block-dirty-bitmap-enable• x-block-dirty-bitmap-disable• x-block-dirty-bitmap-merge

- node- dst_name- src_name

• x-nbd-server-add-bitmap- name- bitmap- bitmap-export-name

Page 17: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

17

External backup API: image fleecing (3.0)

backupsync=noneroot

active disk

temp qcow2 NBD server

backing

export

device

Page 18: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

18

External backup API: image fleecing (next)

active disk

temp qcow2 NBD server

backing

exportbackup-top

deviceroot

backing

target

Page 19: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

19

External backup API: image fleecing (next)

active disk

temp qcow2 far target

backing

backupbackup-top

deviceroot

backing

target

Page 20: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

20

External backup API: image fleecing (next)

active disk

temp qcow2 far target

backing

backupbackup-top

deviceroot

backing

target

ー extra CBW operationsー extra save/load to temp

Page 21: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

21

Backup architecture and performanceGuest write hangs

• don’t wait for write to far target (fleecing to temp)• don’t wait for write at all if possible• priority of CBW

Total number of iops• don’t write to temp if possible• share reads

Decrease number of CBW• lazy discards• copy from temp at last (or at first, optionally?)• predict guest writes

Optimize copying loop• asynchronous copying like in mirror instead of sequential

Page 22: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

22

Backup architecture and performance

active disk

RAM cache far targetbackup-top

deviceroot

backing

target

temp qcow2

backing

backupreads

backupwrites

Page 23: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

23

Qemu backup status

Merged• Qcow2 bitmaps (2.10)• Migration (2.12) ⇒ suspend/resume & snapshots• Fleecing (3.0)• NBD BLOCK_STATUS (3.0)• QMP API (3.0, still with x- prefix)

Plans• Backup architecture

Page 24: QEMU BACKUP STATUS - Linux Foundation Events · 7 Bitmaps: migration through storage (2.10) source Qemu qmp: migrate 0 1 1 1 0 0 1 0 target Qemu 0 1 1 1 0 0 1 0 shared Qcow2 0 1 1

24

Qemu backup status

Merged• Qcow2 bitmaps (2.10)• Migration (2.12) ⇒ suspend/resume & snapshots• Fleecing (3.0)• NBD BLOCK_STATUS (3.0)• QMP API (3.0, still with x- prefix)

Plans• Backup architecture

Vladimir [email protected]


Recommended