LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RAM increase through time. Optimum system. Choices. (https://www.linuxquestions.org/questions/linux-newbie-8/ram-increase-through-time-optimum-system-choices-924815/)

Foxbat1155 01-20-2012 10:22 AM

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.

tommcd 01-21-2012 03:29 AM

Quote:

Originally Posted by Foxbat1155 (Post 4579891)
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?

Satyaveer Arya 01-21-2012 07:58 AM

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

Foxbat1155 01-22-2012 06:54 AM

reply
 
1 Attachment(s)
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


Foxbat1155 01-22-2012 07:05 AM

[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.

Satyaveer Arya 01-22-2012 08:10 AM

According to the output, memory and all seems to be ok.

And what is your system's hardware configuration?

johnsfine 01-22-2012 08:52 AM

Quote:

Originally Posted by Foxbat1155 (Post 4581211)
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 (Post 4579891)
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?

Foxbat1155 01-22-2012 09:53 AM

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

johnsfine 01-22-2012 10:25 AM

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 (Post 4581317)
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.

snowday 01-22-2012 10:30 AM

So after 15 days uptime you had 75% memory free; I don't see the problem.

Foxbat1155 01-22-2012 10:42 AM

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?

snowday 01-22-2012 10:46 AM

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.


All times are GMT -5. The time now is 03:29 AM.