LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Max ram usage stuck at 1.3gig limit, uses swap instead? (https://www.linuxquestions.org/questions/linux-newbie-8/max-ram-usage-stuck-at-1-3gig-limit-uses-swap-instead-4175417183/)

firebirdsql 07-17-2012 07:42 AM

Max ram usage stuck at 1.3gig limit, uses swap instead?
 
I have a lenovo t400 with 4gigs of ram (3.8gigs usable) on debian squeeze x64.

When I run multiple applications, according to gnome system monitor, the max ram usage is 1.3gigs...the rest is paged (becomes really slow).

I remember setting a swap setting to 0 so it doesn't swap at all. Is there any other settings I could check?

Soadyheid 07-17-2012 07:59 AM

Quote:

When I run multiple applications, according to gnome system monitor, the max ram usage is 1.3gigs
If you've got 3.8Gb useable doesn't it show 2.5Gb physical memory still free? You shouldn't use any swap till the physical memory is all used up. Then again... you're not using on-board graphics with shared memory are you? I think that would show up as 'used'. There may be some memory reserved by some application for cache/buffering I suppose.

Play Bonny! :hattip:

r0b0 07-17-2012 07:59 AM

This is quite unusual. I think that either the tool is misrepresenting the data or you are just misunderstanding it. Can you post screenshots of the tool and maybe post output of 'top' command executed in a Terminal?

suicidaleggroll 07-17-2012 08:30 AM

Have you checked the BIOS to ensure that all 4GB is recognized by the system?

sundialsvcs 07-17-2012 08:58 AM

You need to be sure that everything is truly compatible. That your BIOS is up-to-date, that you are using a 64-bit Linux implementation, and that you have configured that Linux for "big memory" support. Using cat /proc/meminfo will tell you a lot about how Linux "sees" the memory configuration right now.

What you do know for sure at this point is that, if it's starting to consume swap, it doesn't think that it can "reach" any more than the current amount of RAM.

johnsfine 07-17-2012 11:05 AM

Quote:

Originally Posted by firebirdsql (Post 4730525)
When I run multiple applications, according to gnome system monitor, the max ram usage is 1.3gigs...the rest is paged (becomes really slow).

I'm sure you are misunderstanding the situation. But it is hard to estimate the real situation from your description.

Post some output from tools that measure memory usage (such as free).

Quote:

I remember setting a swap setting to 0 so it doesn't swap at all.
Bad idea. The default setting was chosen by people who understand that parameter better than you do.

Quote:

Originally Posted by Soadyheid (Post 4730534)
You shouldn't use any swap till the physical memory is all used up.

If you haven't messed with swap settings, the system will (and should) use some swap in order to avoid reducing file caching, even though file caching ram is effectively free.

Also, it may swap out during a moment of higher memory use, then free some ram. It doesn't (and shouldn't) release the swap usage just because some more ram is free.

Quote:

Then again... you're not using on-board graphics with shared memory are you? I think that would show up as 'used'.
That would not show up as used nor as free.

Soadyheid 07-18-2012 06:11 AM

Quote:

Quote:
Originally Posted by Soadyheid
You shouldn't use any swap till the physical memory is all used up.

If you haven't messed with swap settings, the system will (and should) use some swap in order to avoid reducing file caching, even though file caching ram is effectively free.
Interesting... When I set up my netbook I didn't configure a swap partition at all as anything I would run on it wouldn't fill the available 2Gb of memory. The received wisdom used to be that the swap partition had to be double your installed memory as any core dumps effectively used swap as a dump area. When no-one had any memory of note, i.e. Megabytes rather than Gigabytes, a swap partition was usefull for paging data in and out of physical memory. These days, when you have Gigabytes of physical memory, is it needed as much in a desktop situation? I can see the need with servers with multiple Virtual machines installed.

My :twocents:

Play Bonny! :hattip:

johnsfine 07-18-2012 07:10 AM

Quote:

Originally Posted by Soadyheid (Post 4731521)
When I set up my netbook I didn't configure a swap partition at all as anything I would run on it wouldn't fill the available 2Gb of memory.

Executable code and various kinds of read only data are paged from their original files, so even without swap space configured, the system may use more "memory" than you have physical ram.

Default settings are based on the assumption that it is twice as expensive to write/reread anonymous data to/from swap as to discard/reread read-only data from its original file.

So it is biased in favor of discard/reread paging over use of swap. But that is a limited bias. If the anonymous data is much more stale than the read-only data it will use swap. If you shift that bias (by changing the parameter or by configuring no swap space) you increase the paging of read only data by more than the amount you decrease swap space paging and typically make the system slower.

What kind of storage does the netbook have? For ordinary hard drives the assumption that write/reread is twice the cost of discard/reread is generally valid. But for other storage media, write/reread may be much more than twice the cost of discard/reread, so it may be correct to reduce the "swappiness" or even disable swapping entirely.


All times are GMT -5. The time now is 08:42 AM.