Repository navigation
Conversation
8f6079b to
4c31e7c
Compare
4c31e7c to
9a7dd5e
Compare
craciunoiuc
left a comment
There was a problem hiding this comment.
All good here. Thanks!
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
Approved-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.com>
|
merge this once we have the flag |
|
Converting to draft until the |
| A node must support compressed layers to run the image. | ||
| Before you push compressed images to a BYOC or on-premises installation, make sure that its platform version supports them. |
There was a problem hiding this comment.
ai: medium: An older agent skips a +zstd layer with no error, so a --compress image on a runtime such as base-compat pulls fine on an older node and the instance starts without its rootfs. "Make sure that its platform version supports them" gives the reader nothing to check against. Can we name the first release that pulls compressed layers, and say that an older node drops the rootfs silently?
There was a problem hiding this comment.
Done: the note names the first release with compressed layers, and says that an older node starts the instance without its rootfs.
| | Decompression | Once, when the platform pulls the image | At each read, in the guest kernel | | ||
| | Cold start | Faster, because the download is smaller | Depends on how many files the instance reads | | ||
| | Warm start and file access | No change | Slower | | ||
| | `DAX` and shared initrd | Available | Not available | |
There was a problem hiding this comment.
ai: medium: This row says the shared initrd isn't available with EROFS compression, but the tip further down says that with the shared initrd, compressed and uncompressed EROFS boot almost the same, and ukpd passes --initrd-map-shared for every image. Which one is right? If the shared initrd works, mark only DAX as not available here and in the conclusion, otherwise fix the tip.
There was a problem hiding this comment.
Right: ukpd passes --initrd-map-shared to every VM when the node enables it, whatever the image. The table and the conclusion now mark only DAX as not available.
Signed-off-by: Alex-Andrei Cioc <andrei.cioc@unikraft.io>
9a7dd5e to
7e326a9
Compare
| |----------------------------|-------------------------------------------|---------------------------------------------------| | ||
| | Compressed data | In the registry and on the network | In the registry, on the host, and in the instance | | ||
| | Decompression | Once, when the platform pulls the image | At each read, in the guest kernel | | ||
| | Cold start | Faster, because the download is smaller | Depends on how many files the instance reads | |
There was a problem hiding this comment.
[write-good.Adverbs] 'many' can weaken meaning
| |----------------------------|-------------------------------------------|---------------------------------------------------| | ||
| | Compressed data | In the registry and on the network | In the registry, on the host, and in the instance | | ||
| | Decompression | Once, when the platform pulls the image | At each read, in the guest kernel | | ||
| | Cold start | Faster, because the download is smaller | Depends on how many files the instance reads | |
There was a problem hiding this comment.
[write-good.Weasel] 'many' is a weasel word
| | Cold start | Faster, because the download is smaller | Depends on how many files the instance reads | | ||
| | Warm start and file access | No change | Slower | | ||
| | `DAX` | Available | Not available | | ||
| | Rootfs formats | EROFS and CPIO | EROFS only | |
There was a problem hiding this comment.
[write-good.Adverbs] 'only' can weaken meaning
| | How to use it | `unikraft build --compress` | `mkfs.erofs -z` | | ||
|
|
||
| As a rule, use layer compression for all images. | ||
| Use EROFS compression only when the rootfs is too large for the host disk, or for the instance memory on nodes without `DAX`. |
There was a problem hiding this comment.
[write-good.Adverbs] 'only' can weaken meaning
|
|
||
| The table shows the cold start of four images, with uncompressed, `gzip` and `zstd` layers. | ||
| The cold start is the time from the request that creates the instance until the instance runs, when the image isn't on the node yet. | ||
| The node had an Intel Core i7-7700 CPU, NVMe disks, and approximately 90 MB/s of bandwidth to the registry. |
There was a problem hiding this comment.
[write-good.Adverbs] 'approximately' can weaken meaning
| ``` | ||
|
|
||
| Finally, you can package and deploy the compressed EROFS rootfs using the CLI: | ||
| Finally, package and deploy the compressed EROFS rootfs with the CLI: |
There was a problem hiding this comment.
[write-good.Adverbs] 'Finally' can weaken meaning
| With compression or without it, EROFS performs better than CPIO. | ||
| The compressed EROFS rootfs boots even faster than the uncompressed one. | ||
| This is likely due to the reduced amount of data that the system reads from disk, resulting in faster access times despite the decompression overhead. | ||
| The likely cause is that the system reads less data from disk, which saves more time than the decompression takes. |
There was a problem hiding this comment.
[write-good.Adverbs] 'likely' can weaken meaning
| :::tip | ||
| For BYOC or on-prem deployments, Unikraft Cloud offers the option to share the same read-only initrd between instances when using EROFS images. | ||
| This has the added benefit that Unikraft Cloud loads the initrd into host memory only once as read-only. | ||
| Unikraft Cloud then loads the initrd into host memory only once as read-only. |
There was a problem hiding this comment.
[write-good.Adverbs] 'only' can weaken meaning
| :::tip | ||
| For BYOC or on-prem deployments, Unikraft Cloud offers the option to share the same read-only initrd between instances when using EROFS images. | ||
| This has the added benefit that Unikraft Cloud loads the initrd into host memory only once as read-only. | ||
| Unikraft Cloud then loads the initrd into host memory only once as read-only. |
There was a problem hiding this comment.
[write-good.Adverbs] 'only' can weaken meaning
| Unikraft Cloud then loads the initrd into host memory only once as read-only. | ||
| Instances only map the pages they need, which reduces memory usage and boot times even further. | ||
| Upon writing, the system performs copy-on-write, meaning that it copies only the modified pages into the instance's memory. | ||
| When an instance writes, the system copies only the modified pages into the memory of the instance. |
There was a problem hiding this comment.
[write-good.Adverbs] 'only' can weaken meaning
Part of TOOL-1858.
unikraft build --compress) next to EROFS compression, with a table of what each one changes.gzipandzstdlayers, for EROFS and CPIO images.Depends on the
--compressflag of the CLI and on platform support for compressed layers, which are not released yet.