Memory leaks is happening in my machine. How to solve this

Asked by prajwala

Hi,

I am using Ubuntu 8.04 on 64 bit machine. From past 1 month my machine is becoming very slow. When I check the memory usage using system-monitor tool. It is showing above 80% memory usage when I am running just terminal. These are the list of processes using memory in MBs
gnome-pannel 11.1MB
gnome-system-monitor 8.2MB
gnome-terminal 7.9MB
pidgin 6.9MB
nautilus 2.4MB
seahourse-agent 1.7MB
metacity 1.5MB
bash 1.3MB
gnome-keyring-daemon 1.2MB
gvfsd-burn 1.1MB

The rest of the processes are in terms of KIBs
When I sum up all of them it does not become even 100MB. But in the Resources tab of the system monitor it is showing 371.9MiB is used out of 436.8 MiB. it is almost 85.1%

That means some process are leaking memory.
Please help me to fix this problem.

Thanks,
Prajwala

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you please provide:

uname -a; lsb_release -a

Thanks.

Revision history for this message
prajwala (prajwala) said :
#2

uname -a output

Linux azr-cle31 2.6.24-24-generic #1 SM Tue Jun 30 19:54:36 UTC 2009 x86_64 GNU/Linux

lsb_release -a output
No LSB modules are available
Distribution ID: Ubuntu
Description: Ubuntu 8.04.3 LTS
Release: 8.04
Codename: hardy

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

OK so we have a 64Bit Hardy install on kernel 2.6.24-24

I am unable to verify these values as "normal" as I do not use many of the apps you use.

Pidgin on my system is using about the same amount of ram though.

Maybe someone else can verify these values on a gnome/ubuntu system.

Revision history for this message
prajwala (prajwala) said :
#4

Hi actionparsnip,

Thanks for trying to help me.

I don't think pidgin is taking more memory. Some process is leaking memory that's why I am seeing 85.1% memory usage. I could not find which process is leaking memory.

Thanks

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Just run the command

top

and watch

RAM in ubuntu is used as disk cache to speed things up. There is no point having RAM if yuo are not using it so Ubuntu will use it to speed up disk access by caching data.

Here's mine:

top - 11:05:07 up 13 days, 7:35, 4 users, load average: 0.01, 0.05, 0.01
Tasks: 106 total, 1 running, 105 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.5%us, 1.5%sy, 0.0%ni, 94.4%id, 0.6%wa, 0.1%hi, 0.0%si, 0.0%st
Mem: 881704k total, 863780k used, 17924k free, 17720k buffers
Swap: 2000052k total, 720k used, 1999332k free, 438676k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 3428 andy 20 0 318m 23m 3408 S 2.0 2.8 418:22.47 transmission
16733 andy 20 0 18980 1208 900 R 2.0 0.1 0:00.01 top
    1 root 20 0 4100 532 248 S 0.0 0.1 0:00.99 init
    2 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kthreadd
    3 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/0
    4 root 15 -5 0 0 0 S 0.0 0.0 0:26.64 ksoftirqd/0
    5 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
    6 root 15 -5 0 0 0 S 0.0 0.0 0:02.08 events/0
    7 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
    8 root RT -5 0 0 0 S 0.0 0.0 0:00.00 kstop/0
    9 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kintegrityd/0
   10 root 15 -5 0 0 0 S 0.0 0.0 0:00.65 kblockd/0
   11 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
   12 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpi_notify
   13 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue
   14 root 15 -5 0 0 0 S 0.0 0.0 1:30.15 ata/0
   15 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 ata_aux

                   total used free shared buffers cached
Mem: 861 405 455 0 0 15
-/+ buffers/cache: 389 471
Swap: 1953 0 1952

Not bad for Ubuntu + LXDE + (Transmission + http interface) + Samba + (VLC + http interface)

=D

Revision history for this message
Steve (stupendoussteve-deactivatedaccount) said :
#6

The above is mostly your solution. It doesn't appear any process is
using this ram, but it is not showing up as free ram. This is due to
caching and is good for peformance. This memory will be given to an
application if the application needs it. The "free" memory is not the
only way to measure it, as it is not very smart.

Revision history for this message
prajwala (prajwala) said :
#7

Thanks actionparsnip, Steven Susbauer for your response.

You are correct if the ubuntu uses RAM to speed up the performance, but my machine is very slow I am unable to use just terminal and emacs. If I open firefox then it will become very very slow. I have to kill all process for every 1 hour. This is the exact problem. Because of this I am checking the memory usage, I disabled indexing of files also then no use. I am unable to find what is the exact problem.

Revision history for this message
Shang Wu (shangwu) said :
#8

If have an old computer, why don't you try to use xubuntu instead?

Can you help with this problem?

Provide an answer of your own, or ask prajwala for more information if necessary.

To post a message you must log in.