Article 5QAHE More RAM needed? - swapping

More RAM needed? - swapping

by
petejc
from LinuxQuestions.org on (#5QAHE)
Looking at atop I see 'PAG' is flashing red often which indicates accessing the swap file more than 10 times per second, from what I've read. Kinfocenter has been showing various values, but is showing a large amount of memory used for disk cache, 30 - 50%, some free physical memory and also 30-40% of swap used. Swap is on a SSD.

The fact that there is some free physical memory makes me think more RAM would have no benefit, but the frequent PAG file access reported by atop seems to indicate I am low on memory. I thought that disk cache was only used when the kernel had no other use for memory, so used otherwise free memory as a disk cache. But I'm now wondering if the kernel is somewhat more intelligent and it is carefully balancing disk cache and swap to get the best performance it can?

The use case is that I'd doing some calculations based on data in a mariadb database and putting the calcs back in the database. So the NVME drive supporting the database is often maxed on IO.

Does it seem like I'm low on RAM?latest?d=yIl2AUoC8zA latest?i=Cg4KMilinsM:vJYzFgwCVoY:F7zBnMy latest?i=Cg4KMilinsM:vJYzFgwCVoY:V_sGLiP latest?d=qj6IDK7rITs latest?i=Cg4KMilinsM:vJYzFgwCVoY:gIN9vFwCg4KMilinsM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments