On 3 November 2016 at 08:37, Christian Ehrhardt
> On Thu, Nov 3, 2016 at 12:52 AM, Dimitri John Ledkov <email@example.com>
>> As far as I understand, swap performance is better on swap formatted
>> lvm volume, than a swapfile on a filesystem on an lvm volume.
There is another argument for using swap LVM volumes, instead of
swapfile on an lvm volume.
I created an lvm volume, formatted it with ext4, created a swapfile on it.
Took a snapshot of the said lvm volume with maximum snapshot size of 100MB.
Activated swapfile & used up a little bit of swap.
As per $ free, I had 0 swap used, yet the snapshot was 31.56% full
which roughly correlates with the 30MB of swap previously used up.
Hence we really do not want to fill up LVM snapshots with swapfile
changes, and continue to use swap LVM volumes.
> 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.
> Christian Ehrhardt
> Software Engineer, Ubuntu Server
> Canonical Ltd
ubuntu-devel mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel