LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Lucid with 1GB RAM hangs/reboots frequently and Swap usage is very low (https://www.linuxquestions.org/questions/linux-newbie-8/lucid-with-1gb-ram-hangs-reboots-frequently-and-swap-usage-is-very-low-853554/)

rusty_vin 01-01-2011 08:23 AM

Lucid with 1GB RAM hangs/reboots frequently and Swap usage is very low
 
I have Ubuntu 10.04 installed on my PC with 1GB of RAM and 3GB of Swap partition. But the machine gets hung or reboots itself when the usage is even marginally higher. This is the output of "free -m" for Swap:

Swap: 2908 11 2897

I have tried increasing the swappiness to 80, and this not made any difference. I believe the RAM is taking up all the load and none of the pages are going in to the swap. Hence the slow response and the frequent hung system.
I know this is an old PC but Windows XP (installed on another HDD) runs way better on the same configuration.
I welcome any suggestion on this (apart from buying more RAM).
Thanks in advance.

lazlow 01-01-2011 08:42 AM

It might help if you posted the rest of the "free -m" and the results of "top". That way MIGHT be able to suggest something. At least it would give us SOME information.

rusty_vin 01-01-2011 08:59 AM

$ free -m
total used free shared buffers cached
Mem: 1009 992 11 0 11 163
-/+ buffers/cache: 247 917
Swap: 2908 41 2867

rusty_vin 01-01-2011 09:01 AM

$ top

top - 20:30:23 up 1:43, 2 users, load average: 0.47, 0.46, 0.58
Tasks: 137 total, 1 running, 136 sleeping, 0 stopped, 0 zombie
Cpu(s): 13.3%us, 2.7%sy, 0.0%ni, 81.7%id, 2.0%wa, 0.0%hi, 0.3%si, 0.0%st
Mem: 1006444k total, 992804k used, 11760k free, 11596k buffers
Swap: 2978808k total, 45612k used, 2933196k free, 174268k cached

lazlow 01-01-2011 09:32 AM

Please show us the rest of top so we can get an idea of what is running(soaking up resources).

rusty_vin 01-01-2011 11:10 AM

sorry, I thought the rest of it was irrelevant.
Thanks for your time..

3990 root 20 0 447m 30m 5000 S 11.5 6.9 11:12.20 Xorg
5473 mayamaha 20 0 87136 12m 9756 S 2.6 2.9 0:00.67 gnome-terminal
40 root 20 0 0 0 0 S 1.0 0.0 0:38.59 kondemand/0
4722 mayamaha 20 0 427m 67m 15m S 0.3 15.5 3:41.97 firefox-bin
5492 mayamaha 20 0 2548 1200 904 R 0.3 0.3 0:00.09 top
1 root 20 0 2796 1060 792 S 0.0 0.2 0:00.58 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.19 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
6 root 20 0 0 0 0 S 0.0 0.0 0:05.95 events/0
7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuset
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 sync_supers
13 root 20 0 0 0 0 S 0.0 0.0 0:00.01 bdi-default
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
15 root 20 0 0 0 0 S 0.0 0.0 0:00.69 kblockd/0
16 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kacpid
17 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kacpi_notify
18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kacpi_hotplug
19 root 20 0 0 0 0 S 0.0 0.0 0:02.67 ata/0
20 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ata_aux
21 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksuspend_usbd
22 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khubd
23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
24 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kmmcd
27 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khungtaskd
28 root 20 0 0 0 0 S 0.0 0.0 0:02.71 kswapd0
29 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 aio/0
31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ecryptfs-kthrea
32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 crypto/0
36 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kstriped
37 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kmpathd/0
38 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kmpath_handlerd
39 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksnapd
41 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kconservative/0
227 root 20 0 0 0 0 S 0.0 0.0 0:00.01 scsi_eh_0
228 root 20 0 0 0 0 S 0.0 0.0 0:00.01 scsi_eh_1
229 root 20 0 0 0 0 S 0.0 0.0 0:04.76 scsi_eh_2

lazlow 01-01-2011 11:31 AM

Off hand I would guess you have something going on with your Xorg. Compare to mine:

Quote:

3532 root 15 0 149m 31m 11m S 1.9 1.6 15:26.95 Xorg
There are things that are constantly running that cannot be swapped out. From the look of it Xorg is using nearly half your memory and display is one of those things that generally (excluding headless) cannot be swapped out. If you add firefox and Xorg (447+427=874) you have virtually nothing (150) left to run the rest of the system.

rusty_vin 01-01-2011 12:09 PM

thanks for the quick response..
Of all of the forums I have subscribed, this forum is the quickest one I have got replies. (thumbs up)

Though my query is: If the machine is low on memory, then swap should jump in. Why does that not happen.. or how can we make it happen ?
Instead, my computer frequently gets hung and logs-off/reboots itself.
I know swap slows down the response time, however, given a choice, I would prefer a slightly slower system, than to lose all running applications and start all over again.

lazlow 01-01-2011 12:17 PM

The problem is that there is stuff running that cannot be swapped out while it is actively running. Any time the screensaver is not on (screen shut off) the display is running. If you are running FF then the display HAS to be running, so both are running at the exact same instant. There are also a ton of other things that need to run periodically (see top)(on second by second basis). While each does not use a significant amount of memory they have to be in real memory(not swapped) when actually running. If you could find out what is with your Xorg and get it down to a resonable level(sub 200m) that would give the rest of the system enough head room to run. Saying it in a less kind way; your Xorg is FUBAR.

rusty_vin 01-01-2011 12:28 PM

gotcha..Thanks for clearing that up.
Let me see if I can clean the panels, etc.


All times are GMT -5. The time now is 07:09 PM.