Disk Cache memory: This are chunks of the physical memory, the RAM, used to store files. That way when a program needs to read the file, it’s fetched from memory instead of the hard disk. This is done because memory is way faster.
Swap: This is a place on the hard disk (usually a dedicated partition) that is used to store programs or data that can’t fit in memory, like when a program grows more than the available memory. SWAP is way slower than RAM, so when you hit swap the computer gets slower, but at least the program can work. In linux swap is also used to hibernate, or to move low used program out of memory to allow more space to the disk cache.
Wait, everyone is saying cached is part of the used memory but yours shows more cached than in use?
https://man7.org/linux/man-pages/man5/proc_meminfo.5.html
Cached should be memory stored on HDD and not RAM.
Ah so cached is the disk cache and it sounds like this is not part of the “used” memory.
This link has more information that looks relevant: https://askubuntu.com/questions/89219/is-there-a-difference-between-swap-and-cache-memory