When recording video, randomly happen that the fps drops to 1 fps (key frame?) after some time

Description incl. system parameters there please. (5.10.19-1-MANJARO with XFCE)
I am wondering if there is some expert who knows how to record what Linux is doing in-time (possibly mainly speaking about lags and bottlenecks and its causes and impacts.

Then maybe i can match it +/- 5 seconds to the recorded video spot where the recorded video gets degraded to 1 fps instead of 25 fps. Then discovering from that linux log report what happened in that time (possibly mainly regarding delays, bottlenecks causes and impact)

To know in which component the problem is so the developer of the component can fix it.

Or where to look for help?

Another approach can be to really limit memory usage as suggested in the above linked issue (i can not believe RAM/SWAPPING can be the cause of the issue and also do not see any apparent problem in my current RAM/SWAP usage)., RAM/SWAP/SYSTEM-DRIVE detail
If you think i have to limit it or tweak, let me know how. I think that the ZFS intent log (in RAM) is using significant portion of the size - i do not know how to measure - ps_mem not show it, how much or which priority in RAM it has). There i zswap, i have just reduced it from like 40 to 25% of memory.