Date: Sat, 19 Oct 2019 09:50:18 +1100 From: MJ <mafsys1234@gmail.com> To: Andrea Venturoli <ml@netfence.it>, freebsd-questions@freebsd.org Subject: Re: Avoiding LibreOffice DOS Message-ID: <a69ceb91-0684-44e4-edc5-9d74ac42ded1@gmail.com> In-Reply-To: <b5e922ad-fe15-e584-8ebe-75f8714fd6d4@netfence.it> References: <eee23781-9264-3de5-1a27-3879e731a5fc@netfence.it> <be6c4b7f-0a91-8795-3218-65e933c6649d@gmail.com> <62d45c64-ac95-43a7-5e39-9a94d26d323c@netfence.it> <96a4c0a3-9b48-3cf4-27a6-8d3753b42d87@gmail.com> <b5e922ad-fe15-e584-8ebe-75f8714fd6d4@netfence.it>
next in thread | previous in thread | raw e-mail | index | archive | help
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. Regards Mark
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a69ceb91-0684-44e4-edc5-9d74ac42ded1>