SSD thrashing

rikona rikona at sonic.net
Sat Jul 25 11:29:47 UTC 2020


On Sat, 25 Jul 2020 07:27:00 +0200
Ralf Mardorf via ubuntu-users <ubuntu-users at lists.ubuntu.com> wrote:

> On Sat, 25 Jul 2020 14:43:26 +1000, Phil wrote:
> >On 25/7/20 12:28 pm, Ralf Mardorf via ubuntu-users wrote:  
> >> On Sat, 25 Jul 2020 10:51:56 +1000, Phil wrote:    
> >>> 790Gb free    
> >> PS: Keep in mind that your SSD has got that much free space. AFAIK
> >> if you allocate a swap way smaller than 790 GB, the SSD does not
> >> overwrite the same cells of that smaller space again and again,
> >> AFAIK it rotates and does use all free cells from the 790 GB
> >> available.    
> >
> >Thank you for your reply Ralf.
> >
> >I already have a 2Gb swap partition which doesn't seem to be enough
> >to prevent SSD thrashing. I know that I have a few options and I
> >suppose what I was really asking is what others have done to prevent
> >thrashing.  
> 
> Ah, I misunderstood the term "trashing".
> https://en.wikipedia.org/wiki/Thrashing_(computer_science)
> 
> Did you monitor swap usage by running "top"?
> 
> 4096 MiB of RAM, perhaps - 512 MiB for the graphics frame buffer,
> kernel, libs and apps + 2048 MiB swap = 5632 MiB
> 
> Not a Valid calculation, just a pointer:
> 
> 5632 MiB / 30 firefox tabs = 187 MiB / firefox tab
> 
> 50 photos * 4 MiB / photo = 200 MiB
> 
> I suspect that switching between 30 tabs is a CPU-intensive task.
> Maybe the issue isn't the memory and/or swapping, but the CPU.

It may be both mem [mostly] and CPU. I usually have well over 30 tabs
open - a disaster for FF alone. I split the open tabs between 4 different
browsers - FF, Waterfox, Vivaldi and Pale Moon. Checking htop shows
HUNDREDS of PIDs for these browsers, each using/reserving huge amounts
of memory, and considerable CPU as well. Uses up most of my 32G mem and
keeps 6 cores fairly busy but not overloaded. Solution seems to be a
large fast disk, *LOTS* of mem, and ample cores if you want many tabs.

Rik







More information about the ubuntu-users mailing list