Machine stops suddenly, Only hard reset can help
It is happens sometimes, im just working and suddenly machine starts lagging. Then it can totaly stops (Nothing works, mouse, keyboard etc.), or sometimes not.
Jun 5 16:04:12 c0rp kernel: [ 2636.897221] CPU1: Package power limit normal
Jun 5 16:04:12 c0rp kernel: [ 2636.897222] CPU3: Package power limit normal
Jun 5 16:04:12 c0rp kernel: [ 2636.897224] CPU2: Package power limit normal
Jun 5 16:04:12 c0rp kernel: [ 2636.897225] CPU0: Package power limit normal
Jun 5 16:05:01 c0rp CRON[6655]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jun 5 16:10:26 c0rp kernel: imklog 5.8.6, log source = /proc/kmsg started.
Jun 5 16:10:26 c0rp rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="1267" x-info="http://www.rsyslog.com"] start
This is whats inside syslog quite before hard reset
(command -v debian-sa1 > /dev/null && debian-sa1 1 1) may be this is my problem?
uname -a
Linux c0rp 3.8.6-030806-generic #201304051406 SMP Fri Apr 5 18:07:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Also just before lagging iowait are up
My laptop: Asus Zenbook UX32DV, Ubuntu 12.10 Sorry for my poor english
Edit 1: According to the jnv answer I remove sysstat package. The problem still exists, but now my computer doesn't stops totally. iowait very high, machine lagging and sometimes stops for 20-30 sec. I'm still trying to find a culprit. My hdd is healthy (Smart Data and test utility said). sometimes in iotop output there is kswapd0 causing 80-90% iowait.
Edit 2: According last jnv answer. Yesterday I upgraded my 12.10 to 13.04. Today everything was normal. No iowaits, no lagging.
I explain a little bit my configuration on laptop. My / and /boot are on SSD. Also 2 2Gb swap files on SSD. Swappiness is 10. /home on hdd. zRam is installed, i have 4 zRam partitions.
Also I ordered one 8Gb RAM, and later plan to buy 256Gb SSD and change HDD. If someone intersted here is good HOWTO article. Its in german but google can help.
Solution 1:
debian-sa1
and the cron job seem to come from the sysstat
package; try uninstalling the package to confirm whether it's a cause of lagging:
sudo apt-get remove sysstat
If it won't help, you can at least eliminate one possible cause.
Edit: According to your information, sysstat
isn't a problem. However since you have pointed out kswapd
for high I/O activity, the problem is probably caused by swapping – which usually leads to notable performance degradation (however it should not kill your system). See What are kswapd0, kworker/num:num, ksoftirqd/num? for information about kernel threads, including kswapd.
There are few ways to address issues with swap:
- Reduce swappiness – value about 1 to 10 could be useful
- Try using zRam which compresses RAM; it may or may not help depending on your usecase and hardware
- Buy more RAM :)
Also, if I am not mistaken, your laptop contains a smaller SSD which Windows OS uses for caching; I am not sure whether it can be utilised by Linux in the same way, however if you don't dualboot, you could use the SSD for the root system or some of its parts (with /home on a primary HDD) – see i.e. How to dualboot Ubuntu on Asus Zenbook UX32VD? and How to combine an SSD boot drive with a HDD data drive? and ArchWiki on tips how to utilise SSD. Anyway, as pointed elsewhere, it's not really a good idea to move swap to SSD due to its limited read/write cycles.