Swap file on f2fs partition on usb stick

My access point only has 64mb and I want to run more services so thinking of creating a swapfile on an f2fs partition on a usb stick. I am wondering if anyone knows if the swapfile stays in the same physical memory location on the usb stick or due to the fact it's formatted f2fs that it moves location each time there is a write. My understanding is f2fs will always move the writes forward and never in the same location or backwards. Obviously I would prefer it this way for increased wear-leveling. However, if the swapfile never moves forward then I am worried a swapfile on a usb stick will pretty much kill it within weeks or if not months.

swap on flash is extremely slow and a flash killer, avoid this at (almost) all costs. Especially these days, devices with more RAM (and flash) are easily obtainable, for relatively little money (especially if you include the second hand markets into your search), try to find a device meeting your requirements.

swap on flash only -kind of- works, if you can page out a large, relatively static chunk of memory that doesn't need to be touched. In practice, not a whole lot will meet that characterization, especially not for more volatile add-on services, so relying on swap would kill your performance and snapiness. While adding a USB connected SSD as swap might make the flash wear, bearable, performance would remain bad (USB being the bottle-neck) and end up more expensive than replacing the whole device with one sporting enough RAM/ flash.

1 Like