What you have described sounds like it might be a memory leak. The following looks at that angle of the matter.
Memory leaks occur when software, say a particular program, reserves memory for its usage, but instead of releasing it when it's no longer needed, keeps it occupied causing RAM usage to grow continuously. As RAM is used up, there's less of it for processing, so all processing in the system can slow down.
There's scripts to check memory usage to see which processes may be implicated in eating too much memory. The following is a very basic script named: mem-monitor used here at times to do that. It outputs the top 10 processes which are using memory:
Code:
#!/bin/bash
i="0"
while [ $i -lt 4 ]
do
ps -eo %mem,rss,pid,args --sort=-%mem \
| awk '{print $1,$2"(KiB)",$3,$4}' \
| head -n 10 \
| column -t >> memLogFile
i=$[$i+1]
sleep 2
done
One can run the script with the following command from the directory the script is written in:
In its current form it writes output into the file: memLogFile each 2 seconds, for 4 instances of memory usage of the top 10 processes using memory on the system. That's only measuring memory usage for 8 seconds. It's likely it needs to run for much longer, and perhaps for more than just the top 10 processes, so one can adjust the numbers to what suits in the script. The output on this machine for the above script looks like this:
Code:
[~]$ cat memLogFile
%MEM RSS(KiB) PID COMMAND
2.9 475728(KiB) 3480 ./firefox
2.6 416688(KiB) 10108 ./waterfox
2.0 332668(KiB) 5592 /home/tom/browsers/firefox/firefox-bin
1.6 267176(KiB) 4188 /home/tom/browsers/firefox/firefox-bin
1.3 214032(KiB) 3674 /home/tom/browsers/firefox/firefox-bin
1.2 196632(KiB) 3761 /home/tom/browsers/firefox/firefox-bin
1.1 183968(KiB) 10344 /home/tom/browsers/waterfox/waterfox
1.1 181608(KiB) 11768 /home/tom/browsers/waterfox/waterfox
1.1 177060(KiB) 10351 /home/tom/browsers/waterfox/waterfox
%MEM RSS(KiB) PID COMMAND
2.9 475732(KiB) 3480 ./firefox
2.6 416688(KiB) 10108 ./waterfox
2.0 332676(KiB) 5592 /home/tom/browsers/firefox/firefox-bin
1.6 267208(KiB) 4188 /home/tom/browsers/firefox/firefox-bin
1.3 214032(KiB) 3674 /home/tom/browsers/firefox/firefox-bin
1.2 196632(KiB) 3761 /home/tom/browsers/firefox/firefox-bin
1.1 183968(KiB) 10344 /home/tom/browsers/waterfox/waterfox
1.1 181608(KiB) 11768 /home/tom/browsers/waterfox/waterfox
1.1 177060(KiB) 10351 /home/tom/browsers/waterfox/waterfox
%MEM RSS(KiB) PID COMMAND
2.9 475732(KiB) 3480 ./firefox
2.6 416688(KiB) 10108 ./waterfox
2.0 332720(KiB) 5592 /home/tom/browsers/firefox/firefox-bin
1.6 267248(KiB) 4188 /home/tom/browsers/firefox/firefox-bin
1.3 214052(KiB) 3674 /home/tom/browsers/firefox/firefox-bin
1.2 196632(KiB) 3761 /home/tom/browsers/firefox/firefox-bin
1.1 183968(KiB) 10344 /home/tom/browsers/waterfox/waterfox
1.1 181608(KiB) 11768 /home/tom/browsers/waterfox/waterfox
1.1 177060(KiB) 10351 /home/tom/browsers/waterfox/waterfox
%MEM RSS(KiB) PID COMMAND
2.9 475796(KiB) 3480 ./firefox
2.6 417012(KiB) 10108 ./waterfox
2.0 332784(KiB) 5592 /home/tom/browsers/firefox/firefox-bin
1.6 266444(KiB) 4188 /home/tom/browsers/firefox/firefox-bin
1.3 214052(KiB) 3674 /home/tom/browsers/firefox/firefox-bin
1.2 196632(KiB) 3761 /home/tom/browsers/firefox/firefox-bin
1.1 183968(KiB) 10344 /home/tom/browsers/waterfox/waterfox
1.1 181644(KiB) 11768 /home/tom/browsers/waterfox/waterfox
1.1 177060(KiB) 10351 /home/tom/browsers/waterfox/waterfox
The 4 instances are clearly visible, divided off by the headings. The percentage of memory use shown is not rising, but constant for the applications which in this case are two browsers, firefox and waterfox, both run from usr tom's home directory. The PID value is provided in the output so that the user can kill a process using that number if needed. The RSS value is basically the size of the program in RAM, but there's more detail to it which can be checked in man pages for ps and top.
Running the script with adjusted figures for the amount of time that one has previously experienced the slowing down would be a logical approach. The log file would be large, but the output may be revealing. All files are removable so the whole procedure is not resource sapping in the end. There are more advanced specialised scripts available online for the same purpose which the OP may which to investigate.