Swap File Options Coming in Kernel 5.7
There’s a last-minute feature coming to the 5.7 iteration of the Linux kernel, one that might make some admins pretty excited. Said feature is the ability to configure a remote swap file over a network, with SMB3.
This feature is only experimental and poses some obvious issues (performance and security being the biggest). However, using an SMB3 mount as an option for swap could have ramifications for the likes of embedded Linux, where the lack of internal storage space doesn’t always accommodate swap. Or maybe if your network has a multi-terabit backbone, it’s possible to set up multi-level paging to a large fault-tolerant flash array.
This new piece of technology doesn’t come without possible deal-breaking concerns, such as network delays causing page breaks and faults, or when a network needs to allocate memory for buffers which could lead to a kernel failing to allocate memory. However, as with any experimental feature in a kernel, only time will tell as to whether or not swap over SMB3 will succeed.
Even so, this new addition does open up possibilities when there isn’t a local block device available for swap or a software (such as a Kubernetes cluster) doesn’t allow for the use of local swap.
In the end, it’s important to remember this feature is experimental, so the full implications are yet to truly reveal themselves.
Original merge: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4119bf9f1d093b495f5fe3fcb32bde3156d2ba6e
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.