[WIP] Build VM Cold boot versus loadvm

design

#1

Introduction

Measured from start of execution (the call of qemu-...) until the mount is available inside the VM by means of using touch.

Cold boot times

1GB RAM

import pandas as pd
coldboot_sample_1G = pd.read_csv('/home/sergiusens/Documents/Notes/Canonical/vm-boot-times/1G-coldboot-start-finish-times.csv',
                                 delimiter=';', parse_dates=['Start', 'Finish'])
coldboot_sample_1G['Delta'] = coldboot_sample_1G['Finish'] - coldboot_sample_1G['Start']
coldboot_sample_1G
Start Finish Delta
0 2018-06-12 17:03:54.674969 2018-06-12 17:04:19.910951 00:00:25.235982
1 2018-06-12 17:04:20.774344 2018-06-12 17:04:46.365410 00:00:25.591066
2 2018-06-12 17:04:47.216966 2018-06-12 17:05:11.698539 00:00:24.481573
3 2018-06-12 17:05:12.520038 2018-06-12 17:05:38.807841 00:00:26.287803
4 2018-06-12 17:05:39.696633 2018-06-12 17:06:04.931237 00:00:25.234604
5 2018-06-12 17:06:06.117922 2018-06-12 17:06:30.961436 00:00:24.843514
6 2018-06-12 17:06:31.866414 2018-06-12 17:06:56.586429 00:00:24.720015
7 2018-06-12 17:06:57.553887 2018-06-12 17:07:22.933985 00:00:25.380098
8 2018-06-12 17:07:23.812567 2018-06-12 17:07:48.077106 00:00:24.264539
9 2018-06-12 17:07:48.886194 2018-06-12 17:08:13.231889 00:00:24.345695
10 2018-06-12 17:08:14.027932 2018-06-12 17:08:38.907913 00:00:24.879981
11 2018-06-12 17:08:39.843765 2018-06-12 17:09:03.636801 00:00:23.793036
12 2018-06-12 17:09:04.504390 2018-06-12 17:09:29.023365 00:00:24.518975
13 2018-06-12 17:09:29.978952 2018-06-12 17:09:53.974678 00:00:23.995726
14 2018-06-12 17:09:54.846790 2018-06-12 17:10:18.503797 00:00:23.657007
15 2018-06-12 17:10:19.427145 2018-06-12 17:10:43.040646 00:00:23.613501
16 2018-06-12 17:10:43.972050 2018-06-12 17:11:08.802130 00:00:24.830080
17 2018-06-12 17:11:09.668763 2018-06-12 17:11:33.634144 00:00:23.965381
18 2018-06-12 17:11:34.483542 2018-06-12 17:11:57.137654 00:00:22.654112
19 2018-06-12 17:11:58.135061 2018-06-12 17:12:20.995194 00:00:22.860133
20 2018-06-12 17:12:21.914354 2018-06-12 17:12:45.549281 00:00:23.634927
21 2018-06-12 17:12:46.371545 2018-06-12 17:13:10.337889 00:00:23.966344
22 2018-06-12 17:13:11.239791 2018-06-12 17:13:35.018456 00:00:23.778665
23 2018-06-12 17:13:35.820569 2018-06-12 17:13:58.569004 00:00:22.748435
24 2018-06-12 17:13:59.396431 2018-06-12 17:14:24.582288 00:00:25.185857
25 2018-06-12 17:14:25.445529 2018-06-12 17:14:47.950501 00:00:22.504972
26 2018-06-12 17:14:48.856344 2018-06-12 17:15:11.907990 00:00:23.051646
27 2018-06-12 17:15:12.717823 2018-06-12 17:15:37.283618 00:00:24.565795
28 2018-06-12 17:15:38.093762 2018-06-12 17:16:01.957661 00:00:23.863899
29 2018-06-12 17:16:02.732123 2018-06-12 17:16:26.994538 00:00:24.262415
30 2018-06-12 17:16:27.990603 2018-06-12 17:16:53.353718 00:00:25.363115
31 2018-06-12 17:16:54.222878 2018-06-12 17:17:19.151498 00:00:24.928620
32 2018-06-12 17:17:20.076170 2018-06-12 17:17:45.034941 00:00:24.958771
33 2018-06-12 17:17:45.848998 2018-06-12 17:18:11.524951 00:00:25.675953
34 2018-06-12 17:18:12.333128 2018-06-12 17:18:36.800052 00:00:24.466924
35 2018-06-12 17:18:37.745501 2018-06-12 17:19:02.157126 00:00:24.411625
36 2018-06-12 17:19:03.101404 2018-06-12 17:19:28.295573 00:00:25.194169
print('Average delta {!s} with a variance of {!s}'.format(coldboot_sample_1G['Delta'].mean(), coldboot_sample_1G['Delta'].var()))
Average delta 0 days 00:00:24.370674 with a variance of 8.16783735703359e+17

2GB RAM

coldboot_sample_2G = pd.read_csv('/home/sergiusens/Documents/Notes/Canonical/vm-boot-times/2G-coldboot-start-finish-times.csv',
                                 delimiter=';', parse_dates=['Start', 'Finish'])
coldboot_sample_2G['Delta'] = coldboot_sample_2G['Finish'] - coldboot_sample_2G['Start']
coldboot_sample_2G
Start Finish Delta
0 2018-06-12 17:25:58.361688 2018-06-12 17:26:23.594974 00:00:25.233286
1 2018-06-12 17:26:24.497903 2018-06-12 17:26:48.834159 00:00:24.336256
2 2018-06-12 17:26:49.715589 2018-06-12 17:27:14.615097 00:00:24.899508
3 2018-06-12 17:27:15.565671 2018-06-12 17:27:40.794817 00:00:25.229146
4 2018-06-12 17:27:41.749636 2018-06-12 17:28:05.965901 00:00:24.216265
5 2018-06-12 17:28:06.905493 2018-06-12 17:28:30.668091 00:00:23.762598
6 2018-06-12 17:28:31.648992 2018-06-12 17:28:57.585385 00:00:25.936393
7 2018-06-12 17:28:58.508800 2018-06-12 17:29:24.076187 00:00:25.567387
8 2018-06-12 17:29:25.059381 2018-06-12 17:29:52.334285 00:00:27.274904
9 2018-06-12 17:29:53.236287 2018-06-12 17:30:19.894727 00:00:26.658440
10 2018-06-12 17:30:20.770831 2018-06-12 17:30:45.296420 00:00:24.525589
11 2018-06-12 17:30:46.521801 2018-06-12 17:31:11.370344 00:00:24.848543
12 2018-06-12 17:31:12.261386 2018-06-12 17:31:38.538216 00:00:26.276830
13 2018-06-12 17:31:39.477956 2018-06-12 17:32:04.482127 00:00:25.004171
14 2018-06-12 17:32:05.431414 2018-06-12 17:32:31.596046 00:00:26.164632
15 2018-06-12 17:32:32.663872 2018-06-12 17:32:59.243661 00:00:26.579789
16 2018-06-12 17:33:00.208856 2018-06-12 17:33:27.070499 00:00:26.861643
17 2018-06-12 17:33:27.933556 2018-06-12 17:33:52.425841 00:00:24.492285
18 2018-06-12 17:33:53.470195 2018-06-12 17:34:19.634482 00:00:26.164287
19 2018-06-12 17:34:20.604478 2018-06-12 17:34:45.236628 00:00:24.632150
20 2018-06-12 17:34:46.255450 2018-06-12 17:35:10.772688 00:00:24.517238
21 2018-06-12 17:35:11.814210 2018-06-12 17:35:38.489410 00:00:26.675200
22 2018-06-12 17:35:39.485096 2018-06-12 17:36:05.388134 00:00:25.903038
23 2018-06-12 17:36:06.336716 2018-06-12 17:36:31.220953 00:00:24.884237
24 2018-06-12 17:36:32.210639 2018-06-12 17:36:59.096081 00:00:26.885442
25 2018-06-12 17:37:00.053491 2018-06-12 17:37:25.141141 00:00:25.087650
26 2018-06-12 17:37:26.084209 2018-06-12 17:37:54.136384 00:00:28.052175
27 2018-06-12 17:37:55.045100 2018-06-12 17:38:19.918172 00:00:24.873072
28 2018-06-12 17:38:20.813473 2018-06-12 17:38:45.089183 00:00:24.275710
29 2018-06-12 17:38:45.994617 2018-06-12 17:39:11.135039 00:00:25.140422
30 2018-06-12 17:39:12.058773 2018-06-12 17:39:38.173720 00:00:26.114947
31 2018-06-12 17:39:39.080416 2018-06-12 17:40:03.925975 00:00:24.845559
32 2018-06-12 17:40:04.838923 2018-06-12 17:40:29.796730 00:00:24.957807
33 2018-06-12 17:40:30.746030 2018-06-12 17:40:55.320829 00:00:24.574799
34 2018-06-12 17:40:56.300179 2018-06-12 17:41:22.365503 00:00:26.065324
35 2018-06-12 17:41:23.261097 2018-06-12 17:41:48.150493 00:00:24.889396
36 2018-06-12 17:41:49.104845 2018-06-12 17:42:13.860579 00:00:24.755734
print('Average delta {!s} with a variance of {!s}'.format(coldboot_sample_2G['Delta'].mean(), coldboot_sample_2G['Delta'].var()))
Average delta 0 days 00:00:25.436806 with a variance of 9.909970096572133e+17

loadvm times

1GB RAM

loadvm_sample_1G = pd.read_csv('/home/sergiusens/Documents/Notes/Canonical/vm-boot-times/1G-loadvm-start-finish-times.csv',
                      delimiter=';', parse_dates=['Start', 'Finish'])
loadvm_sample_1G['Delta'] = loadvm_sample_1G['Finish'] - loadvm_sample_1G['Start']
loadvm_sample_1G
Start Finish Delta
0 2018-06-12 15:13:41.216906 2018-06-12 15:14:03.879146 00:00:22.662240
1 2018-06-12 15:23:27.746064 2018-06-12 15:23:44.945058 00:00:17.198994
2 2018-06-12 15:23:45.703374 2018-06-12 15:24:01.629365 00:00:15.925991
3 2018-06-12 15:24:02.401349 2018-06-12 15:24:18.764759 00:00:16.363410
4 2018-06-12 15:24:19.517818 2018-06-12 15:24:34.847128 00:00:15.329310
5 2018-06-12 15:24:35.639206 2018-06-12 15:24:49.086089 00:00:13.446883
6 2018-06-12 15:24:49.799763 2018-06-12 15:25:03.748531 00:00:13.948768
7 2018-06-12 15:25:04.491458 2018-06-12 15:25:20.291120 00:00:15.799662
8 2018-06-12 15:25:21.037643 2018-06-12 15:25:34.646192 00:00:13.608549
9 2018-06-12 15:25:35.375660 2018-06-12 15:25:48.957556 00:00:13.581896
10 2018-06-12 15:25:49.681107 2018-06-12 15:26:04.246557 00:00:14.565450
11 2018-06-12 15:26:04.974875 2018-06-12 15:26:18.255459 00:00:13.280584
12 2018-06-12 15:26:19.006609 2018-06-12 15:26:32.606103 00:00:13.599494
13 2018-06-12 15:26:33.369666 2018-06-12 15:26:47.140790 00:00:13.771124
14 2018-06-12 15:26:47.876619 2018-06-12 15:27:02.907923 00:00:15.031304
15 2018-06-12 15:27:03.969485 2018-06-12 15:27:17.276560 00:00:13.307075
16 2018-06-12 15:27:18.046608 2018-06-12 15:27:31.457715 00:00:13.411107
17 2018-06-12 15:27:32.194514 2018-06-12 15:27:45.517207 00:00:13.322693
18 2018-06-12 15:27:46.283318 2018-06-12 15:28:00.227583 00:00:13.944265
19 2018-06-12 15:28:01.048679 2018-06-12 15:28:15.555890 00:00:14.507211
20 2018-06-12 15:28:16.350839 2018-06-12 15:28:29.457083 00:00:13.106244
21 2018-06-12 15:28:30.248292 2018-06-12 15:28:45.196841 00:00:14.948549
22 2018-06-12 15:28:45.974370 2018-06-12 15:28:58.703664 00:00:12.729294
23 2018-06-12 15:28:59.510095 2018-06-12 15:29:12.309945 00:00:12.799850
24 2018-06-12 15:29:13.196724 2018-06-12 15:29:28.749889 00:00:15.553165
25 2018-06-12 15:29:29.582810 2018-06-12 15:29:45.702672 00:00:16.119862
26 2018-06-12 15:29:46.519060 2018-06-12 15:30:00.772470 00:00:14.253410
27 2018-06-12 15:30:01.555560 2018-06-12 15:30:14.639725 00:00:13.084165
28 2018-06-12 15:30:15.426744 2018-06-12 15:30:29.367616 00:00:13.940872
29 2018-06-12 15:30:30.168486 2018-06-12 15:30:42.002674 00:00:11.834188
... ... ... ...
33 2018-06-12 15:31:24.913215 2018-06-12 15:31:37.461732 00:00:12.548517
34 2018-06-12 15:31:38.292545 2018-06-12 15:31:50.842693 00:00:12.550148
35 2018-06-12 15:31:51.686863 2018-06-12 15:32:03.596999 00:00:11.910136
36 2018-06-12 15:32:04.410563 2018-06-12 15:32:18.004011 00:00:13.593448
37 2018-06-12 15:32:18.861414 2018-06-12 15:32:30.429049 00:00:11.567635
38 2018-06-12 15:32:31.279299 2018-06-12 15:32:45.187031 00:00:13.907732
39 2018-06-12 15:32:46.071398 2018-06-12 15:32:59.862141 00:00:13.790743
40 2018-06-12 15:33:00.731325 2018-06-12 15:33:14.182863 00:00:13.451538
41 2018-06-12 15:33:15.019526 2018-06-12 15:33:29.813106 00:00:14.793580
42 2018-06-12 15:33:30.615167 2018-06-12 15:33:44.430804 00:00:13.815637
43 2018-06-12 15:33:45.262019 2018-06-12 15:33:57.754935 00:00:12.492916
44 2018-06-12 15:33:58.578970 2018-06-12 15:34:11.445909 00:00:12.866939
45 2018-06-12 15:34:12.273659 2018-06-12 15:34:24.215194 00:00:11.941535
46 2018-06-12 15:34:25.052702 2018-06-12 15:34:37.669885 00:00:12.617183
47 2018-06-12 15:34:38.517782 2018-06-12 15:34:50.231547 00:00:11.713765
48 2018-06-12 15:34:51.063958 2018-06-12 15:35:05.345646 00:00:14.281688
49 2018-06-12 15:35:06.390829 2018-06-12 15:35:21.708363 00:00:15.317534
50 2018-06-12 15:35:22.570887 2018-06-12 15:35:35.096690 00:00:12.525803
51 2018-06-12 15:35:35.972408 2018-06-12 15:35:48.489647 00:00:12.517239
52 2018-06-12 15:35:49.412356 2018-06-12 15:36:03.314848 00:00:13.902492
53 2018-06-12 15:36:04.195199 2018-06-12 15:36:18.990481 00:00:14.795282
54 2018-06-12 15:36:19.905431 2018-06-12 15:36:33.284424 00:00:13.378993
55 2018-06-12 15:36:34.249949 2018-06-12 15:36:47.879250 00:00:13.629301
56 2018-06-12 15:36:48.728531 2018-06-12 15:37:01.906152 00:00:13.177621
57 2018-06-12 15:37:02.784167 2018-06-12 15:37:17.261342 00:00:14.477175
58 2018-06-12 15:37:18.139086 2018-06-12 15:37:31.029999 00:00:12.890913
59 2018-06-12 15:37:31.915966 2018-06-12 15:37:45.105982 00:00:13.190016
60 2018-06-12 15:37:45.983435 2018-06-12 15:37:59.227846 00:00:13.244411
61 2018-06-12 15:38:00.095904 2018-06-12 15:38:14.429518 00:00:14.333614
62 2018-06-12 15:38:15.302571 2018-06-12 15:38:30.714433 00:00:15.411862

63 rows × 3 columns

print('Average delta {!s} with a variance of {!s}'.format(loadvm_sample_1G['Delta'].mean(), loadvm_sample_1G['Delta'].var()))
Average delta 0 days 00:00:13.892893 with a variance of 2.6997282203265234e+18

2GB RAM

loadvm_sample_2G = pd.read_csv('/home/sergiusens/Documents/Notes/Canonical/vm-boot-times/2G-loadvm-start-finish-times.csv',
                               delimiter=';', parse_dates=['Start', 'Finish'])
loadvm_sample_2G['Delta'] = loadvm_sample_2G['Finish'] - loadvm_sample_2G['Start']
loadvm_sample_2G
Start Finish Delta
0 2018-06-12 17:49:15.279302 2018-06-12 17:49:26.862901 00:00:11.583599
1 2018-06-12 17:49:27.700970 2018-06-12 17:49:37.573116 00:00:09.872146
2 2018-06-12 17:49:38.480243 2018-06-12 17:49:48.448317 00:00:09.968074
3 2018-06-12 17:49:49.276836 2018-06-12 17:50:01.202956 00:00:11.926120
4 2018-06-12 17:50:02.034999 2018-06-12 17:50:12.269255 00:00:10.234256
5 2018-06-12 17:50:13.092654 2018-06-12 17:50:23.056533 00:00:09.963879
6 2018-06-12 17:50:23.862621 2018-06-12 17:50:33.994250 00:00:10.131629
7 2018-06-12 17:50:34.929319 2018-06-12 17:50:46.619966 00:00:11.690647
8 2018-06-12 17:50:47.488753 2018-06-12 17:50:58.368692 00:00:10.879939
9 2018-06-12 17:50:59.216675 2018-06-12 17:51:09.199636 00:00:09.982961
10 2018-06-12 17:51:10.020805 2018-06-12 17:51:21.541945 00:00:11.521140
11 2018-06-12 17:51:22.404150 2018-06-12 17:51:32.781054 00:00:10.376904
12 2018-06-12 17:51:33.578884 2018-06-12 17:51:43.448490 00:00:09.869606
13 2018-06-12 17:51:44.324472 2018-06-12 17:51:56.219644 00:00:11.895172
14 2018-06-12 17:51:57.181309 2018-06-12 17:52:06.910405 00:00:09.729096
15 2018-06-12 17:52:07.756291 2018-06-12 17:52:18.711836 00:00:10.955545
16 2018-06-12 17:52:19.553562 2018-06-12 17:52:31.424787 00:00:11.871225
17 2018-06-12 17:52:32.379276 2018-06-12 17:52:42.931924 00:00:10.552648
18 2018-06-12 17:52:43.736944 2018-06-12 17:52:54.921305 00:00:11.184361
19 2018-06-12 17:52:55.772979 2018-06-12 17:53:05.781207 00:00:10.008228
20 2018-06-12 17:53:06.618931 2018-06-12 17:53:17.970367 00:00:11.351436
21 2018-06-12 17:53:18.830861 2018-06-12 17:53:30.528023 00:00:11.697162
22 2018-06-12 17:53:31.392367 2018-06-12 17:53:41.769760 00:00:10.377393
23 2018-06-12 17:53:42.606549 2018-06-12 17:53:53.629186 00:00:11.022637
24 2018-06-12 17:53:54.495500 2018-06-12 17:54:05.935752 00:00:11.440252
25 2018-06-12 17:54:06.862082 2018-06-12 17:54:17.077339 00:00:10.215257
26 2018-06-12 17:54:17.929160 2018-06-12 17:54:29.639717 00:00:11.710557
27 2018-06-12 17:54:30.481065 2018-06-12 17:54:40.509681 00:00:10.028616
28 2018-06-12 17:54:41.423899 2018-06-12 17:54:53.180416 00:00:11.756517
29 2018-06-12 17:54:54.110193 2018-06-12 17:55:04.731238 00:00:10.621045
30 2018-06-12 17:55:06.149213 2018-06-12 17:55:18.559422 00:00:12.410209
31 2018-06-12 17:55:19.666753 2018-06-12 17:55:29.424153 00:00:09.757400
32 2018-06-12 17:55:30.321638 2018-06-12 17:55:42.817116 00:00:12.495478
33 2018-06-12 17:55:43.671200 2018-06-12 17:55:53.605612 00:00:09.934412
34 2018-06-12 17:55:54.456980 2018-06-12 17:56:04.583870 00:00:10.126890
35 2018-06-12 17:56:05.476194 2018-06-12 17:56:15.548392 00:00:10.072198
36 2018-06-12 17:56:16.442414 2018-06-12 17:56:26.467927 00:00:10.025513
37 2018-06-12 17:56:27.429013 2018-06-12 17:56:38.483446 00:00:11.054433
38 2018-06-12 17:56:39.425062 2018-06-12 17:56:51.313846 00:00:11.888784
39 2018-06-12 17:56:52.229214 2018-06-12 17:57:02.653705 00:00:10.424491
40 2018-06-12 17:57:03.605251 2018-06-12 17:57:13.779423 00:00:10.174172
41 2018-06-12 17:57:14.686942 2018-06-12 17:57:26.874228 00:00:12.187286
42 2018-06-12 17:57:27.831037 2018-06-12 17:57:38.909731 00:00:11.078694
43 2018-06-12 17:57:39.864857 2018-06-12 17:57:49.820589 00:00:09.955732
44 2018-06-12 17:57:50.728770 2018-06-12 17:58:02.867633 00:00:12.138863
45 2018-06-12 17:58:03.918548 2018-06-12 17:58:14.180917 00:00:10.262369
46 2018-06-12 17:58:15.144398 2018-06-12 17:58:25.656666 00:00:10.512268
47 2018-06-12 17:58:26.566281 2018-06-12 17:58:36.375138 00:00:09.808857
48 2018-06-12 17:58:37.420750 2018-06-12 17:58:49.588555 00:00:12.167805
print('Average delta {!s} with a variance of {!s}'.format(loadvm_sample_2G['Delta'].mean(), loadvm_sample_2G['Delta'].var()))
Average delta 0 days 00:00:10.834569 with a variance of 7.310429031275383e+17

#2

Hmm, so it’s faster to load a 2GB snapshot than a 1GB one?

Could it be that the memory actually used was lower in the second case and the speed to load doesn’t actually depend on the amount of memory available, but the amount of memory used at the point of snapshooting?


#3

The snapshot was taken upon boot. This might be related to my system load though. My gnome-shell session was constantly getting restarted during some of these runs :disappointed: