Closed jokomad closed 11 months ago
You are talking about the kernel module ? Can you give more details about what you want to do ?
Sorry for the late reply. Goal is to make docker use less ram for firefox or chrome... Tried zram-init from alpine repo... Using docker windows... Seems i need modified kernel for WSL... hoped some startup script would solve it easy...
Unless I'm missing something, I don't think zram will help. zram allows you to create a disk in RAM. It's not a system-wide compression technology.
Wanted to try out... Hoped it involved some startup script... But changing docker kernel is too much. Thanks anyway...
So the kernel module could theoretically be loaded from the container. However, doing this won't reduce memory used by the container. zram is usually used for in-RAM folders, like /tmp
. In the container, this folder doesn't contain a lot of data...
If this is true from google about zram: The way it extends the amount of available RAM to a system is by using a portion of the RAM as compressed swap. It can therefore hold more pages of memory in the compressed swap than the amount of actual memory used. Typically it compresses to a 3:1 ratio... any chance to share tutorial on how to load zram from the container theoretically. Thanks. sorry for bugging.
The way it extends the amount of available RAM to a system is by using a portion of the RAM as compressed swap.
The swap is a way for the OS to move data from RAM to a file on the system. Swap is used when the RAM is full. So using zram to store the swap file might be beneficial for performance reason (because zram is probably faster than a hard disk), but this won't reduce the amount of memory consumed by a container.
any chance to share tutorial on how to load zram from the container theoretically.
Basically you can load a driver from a container executed in privileged mode. See https://www.baeldung.com/linux/docker-container-kernel-modules
So even less ram with zram. Thanks for explanation. Have a good day.
No problem!
Any tutorial on how to add zram... no luck so far from google...