Avoiding LibreOffice DOS
mafsys1234 at gmail.com
Fri Oct 18 22:50:53 UTC 2019
On 18/10/2019 11:31 pm, Andrea Venturoli wrote:
> On 2019-10-17 23:59, MJ wrote:
>>> As I said, I think it's a problem with memory.
>> Oh did you? I saw you mention "vmemoryuse" but didn't understand whether you meant this was the cause or just an attempt to fix one cause.
> Sorry, maybe I should have made this clearer.
Yes, because I was under the impression this was about debugging a user program. It's no problem, just took a while to get to your specific issue.
>> If it is memory related, perhaps you need to create a larger swap space. It might just get you over the hump of exhausting memory enough for Libreoffice to complete whatever it is it's trying to do.
> My guess is that it will use as much as it's available.
Of course, but if your goal was to debug the problem, this may have given you more time to trace it using dtrace or truss or your tool of choice.
>> Conjecture? There's a tight loop. Possibly/likely a bug in libreoffice?
> Possibly, but, as I said, I'm trying to approach this from an OS perspective as a general case.
> This time it was LibreOffice, but I was also able to reproduce this with different applications (e.g. remove swap, fire up a couple of VirtualBox VMs to eat most memory, open several pages in FireFox).
So, what you're effectively attempting to achieve is debugging the kernel and how it handles memory reclamation/caching etc. In this case, you need to concentrate on not per-user but system wide.
You need to begin to learn and experiment with things like vm.v_free_/*/ and all the various tweaks while using vmstat.
In the extreme, you may need to look at setrlimit(2) and writing a test harness around a rogue memory-using program (I'm not sure of your level - if any - of programming knowledge).
Apart from all that, it's just going to be you experimenting, setting limits, trying, re-trying etc. In which case, you would be mad not to do this in a virtual environment as I suggested.
More information about the freebsd-questions