What is zram swap




















Skip to content. Star Branches Tags. Could not load branches. Could not load tags. Latest commit. Git stats 26 commits. Failed to load latest commit information. Added config file option for debugging. It can therefore hold more pages of memory in the compressed swap than the amount of actual memory used. Typically it compresses to a ratio. The compression ratio including memory used for disk overhead varies depending on the percent of maximum space utilized.

This may typically vary from 1. It also is much faster at swapping pages than typical speeds for hard disk swap. Combining zram with a correctly tuned Portage configuration will should a desktop system running in a responsive manner even during intensive software compilation. Prior to kernel 3. This can become a serious bottleneck for multi-core machines. To work around this problem, zram is capable of initializing multiple devices. While possible, it's difficult to estimate their probability.

But this is a significant consideration in the conservative default zram size. It's the most upstream implementation to date, is fast and lightweight. The zram-generator uses existing systemd infrastructure to setup the zram block device, format it as swap, and swapon - all during early boot. Converging on one implementation avoids user confusion. And while the alternatives are nice and work fine, a systemd generator is particularly well suited for this use case compared to a systemd service unit.

The main idea of being conservative is to address concerns about upgrades. It's possible some workloads will have less compressible data. However, it's possible a system can get "stuck" in a kind of swap thrashing similar to conventional swap-on-drive, except it's CPU and memory bound, rather than IO bound.

Feature owner thinks it's better to just oom, instead of getting overly aggressive with the zram device size. Conversely it's possible to be too conservative with the size, and result in more instances of OOM kill. Of course more feedback and testing is needed, and it will be taken into consideration.

Note that the kernel zram doc says an excessively sized zram device does come with overhead. Users's can increase the size easily post-install, a capability they don't easily have with swap-on-drive. The goal for Fedora 33 is a default that's useful and safe for the vast majority of use cases.

It needs disk based swap, and uses a compressed memory cache to hold onto recently used pages, where less recently used pages are evicted to to swap. Swap-on-zram depends only on volatile storage. This is simpler and more secure. Whereas zswap eviction of pages into swap-on-drive can leak user data. Create this file with the command:. Congratulations, zRAM is now working. You don't want to miss our tips, tutorials, and commentary on the Linux OS and open source applications.

Delivered Tuesdays. He's covered a variety of topics for over twenty years and is an avid promoter of open source. For more news about Jack Wallen, visit his website jackwallen Watch Now. More about open source It's time to dump Chrome as your default browser on Android Linux kernel 5. Delivered Tuesdays Sign up today.



0コメント

  • 1000 / 1000