-
Notifications
You must be signed in to change notification settings - Fork 655
Memory usage optimization when booting #2392
Comments
In the boot process, there are two places where the memory requirements are very large.
If there is not enough memory in these two processes, then the kernel panic will appear. As long as we control the file size of initrd and system-docker image, there will be no memory shortage. So possible options include the following:
I might provide a document that lets users know how to reduce memory dependencies. But the mainline version may still maintain the status quo. |
When building the ISO, I tried to change the default user-docker to 17.03.2, and finally the ISO can be booted in 1GB memory. |
Do not replace |
@albertdb We are using kernel 4.14.x, the zstd kernel compression seems not to be supported. Ubuntu will use lz4, we will continue to pay attention. |
@niusmallnan I'm talking about docker images compressed TARs, not kernel initramfs. As long as the zstd binary is available, recent versions of tar support zstd: https://www.phoronix.com/scan.php?page=news_item&px=Tar-Zstd-Compression |
@albertdb Our system-docker is based on docker 17.06(has made some changes). This version should not support images with zstd formatting, I can see that it should only support an archive (.tar, .tar.gz, .tgz, .bzip, .tar.xz, or .txz.). Maybe your idea is to first extract it with zstd and then import that file into docker. I may need to try if it works, how much will improve. If you have already done this part, I would like to know the result. But what you said is a good suggestion, this part is really worth optimizing. Thanks! |
@niusmallnan Yes, if TAR version is old, thats what I'm talking about. You can even pipe decompression to docker load, and it would be as fast as docker load is (zstd is almost real time on decompression). This is what we do when generating our custom RancherOS images (in which we docker load some images) with Packer. Not only is faster than gzip, it also result in smaller source docker images tars. |
Version - rancher/os:v1.5.0-rc1 11/30 |
RancherOS Version: (ros os version)
RancherOS v1.4.0
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
Any
It should be able to start on 1G memory.
The text was updated successfully, but these errors were encountered: