On Sat, Feb 6, 2021 at 8:12 AM Pavel Raiskup <[email protected]> wrote:
>
> I'm trying to overcommit storage space on one our hypervisors (and reclaim
> space if possible after memory peak times) and it seems like kernel in
> Fedora 33 isn't doing automatic discard on swap partitions?

You might ask about it on [email protected]

>   $ swapon --discard /dev/sda

--discard without options enables both available options, so you get
an initial discard and then an async discard when pages are freed.
Quite a lot of applications don't seem to free their dirty pages until
they quit, which might also be worth asking about.

> The 'fstrim -av' isn't propagated to SWAP mount points (expected
> probably).

It's not a file system so that doesn't work.

> But otherwise, freeing the guest memory manually, minimizing the swap usage,
> etc. (experiments with tmpfs) doesn't result in freeing the allocated storage
> blocks on host.

I think it's up to the application to free the pages, if they aren't
freed somehow then the kernel can't know what blocks to issue discards
for.


-- 
Chris Murphy
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to