BinaryDataContainer swapping ? ...

Noel Grandin noelgrandin at gmail.com
Tue Apr 4 12:07:59 UTC 2023


On Mon, 3 Apr 2023 at 14:04, Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
wrote:

> One of the issues with letting the OS deal with all that is that the OS
> has no idea what and when it can swap out - it just uses LRU when there is
> a memory pressure, or not. We can do it much more effectively and do less
> work, for example not keep it in the
>
I think we're going to have to agree to disagree here.

I think our current code is doing the best that it can, but it
fundamentally cannot make as good a decision as the OS because it does not
have the same global view of the machine.

For example, in performance profiles, I regularly see my very powerful
Windows machine with tons of RAM running like a Pentium because LibreOffice
is spending all its time unnecessarily pushing things into temp files [0].

Presumably, people who work primarily on Linux never see these issues
because /tmp on Linux acts like a RAM drive on fast machines with lots of
memory.

So I would personally prefer that we just let the LRU algorithm of the OS
swap logic do its thing.

Regards, Noel.

[0] This was the primary motivation behind the utl::TempFileFast work,
which helped some cases, but in other places, Libreoffice still insists on
having a named temporary file (mostly because of the UCB layer).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20230404/d4a3c0d6/attachment.htm>


More information about the LibreOffice mailing list