blob: 93e9f514a6b68d4b81905833cd47e89b8536fe38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
performance: 0.959
network: 0.927
device: 0.909
ppc: 0.884
files: 0.853
graphic: 0.852
socket: 0.845
mistranslation: 0.842
peripherals: 0.813
hypervisor: 0.810
virtual: 0.807
architecture: 0.804
kernel: 0.797
register: 0.793
PID: 0.784
VMM: 0.783
vnc: 0.777
boot: 0.774
assembly: 0.770
semantic: 0.765
x86: 0.749
debug: 0.745
permissions: 0.734
user-level: 0.715
arm: 0.678
risc-v: 0.676
i386: 0.661
KVM: 0.630
TCG: 0.613
block/nbd.c and drive backup to a remote nbd server
Description of problem:
Good afternoon!
I trying to copy attached drive content to remote NBD server via drive-backup QMP method. I'he tested two very similar ways but with very different performance. First is a backuping to exported NBD at another server. Second way is a backuping to same server but with connecting to /dev/nbd*.
Exporting qcow2 via nbd:
```
(nbd) ~ # qemu-nbd -p 12345 -x backup --cache=none --aio=native --persistent -f qcow2 backup.qcow2
(qemu) ~ # qemu-img info nbd://10.0.0.1:12345/backup
image: nbd://10.0.0.1:12345/backup
file format: raw
virtual size: 10 GiB (10737418240 bytes)
disk size: unavailable
```
Starting drive backuping via QMP:
```
{
"execute": "drive-backup",
"arguments": {
"device": "disk",
"sync": "full",
"target": "nbd://10.0.0.1:12345/backup",
"mode": "existing"
}
}
```
With process starting qemu notifying about warning:
> warning: The target block device doesn't provide information about the block size and it doesn't have a backing file. The default block size of 65536 bytes is used. If the actual block size of the target exceeds this default, the backup may be unusable
And backup process is limited by speed around 30MBps, watched by iotop
Second way to creating backup
Exporting qcow2 via nbd:
```
(nbd) ~ # qemu-nbd -p 12345 -x backup --cache=none --aio=native --persistent -f qcow2 backup.qcow2
```
```
(qemu) ~ # qemu-img info nbd://10.0.0.1:12345/backup
image: nbd://10.0.0.1:12345/backup
file format: raw
virtual size: 10 GiB (10737418240 bytes)
disk size: unavailable
(qemu) ~ # qemu-nbd -c /dev/nbd0 nbd://10.0.0.1:12345/backup
(qemu) ~ # qemu-img info /dev/nbd0
image: /dev/nbd0
file format: raw
virtual size: 10 GiB (10737418240 bytes)
disk size: 0 B
```
Starting drive backuping via QMP to local nbd device:
```
{
"execute": "drive-backup",
"arguments": {
"device": "disk",
"sync": "full",
"target": "/dev/nbd0",
"mode": "existing"
}
}
```
Backup process started without previous warning, and speed limited around 100MBps (network limit)
So I have question: how I can get same performance without connection network device to local block nbd device at the qemu host?
Kind regards
|