LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-01-2011, 08:23 AM   #1
rusty_vin
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Rep: Reputation: 0
Question 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.
 
Old 01-01-2011, 08:42 AM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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.
 
Old 01-01-2011, 08:59 AM   #3
rusty_vin
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
$ free -m
total used free shared buffers cached
Mem: 1009 992 11 0 11 163
-/+ buffers/cache: 247 917
Swap: 2908 41 2867
 
Old 01-01-2011, 09:01 AM   #4
rusty_vin
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
$ 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
 
Old 01-01-2011, 09:32 AM   #5
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Please show us the rest of top so we can get an idea of what is running(soaking up resources).
 
Old 01-01-2011, 11:10 AM   #6
rusty_vin
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 01-01-2011, 11:31 AM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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.
 
Old 01-01-2011, 12:09 PM   #8
rusty_vin
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 01-01-2011, 12:17 PM   #9
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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.
 
Old 01-01-2011, 12:28 PM   #10
rusty_vin
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
gotcha..Thanks for clearing that up.
Let me see if I can clean the panels, etc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excessive RAM/swap usage Jinouchi Linux - Software 10 03-09-2009 09:59 AM
Suse 10.3 hangs on Pentium-D 64bit 1GB Ram jtm_tango Linux - Newbie 3 11-17-2007 01:46 PM
ram and swap usage? FredericV Linux - General 6 03-25-2007 04:56 PM
RAM/SWAP usage ganja_guru Linux - Software 13 12-29-2004 03:17 AM
1Gb or Ram - Do I need Swap? Riddick SUSE / openSUSE 8 11-10-2004 05:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration