8

(I am currently using Ubuntu 14.04 LTS, GNOME environment)

tl;dr How can I force more memory swapping (swappiness already at 100)?

I have recently been experiencing a lot of system freezes/crashes. Often when accessing busy websites. It has been happening so much I have htop loaded on my tty, so I can switch to it and terminate my browser (as GUI does not respond). However, sometimes I need to use REISUB.

I thought GNOME might work better than Unity, as my Debian system has no problems, and it did to a point, but I am still running high on memory, and getting freezes.

I looked at my free -m today, and noticed my swap was showing 0 used. Output:


             total       used       free     shared    buffers     cached
Mem:          1821       1673        148        221         40        643
-/+ buffers/cache:        989        832
Swap:         1933          0       1933

I did a temporary swappiness to 100 (sudo sysctl vm.swappiness=100). The results were still the same (0 being used even after running to near max system memory usage).

I looked at this answer:

How do I see if system is swapping? unfortunately as I am writing this, my system went into updates, and my packages are locked, so I cannot install this (sar) nor am I sure what package this is part of, in order to give another Output.

I have looked in the fstab, and my swap partition is being used correctly.

# swap was on /dev/sda3 during installation
 UUID=10fdfed2-1fde-4d9f-a8f1-3d2376b0ffcc none            swap    sw              0       0

I am using a shared swap partition with my Debian OS (dual boot, separate partition, shared swap). But the partition is not locked, and I did a quick swapoff ..., swapon ..., and swapon -s to see if it would possibly recognize my swap and start swapping. It appears to still be at low swapping (84 hooray), but my memory usage is at 90%+ usage. With around 13% memory usage by Chromium, 17% by GNOME.

I don't care if I am forced into slowness, but I can't be forced into full system freeze (can't access TTY, can't do Ctrl+Alt+Backspace, only Alt+SysReq R,E,I,S,U,B)

I had the same issue with 12.04 LTS (pre-packaged), but have recently gone to 14.04 LTS.

Bottom Line: How can I force swapping further, and/or control processes before they cause system stability issues?

(Side Note: Debian works fine, except for mouse touchpad issue)

Output of dmesg | grep error:

[   26.646691] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro

This is Ubuntu Partition. Same error on Debian Partition except sda7.

closed as off-topic by psusi, G-Man Says 'Reinstate Monica', Archemar, Stephen Rauch, GAD3R Nov 26 '17 at 15:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Archemar, Stephen Rauch, GAD3R
If this question can be reworded to fit the rules in the help center, please edit the question.

  • System freezes like you describe often occur when hard drives begin failing. Have you checked the output of dmesg for errors? – Timothy Martin Aug 21 '14 at 17:56
  • @TimothyMartin updated with dmesg – No Time Aug 21 '14 at 19:52
  • 1
    From your dmesg it seems that the hard drive is failing, then the system remounts it as read-only. Can you install smartmontools and then run smartctl -a /dev/sda? – Renan Aug 21 '14 at 19:56
  • @Renan what output is needed from that command? – No Time Aug 21 '14 at 20:23
  • 1
    You are not low on ram. Look at the +/- buffers/cache line to get the actual amount of ram used by your system. See linuxatemyram.com for an explanation. Your getting freezes is not because you have low ram. It may be bad ram, or something wrong with video card or cpu or similar. – pqnet Aug 21 '14 at 22:24
1

Please read this article Stackoverflow you have 643 cached memory and 148 free ~ 800 mb. Your swap file will be used when cached and free mem are equal vm.swappiness in percents

-1

in /etc/sysctl.conf increase vm.swappiness=50

  • 5
    The OP currently has swappiness set to 100, so changing it to 50 would be a decrease. – G-Man Says 'Reinstate Monica' Apr 24 '16 at 8:36
  • what is the value of vm.swappiness=50 – Kalanidhi M. Jan 5 '17 at 11:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.