LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-20-2012, 10:22 AM   #1
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Rep: Reputation: 0
Smile RAM increase through time. Optimum system. Choices.


Hello all.

My system, Ubuntu 10.04 LTS, is increasing its RAM usage as time goes by.

In HTOP the process that increases its percentage is "root usr/bin/X"

Whether I close all files and programs is independent of the increase in memory.

I would like to find a system that does not increase my RAM so much, should I try squeeze on xorg fluxbox with the least programs and no file browser?

Thankyou.
 
Old 01-21-2012, 03:29 AM   #2
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,227

Rep: Reputation: 286Reputation: 286Reputation: 286
Quote:
Originally Posted by Foxbat1155 View Post
My system, Ubuntu 10.04 LTS, is increasing its RAM usage as time goes by.
In HTOP the process that increases its percentage is "root usr/bin/X"
Linux caches ram. Before trying other things, first have a look at this: http://www.linuxatemyram.com/
Is your system slowing down because of this?
What graphics card are you using?
If you are using ati or nvidia have you installed the proper drivers?
 
Old 01-21-2012, 07:58 AM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Dehradun, Uttarakhand, India
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,412

Rep: Reputation: 303Reputation: 303Reputation: 303Reputation: 303
It's normal that the RAM fills up over time, even when the applications have been quit.
They will re-start faster, if they're still in the RAM, but also over time quit applications that are still in RAM will be flushed out by new documents/applications if the space is needed for that.

Please post the output of below mentioned all the commands:
Quote:
#top

#free -l

#mpstat

#vmstat
 
Old 01-22-2012, 06:54 AM   #4
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 0
Smile reply

The problem I have and what I call the memory that is increasing is what htop calls the used memory so it is in accord with the concept of used memory on this site:

http://www.linuxatemyram.com/

I have the outputs requested:

Code:
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
1024 root      20   0  148m  84m  17m S    2  2.1  38:48.53 Xorg             
19932 madruga   20   0  158m  32m  18m S    2  0.8   0:01.67 chromium-browse 
19985 madruga   20   0  2544 1108  812 R    2  0.0   0:00.01 top             
1 root      20   0  2780 1532 1132 S    0  0.0   0:00.86 init              
2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd          
3 root      RT   0     0    0    0 S    0  0.0   0:00.06 migration/0       
4 root      20   0     0    0    0 S    0  0.0   0:22.80 ksoftirqd/0       
5 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0        
 6 root      RT   0     0    0    0 S    0  0.0   0:00.05 migration/1        
 7 root      20   0     0    0    0 S    0  0.0   0:19.31 ksoftirqd/1        
 8 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1         
 9 root      20   0     0    0    0 S    0  0.0   0:06.21 events/0           
10 root      20   0     0    0    0 S    0  0.0   0:02.85 events/1           
11 root      20   0     0    0    0 S    0  0.0   0:00.00 cpuset             
12 root      20   0     0    0    0 S    0  0.0   0:00.00 khelper            
13 root      20   0     0    0    0 S    0  0.0   0:00.00 async/mgr          
14 root      20   0     0    0    0 S    0  0.0   0:00.00 pm                 


             total       used       free     shared    buffers     cached
Mem:       4117336    3982404     134932          0     221760    3151668
Low:        835600     724760     110840
High:      3281736    3257644      24092
-/+ buffers/cache:     608976    3508360
Swap:      2931852       2216    2929636


Linux 2.6.32-36-generic-pae (spartan-madruga) 	01/22/2012 	_i686_	(2 CPU)

12:39:46 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
12:39:46 PM  all    3.38    0.09    1.54    0.31    0.01    0.07    0.00    0.00   94.60


procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 1  0   2216 231876 181752 3098636    0    0    20    21   12   69  3  2 95  0
Attached Files
File Type: txt output_001.txt (2.1 KB, 2 views)
 
Old 01-22-2012, 07:05 AM   #5
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 0
Smile

[QUOTE=tommcd;4580484
If you are using ati or nvidia have you installed the proper drivers?[/QUOTE]

Indeed I do have the proper proprietary ATI/AMD drivers installed.
 
Old 01-22-2012, 08:10 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Dehradun, Uttarakhand, India
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,412

Rep: Reputation: 303Reputation: 303Reputation: 303Reputation: 303
According to the output, memory and all seems to be ok.

And what is your system's hardware configuration?
 
Old 01-22-2012, 08:52 AM   #7
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,046

Rep: Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100
Quote:
Originally Posted by Foxbat1155 View Post
The problem I have
You posted output that very clearly shows you do not have a problem with memory use.

If that output was captured at a moment when you didn't have a problem and you have a problem at some other time, then try to capture similar information when the problem is actually happening.

Quote:
what I call the memory that is increasing is what htop calls the used memory so it is in accord with the concept of used memory on this site:
That was a very hard site to misunderstand. But your statement sounds like you misunderstood anyway. Try reading that site again.

Quote:
Originally Posted by Foxbat1155 View Post
the process that increases its percentage is "root usr/bin/X"
Try showing us some info about that process. Can you copy/paste that from HTOP? If not, top can be resorted by resident memory size (instead of the default CPU %) to bring that into view.

After starting top, you can type Fq to make it sort by memory use (that F is capital).

It is not necessarily wrong for X to increase its memory use. It would be bad if it kept increasing indefinitely so it ultimately uses a big fraction of your ram. But in the output you showed, nothing is using a big fraction.

Quote:
Whether I close all files and programs is independent of the increase in memory.
X is the GUI system. I assume you did not close that.

Quote:
I would like to find a system that does not increase my RAM so much, should I try squeeze on xorg fluxbox with the least programs and no file browser?
What is the point of having 4GB of ram if you are so worried about using a little of it?

Last edited by johnsfine; 01-22-2012 at 09:08 AM.
 
Old 01-22-2012, 09:53 AM   #8
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 0
I understood that site, as the memory that I have been complaining is the memory used and not the buffer nor cache. The 3 types are well metered in HTOP.

When I saved the output I had just restarted so it was not significant to this thread as it would have been when I had more than 1 gb of memory used just by having 5 okular pdfs open and 2 more djview4. The laptop was running for 15 days.

What prompted me to start this thread was that a process in the HTOP list consistently ends up being the one with the most percentage of memory used. And that that number had been increasing consistently.

If I tried to stop that process to see what happened it would restart Ubuntu, not an actual pc restart.

The process in question is

user: root
Command: /usr/bin/X :0 -nr -verbose -auth /var/run/gdm/auth-forgdm-mBT5j0/database -nolisten tcp vt7
 
Old 01-22-2012, 10:25 AM   #9
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,046

Rep: Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100
Now you're starting to provide info that would let someone help you. But it is still unclear what you mean by "1 gb of memory used" and it is unclear that 1GB is unreasonable for what you had open at the time.

The amount of memory used inside X reasonably depends on the GUI activities of all the programs you are running. But it may not be reasonable to expect X to release that memory back to Linux after it is no longer needed. The boundary between the OS and a process for memory allocation is complicated.

If there is no memory leak in X, then memory X keeps after a large GUI demand has gone away should be reused by X (rather than allocating still more) the next time a similar level of GUI use is present.

If there is a memory leak in X, then (assuming you have adequate disk space) having more swap space than you would otherwise need could postpone any significant consequences of that leak for a long time. If the real memory is needed for anything else, Linux is very good at moving leaked memory out to swap.

Even without an actual leak in X. If it is simply hanging on to most of what it needed from the last high water mark of GUI use, if you switch to some less GUI intensive but more memory intensive computation, you may need extra swap space to avoid problems.

In a popular version of a popular distribution, I would expect any real memory leak in X to already be well investigated. But X is one of the most complicated parts of the distribution for memory leak issues, so maybe you have some combination that involves a memory leak that hasn't been found and patched.

I'm primarily a Windows user, so I just live with the fact that GUI resource leaks gradually drag down a system and eventually you need to reboot to clean them out. In my own experience, Linux is better than that. But I see plenty of info online showing that other people have problems with GUI resource leaks in Linux. I'm sure X developers and Ubuntu developers take the problem seriously. For an individual user, you might want to ask whether the problem (that you might or might not actually have) is worth the effort that would be needed to figure it out. But if you think it is worth the effort and you either force it to happen or wait for it to happen and then gather good info about what is happening, I (and I'm sure more expert others) would be happy to help you interpret that info.

Quote:
Originally Posted by Foxbat1155 View Post
If I tried to stop that process to see what happened it would restart Ubuntu, not an actual pc restart.
You are talking about stopping the whole GUI system of Ubuntu.

I have stopped and restarted the whole GUI system in older versions of Mepis, Debian, Ubuntu and other distributions without rebooting many times in order to tweak display settings for support of obscure obsolete display hardware. But I haven't done so recently and the details tend to change a lot across versions.

I'm sure you could learn to correctly stop and restart X without rebooting Ubuntu and I'm pretty sure that would clear the excess memory use as if you did a real reboot. But none of your GUI activities could stay open across that, so I can't see how it could be any easier or better than a full reboot.

Last edited by johnsfine; 01-22-2012 at 10:49 AM.
 
1 members found this post helpful.
Old 01-22-2012, 10:30 AM   #10
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,907

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
So after 15 days uptime you had 75% memory free; I don't see the problem.
 
Old 01-22-2012, 10:42 AM   #11
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 0
The memory I am referring to is the one detailed in the htop site FAQ as the memory used by processes. Not the buffer or cache.

I agree that 75% is a good mark for 15 days running, however that is going to depend on context.

I will keep trying different installs of debian in my other laptop untill I find one that I like, and then choose the one that is lighter, I suppose.

One last question, is Midori browser going to definitely be lighter than Chromium? Is FOXIT reader lighter than Okular? Is Okular going to use resources from KDE resulting that the system will be used less efficiently?
 
Old 01-22-2012, 10:46 AM   #12
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,907

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
My opinion is that you do not need to reinstall or switch to lightweight applications. You are currently using only a small fraction of your available resources and have not described any performance problems.
 
  


Reply

Tags
lucid, ram, squeeze


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
increase ram RudraB Linux - Hardware 7 03-12-2010 08:01 AM
When I need increase RAM? kaspars@spam.la Linux - General 4 02-18-2009 05:26 PM
i want to increase system boot time adam_blackice Fedora 4 09-10-2006 04:22 PM
getting an optimum OS for my intel pentium 3 750 MHz ,128 mb ram computer shyamsundar Linux - Newbie 10 02-05-2006 02:34 AM
USB time out value (to increase or not increase) lynxgogo Linux - Hardware 0 07-24-2003 10:14 AM


All times are GMT -5. The time now is 09:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration