1

I already set the swappiness by 10 (even reboot). But I always feel it's using swap space instead of ram space (I heard the sound of HDD), and the system sometime freeze. The question is how to check what and why it's using swap space and how to stop it?

enter image description here

Jared Chu
  • 323
  • 4
  • 14
  • 1
    Possibly related: https://askubuntu.com/questions/1357/how-to-empty-swap-if-there-is-free-ram – Terrance Aug 12 '17 at 17:01
  • ya, but I heard the HDD sound and system is freezing, I think it isn't just allocated. – Jared Chu Aug 12 '17 at 17:15
  • Hmmm, maybe a hard drive going bad or something? If you have smartctl installed, you can run the following to get all the SMART information for your drives: ls /dev/sd? | while read drv; do echo -n "$drv "; sudo smartctl --all $drv | awk '/SMART overall/ {print $NF}'; done – Terrance Aug 12 '17 at 17:22
  • Or, in the link I posted here, there is an answer down below that states to maybe set the swappiness to 1. Maybe that might help keep stuff out of the swap if something is getting into there. – Terrance Aug 12 '17 at 17:29
  • Leave it alone. Some swap may always be used, even with 8G RAM. Leave vm.swappiness at 10, if you like. Setting it any lower effects disk buffers, and you'll slow down disk access. And the proper command to check the vm.swappiness value is sysctl vm.swappiness. – heynnema Aug 12 '17 at 23:40
  • 1
    Disk noise may be another problem. Open the Disks app, select the proper hard disk in the left pane, click on the "hamburger" icon and select SMART Data & Tests. Review the data. Run the tests. If that comes out good, then in terminal do grep -i sda /var/log/syslog* and look for error messages. – heynnema Aug 13 '17 at 00:05
  • 1
    Do you have Intel Bay Trail processors? – heynnema Aug 13 '17 at 00:28
  • Thank you all, I'm thinking that my disk having problem. – Jared Chu Aug 14 '17 at 06:50

0 Answers0