-
Notifications
You must be signed in to change notification settings - Fork 55
cvm: Add built-in swap config #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
We should support the ability to update swap size before shipping it, because only allowing creation without the option to adjust swap size will seem strange to users. |
They can update the compose file and reboot the CVM. It is just not adjustable after booting at runtime. |
Does this mean the swap will always be recreated when the CVM reboots, and the mount configuration won't persist? |
The swap data is on the persistent disk, but it was always removed and create a new one on each boot. |
It will increase boot time. Can we log the time for swap processing? |
There is already timestamp in the log. It cost about 100ms to create a 16GB swap file or zvol on a new created CVM. |
Usage:
Add
swap_sizein app-compose.json:{ "swap_size": "2G", }Or
{ "swap_size": 2147483648, }