On Thu, Nov 3, 2016 at 12:52 AM, Dimitri John Ledkov <[email protected]> wrote:
As far as I understand, swap performance is better on swap formatted
lvm volume, than a swapfile on a filesystem on an lvm volume.
That is only true for the initial search for swap slots, that is when memory is tight the first time.
After the pages have a backing store assigned it should be the same code&speed for both.
Overall I'd say the speed argument shouldn't be important here.
E.g. 1GB swapfile, but no more than 5% of disk space is simple enough. no?
Since it can be overwritten anyway I personally like that one a lot.
I'd expect that almost all setups that will be "not happy" with this simple approach like the "temporary ballooning of memory requirements" you mentioned e.g. in a virtualization environment need a way more complex setup anyway to do it right (spread I/O on multiple disks, tune page-cluster and bulks to your disk I/O HW and so on).
The remaining share of people suffering might be those that want to enable Hibernate (non default anyway as you mentioned).
Just give them a reasonable and easy path if they want to do so. But I think the overwrite swapsize option will do.
But I guess we have to realize that this discussion perfectly qualifies to expect to never make everybody happy anyway.
Software Engineer, Ubuntu Server