Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Carlos E.R." Newsgroups: comp.os.linux.misc Subject: Re: Linux doesn't seem to manage memory very well Date: Thu, 2 May 2024 21:19:49 +0200 Lines: 45 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net xTSUMJkr097lRAw1guTr3QHxGVR5DpnAeh+QVhaBmVHsfK50IJ X-Orig-Path: Telcontar.valinor!not-for-mail Cancel-Lock: sha1:sYsHAtP6olPQyauc+Z6yBZg8RrA= sha256:VKIqmXhIE2jrET0+Mv6Nj+qOO7qVcjoRfYP7wZ0oTvo= User-Agent: Mozilla Thunderbird Content-Language: es-ES, en-CA In-Reply-To: Bytes: 2742 On 2024-05-02 15:54, James Harris wrote: > On 01/05/2024 15:06, David W. Hodgins wrote: >> On Wed, 01 May 2024 06:32:18 -0400, James Harris >> wrote: >>> Not a question, just an observation. >>> I say that Linux doesn't seem to handle memory well because my laptop >>> had 8GB RAM (which, frankly, Windows seems to find perfectly adequate >>> for a similar workload). Under Linux the RAM would fill up and then swap >>> space would be used. Then the machine would become largely unresponsive >>> - e.g. taking minutes to switch between windows. >>> So I upgraded the RAM. It now has three times as much (i.e. 24GB)! But >>> even so, RAM has still steadily filled up until reaching the full 24GB. >>> What's more, it's now showing 4.8GB of swap space in use. >> >> Likely you're using a system that's configured for maximum total >> throughput, >> not best response time. >> >> Create a file, /etc/sysctl.d/tales.conf with the contents ... >> # Reduce applications being swapped >> vm.swappiness=1 >> # Don't shrink the inode cache >> vm.vfs_cache_pressure=50 >> >> Then run the command "sysctl --system" (as root). >> >> See >> https://rudd-o.com/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that >> for an explanation. > > I very much like the control that Linux gives to a user but ISTM that > what you say here is a great example of the issue I was pointing out in > the original post: IMO page depletion should be handled better *by > default* and not need human intervention for normal scenarios. It is up to you to set the defaults. The defaults you get were set by the distribution, and each distribution does this differently. hint: ulimit. -- Cheers, Carlos.