LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to use full RAM in Ubuntu 11.04 32 bit (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-use-full-ram-in-ubuntu-11-04-32-bit-897262/)

unkn(0)wn 08-14-2011 12:54 PM

How to use full RAM in Ubuntu 11.04 32 bit
 
Hello ,
I recently installed UBUNTU 11.04 32 bit on my laptop , having configuration

intel core i5 460M
4 gb RAM
500 gb HDD
Nvidia geForce GT 420M Graphics Card

but when i opened system monitor , it showes only 2.3 GB RAM there ! and 4 GB swap (Don't know what swap means) . Where does my rest of memory goes ? (Windows 7 is showing 4GB ram ).

And from where i can install correct driver for my Graphics Card . When i install "Restricted Driver Download" it put ends to desktop effect (including my favorite Wobbly effect :( (Don't suggest Compiz please).

Pls help !

TobiSGD 08-14-2011 01:17 PM

Please don't attach totally unrelated polls to your threads, that is somewhat useless.
To your question: Windows is lying, at least in the 32 bit version. It detects 4GB of RAM, but can not use it to its fully extent. Linux is saying the truth, caused by BIOS issues it is not able to use more than 2.3 GB. You have to either install the PAE kernel (I think in Ubuntu it is the server kernel) or use the 64 bit version of Ubuntu.

unkn(0)wn 08-14-2011 01:27 PM

Let me tell you , when i play games in windows my ram usage reaches to 3.2 GB in task manager , so windows can't be lying !
And i am having my data spread everywhere in ubuntu 32 bit . So i can't roll over , i just wanted to use my full ram , if possible !
And about poll , i'll take care next time (noob , i am) . And how to install KERNEL PAE ?

TobiSGD 08-14-2011 01:36 PM

Quote:

Originally Posted by unkn(0)wn (Post 4442788)
Let me tell you , when i play games in windows my ram usage reaches to 3.2 GB in task manager , so windows can't be lying !

Windows may be able to use more RAM than Linux (assuming both are 32 bit), but it is impossible for a 32 bit Windows version to use the full 4GB RAM. Instead of showing the amount of RAM it can use it shows the amount of RAM it can detect. This was not the case on early Vista versions, but they patched it because many customers complained about the "missing" RAM. So Windows is lying, it shows RAM that it can not use.

To install the PAE kernel open Synaptic and search for the package linux-image-2.6.38-10-generic-pae. That is the one to install.
Alternatively you can install it with
Code:

sudo apt-get update && sudo apt-get install linux-image-2.6.38-10-generic-pae

jefro 08-14-2011 03:17 PM

I assume you mean you have 2.3 left ready to use and not a total of.

By the way, I have no idea why attracts so many newbies to backtrack. A criminal nature? There is really no legitimate reason for most people to use backtrack. It is a tool for advanced user in a very limited situation. It could be a tool for criminals also sadly like a firearm.

16pide 08-14-2011 03:19 PM

This is all well described here:
http://www.codinghorror.com/blog/200...es-of-ram.html

32 bit OS limits you to 4GB, not 2GB. But then there are the devices such as graphic card, audio, disk, etc ...

Anyway, the URL above is a good read

TobiSGD 08-14-2011 03:23 PM

Quote:

Originally Posted by jefro (Post 4442873)
I have no idea why attracts so many newbies to backtrack.

I think it is the coolness-factor. A few years ago some people felt themselves to be "1337-haxorz" because they had Linux installed on their machines. Nowadays Linux isn't a geek-system anymore, so they have to go to a system that contains tools for cracking networks, so that they can feel themselves as "1337-haxorz", even if they don't know even the basics about networks and how to use those tools. They have seen a tutorial on Youtube how to crack your neighbor's WLAN, so they MUST have it.

unkn(0)wn 08-14-2011 04:04 PM

Quote:

Originally Posted by tobisgd (Post 4442880)
i think it is the coolness-factor. A few years ago some people felt themselves to be "1337-haxorz" because they had linux installed on their machines. Nowadays linux isn't a geek-system anymore, so they have to go to a system that contains tools for cracking networks, so that they can feel themselves as "1337-haxorz", even if they don't know even the basics about networks and how to use those tools. They have seen a tutorial on youtube how to crack your neighbor's wlan, so they must have it.

dont take everything in negative way pls . Always think positive ...

TobiSGD 08-14-2011 04:21 PM

Quote:

Originally Posted by unkn(0)wn (Post 4442916)
dont take everything in negative way pls . Always think positive ...

Hey, that was meant neither negative nor positive. It is just what I think is a realistic view of that topic. ;)

cascade9 08-15-2011 04:58 AM

I've seen i5-XXXM setups with up to 1.7GB of 'shared' video memory. That would explain the 'missing' memory (1.something GB + 2.3GB = 3.something which is what 32bit non-PAE is normally limited to).

If that assumption is right, installing the PAE kernel might get you some memory back, but I'd doubt you would get more than 200-500MB.

Quote:

Originally Posted by unkn(0)wn (Post 4442760)
And from where i can install correct driver for my Graphics Card . When i install "Restricted Driver Download" it put ends to desktop effect (including my favorite Wobbly effect :( (Don't suggest Compiz please).

11.04 is using compiz already....

If your video driver installation failed like that, you probably have a laptop with 'switchable graphics', with the intel video chip used as the main video. You would need to change over to the nidia GPU to be able to install the drivers. That can sometimes be done from the BIOS, sometimes you have to use software.

What model laptop is it?

unkn(0)wn 08-15-2011 06:18 AM

Quote:

Originally Posted by TobiSGD (Post 4442799)
Windows may be able to use more RAM than Linux (assuming both are 32 bit), but it is impossible for a 32 bit Windows version to use the full 4GB RAM. Instead of showing the amount of RAM it can use it shows the amount of RAM it can detect. This was not the case on early Vista versions, but they patched it because many customers complained about the "missing" RAM. So Windows is lying, it shows RAM that it can not use.

To install the PAE kernel open Synaptic and search for the package linux-image-2.6.38-10-generic-pae. That is the one to install.
Alternatively you can install it with
Code:

sudo apt-get update && sudo apt-get install linux-image-2.6.38-10-generic-pae

Ign http://extras.ubuntu.com natty InRelease
Ign http://security.ubuntu.com natty-security InRelease
Ign http://in.archive.ubuntu.com natty InRelease
Get:1 http://extras.ubuntu.com natty Release.gpg [72 B]
Get:2 http://security.ubuntu.com natty-security Release.gpg [198 B]
Ign http://in.archive.ubuntu.com natty-updates InRelease
Hit http://in.archive.ubuntu.com natty Release.gpg
Hit http://extras.ubuntu.com natty Release
Get:3 http://security.ubuntu.com natty-security Release [27.2 kB]
Get:4 http://in.archive.ubuntu.com natty-updates Release.gpg [198 B]
Hit http://extras.ubuntu.com natty/main Sources
Hit http://in.archive.ubuntu.com natty Release
Hit http://extras.ubuntu.com natty/main amd64 Packages
Get:5 http://security.ubuntu.com natty-security/main Sources [63.8 kB]
Get:6 http://in.archive.ubuntu.com natty-updates Release [27.2 kB]
Ign http://extras.ubuntu.com natty/main TranslationIndex
Get:7 http://security.ubuntu.com natty-security/restricted Sources [14 B]
Hit http://in.archive.ubuntu.com natty/main Sources
Hit http://in.archive.ubuntu.com natty/restricted Sources
Get:8 http://security.ubuntu.com natty-security/universe Sources [9,829 B]
Hit http://in.archive.ubuntu.com natty/universe Sources
Hit http://in.archive.ubuntu.com natty/multiverse Sources
Get:9 http://security.ubuntu.com natty-security/multiverse Sources [655 B]
Hit http://in.archive.ubuntu.com natty/main amd64 Packages
Hit http://in.archive.ubuntu.com natty/restricted amd64 Packages
Get:10 http://security.ubuntu.com natty-security/main amd64 Packages [166 kB]
Hit http://in.archive.ubuntu.com natty/universe amd64 Packages
Hit http://in.archive.ubuntu.com natty/multiverse amd64 Packages
Ign http://extras.ubuntu.com natty/main Translation-en_IN
Get:11 http://security.ubuntu.com natty-security/restricted amd64 Packages [14 B]
Ign http://in.archive.ubuntu.com natty/main TranslationIndex
Ign http://extras.ubuntu.com natty/main Translation-en
Ign http://in.archive.ubuntu.com natty/multiverse TranslationIndex
Ign http://in.archive.ubuntu.com natty/restricted TranslationIndex
Ign http://in.archive.ubuntu.com natty/universe TranslationIndex
Get:12 http://in.archive.ubuntu.com natty-updates/main Sources [99.6 kB]
Get:13 http://in.archive.ubuntu.com natty-updates/restricted Sources [14 B]
Get:14 http://in.archive.ubuntu.com natty-updates/universe Sources [22.6 kB]
Get:15 http://in.archive.ubuntu.com natty-updates/multiverse Sources [1,895 B]
Get:16 http://security.ubuntu.com natty-security/universe amd64 Packages [31.8 kB]
Get:17 http://in.archive.ubuntu.com natty-updates/main amd64 Packages [299 kB]
Get:18 http://in.archive.ubuntu.com natty-updates/restricted amd64 Packages [14 B]
Get:19 http://security.ubuntu.com natty-security/multiverse amd64 Packages [1,942 B]
Get:20 http://in.archive.ubuntu.com natty-updates/universe amd64 Packages [82.7 kB]
Ign http://security.ubuntu.com natty-security/main TranslationIndex
Get:21 http://in.archive.ubuntu.com natty-updates/multiverse amd64 Packages [4,176 B]
Ign http://security.ubuntu.com natty-security/multiverse TranslationIndex
Ign http://security.ubuntu.com natty-security/restricted TranslationIndex
Ign http://security.ubuntu.com natty-security/universe TranslationIndex
Ign http://in.archive.ubuntu.com natty-updates/main TranslationIndex
Ign http://in.archive.ubuntu.com natty-updates/multiverse TranslationIndex
Ign http://in.archive.ubuntu.com natty-updates/restricted TranslationIndex
Ign http://in.archive.ubuntu.com natty-updates/universe TranslationIndex
Ign http://security.ubuntu.com natty-security/main Translation-en_IN
Ign http://security.ubuntu.com natty-security/main Translation-en
Ign http://security.ubuntu.com natty-security/multiverse Translation-en_IN
Ign http://security.ubuntu.com natty-security/multiverse Translation-en
Ign http://security.ubuntu.com natty-security/restricted Translation-en_IN
Ign http://security.ubuntu.com natty-security/restricted Translation-en
Ign http://security.ubuntu.com natty-security/universe Translation-en_IN
Ign http://security.ubuntu.com natty-security/universe Translation-en
Ign http://in.archive.ubuntu.com natty/main Translation-en_IN
Ign http://in.archive.ubuntu.com natty/main Translation-en
Ign http://in.archive.ubuntu.com natty/multiverse Translation-en_IN
Ign http://in.archive.ubuntu.com natty/multiverse Translation-en
Ign http://in.archive.ubuntu.com natty/restricted Translation-en_IN
Ign http://in.archive.ubuntu.com natty/restricted Translation-en
Ign http://in.archive.ubuntu.com natty/universe Translation-en_IN
Ign http://in.archive.ubuntu.com natty/universe Translation-en
Ign http://in.archive.ubuntu.com natty-updates/main Translation-en_IN
Ign http://in.archive.ubuntu.com natty-updates/main Translation-en
Ign http://in.archive.ubuntu.com natty-updates/multiverse Translation-en_IN
Ign http://in.archive.ubuntu.com natty-updates/multiverse Translation-en
Ign http://in.archive.ubuntu.com natty-updates/restricted Translation-en_IN
Ign http://in.archive.ubuntu.com natty-updates/restricted Translation-en
Ign http://in.archive.ubuntu.com natty-updates/universe Translation-en_IN
Ign http://in.archive.ubuntu.com natty-updates/universe Translation-en
Fetched 839 kB in 39s (21.3 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-2.6.38-10-generic-pae
E: Couldn't find any package by regex 'linux-image-2.6.38-10-generic-pae'

outcome of above command , no help .

TobiSGD 08-15-2011 06:27 AM

That's rather weird, that package should be there. Try it with linux-generic-pae instead of linux-image-2.6.38-10-generic-pae

unkn(0)wn 08-15-2011 06:30 AM

Quote:

Originally Posted by cascade9 (Post 4443311)
What model laptop is it?

i see , my laptop model is Dell XPS L501X , with two graphics
1. Intel(R) HD graphics
2. NVIDIA Georce GT420M
And i am sure that Default is Intel HD graphics .
How to switch using software (I don't like to change in BIOS) .

TobiSGD 08-15-2011 06:31 AM

Quote:

Originally Posted by unkn(0)wn (Post 4443378)
How to switch using software (I don't like to change in BIOS) .

You don't. NVidia currently does not support switchable graphics.

cascade9 08-15-2011 08:01 AM

Quote:

Originally Posted by unkn(0)wn (Post 4443378)
How to switch using software (I don't like to change in BIOS) .

It would be easier...a lot easier...to force the nVidia GPU in the BIOS than to stuff around with software switching. But if you really want to do it from software, this is the place to look-

http://linux-hybrid-graphics.blogspo...for-linux.html

Quote:

Originally Posted by TobiSGD (Post 4443379)
You don't. NVidia currently does not support switchable graphics.

I dont know if nVidia offically supports switchable graphics with linux, but it can work. 'Switchable graphics' is less complex than 'optimus'.

johnsfine 08-15-2011 09:01 AM

Quote:

Originally Posted by unkn(0)wn (Post 4442788)
Let me tell you , when i play games in windows my ram usage reaches to 3.2 GB in task manager , so windows can't be lying !

How do you know Windows isn't "lying" about that 3.2GB? Or maybe you're misunderstanding the meaning of that 3.2GB stat. Probably, you're also misunderstanding the meaning of the 2.3GB Linux stat you started with.

Of your 4GB physical ram.
1) Part of it is unusable by any OS regardless of what you do.
2) Part of it is usable by a 32 bit PAE Linux or by 64-bit Windows or Linux, and is not usable by 32-bit Windows nor non PAE 32-bit Linux.
3) Part of it is reserved for use by your Intel(R) HD graphics.
3a) Windows (actually NVidia software in Windows) might be able to do things that Linux can't to make part or all of the ram reserved for Intel graphics available for other purposes when the Intel graphics aren't using that ram. That is the only way 32-bit Windows might have more ram usable than Linux on your laptop.

There is a table of physical memory info that the BIOS provides to the OS at startup. You should be able to get it with the command:
dmesg | grep e820

If you post that table to this thread, any expert here can tell you the amount of ram in (2) in my list of possibilities above and the total of (1) and (3) and maybe some estimate of the split between (1) and (3).

That should give you more perspective on the problem and potential for improvement.

For installing the PAE kernel, Ubuntu has a GUI package manager. (I haven't kept track of which GUI package manager is in which version of Ubuntu. Personally, I'm only experienced with the Synaptic GUI package manager, which is in some versions of Ubuntu).

With Synaptic, it is very easy to search for something like PAE to find all available packages with PAE in their name. Then it should be obvious which of those packages is the current (for your version of Ubuntu) PAE kernel. Then it is trivial to select it and install it.

Unlike most package installs, a kernel package install does not take effect until the next reboot.

Luke_Wolf 09-03-2011 11:58 AM

Um.. You people do realize that if that's the OEM install of Windows 7 that it is going to be 64 bit version, right?... right? There's no reason that they'd install the 32 bit version on an i5 unless the OEM is incredibly stupid, particularly paired up with 4GB of RAM. So no, Windows is not lying, he's simply running the 64-bit version.

OP: The solution to your problem is either to install a PAE kernel which allows up to 64 GB of RAM, or use a 64-bit version of the distro. If memory serves though Ubuntu doesn't have a 64-bit version, although other alternatives such as Fedora or openSUSE do have such.

godh8sme 09-04-2011 07:25 PM

I am using a 64 bit version of Ubuntu 11.04 on a system with 16 Gig of RAM that it fully utilizes. However, there is no way to just upgrade from the 32 bit to the 64 bit version. You will need to do a re-install.

Akflash 09-29-2011 12:08 PM

How bout Mandriva 2011 64 bit? Have loaded my first Mandrake 7.2!

parag_dhake 10-02-2011 01:01 AM

what is swap?
 
hallo dude

swap is internal partition of Linux if you not create it.
You can also make swap partition at the time of OS installation.
Usually swap is made 2*ram but it not mandatory.
In simple language when your start some program & in your ram there is some program but in sleep mode then these program is transfer in swap partition (without informing that program)
Hence your new program get chance in ram.
My suggestion is always made swap partition double of ram it increase the speed of your system

16pide 10-04-2011 03:10 AM

No, making swap space be twice the size of RAM is not always a good idea.
For example, my laptop has 12 GB of RAM. I never used more than 8GB of it.
It does not have any swap space. It runs blazing fast.
I could add some swap space, say 4GB, and then my virtual memory would be 16GB, but like I said I never needed more than 8GB...

Now regarding speed. Adding swap space has never increased speed and never will.
Remember, swap space is on disk. When it is used, the system swaps information in ram with information on disk. this can never be faster than running from RAM without swapping.
You can add as many GB of swap you want, it will never make your system faster.

johnsfine 10-04-2011 07:44 AM

Quote:

Originally Posted by 16pide (Post 4489493)
I could add some swap space, say 4GB, and then my virtual memory would be 16GB,

That concept of "virtual memory" as the sum of physical memory plus swap is completely unsound. It is based on a serious misconception of virtual memory and it leads to further misunderstandings.

Quote:

I never needed more than 8GB...
"Needed" is ambiguous in a few ways in that sentence.

Quote:

Adding swap space has never increased speed and never will.
Nonsense. There are moderately common cases in which adding swap significantly increases speed. On a lightly loaded workstation with 12GB of ram it is pretty hard to describe a possible speed increase from adding swap, and such a speed increase would be very tiny even if it occurred. But in other configurations a big speed increase is possible.

Quote:

When it is used, the system swaps information in ram with information on disk.
Regardless of whether you have any swap space, Linux still swaps information in ram with information on disk. Most significantly, it brings in pages from exectuables, .so files and other mapped files, usually displacing other such pages. Swap space allows Linux to displace anonymous pages when they are much less recently accessed than other pages. The theory of virtual memory is based on the idea that less recently accessed pages are also less likely to be accessed again in the future. So forcing Linux to displace a recently accessed non anonymous page instead of a non recently accessed anonymous page likely increases total disk I/O and slows the system throughput.

If your 12GB system hasn't even filled up ram with cache, then it wouldn't use any swap space even if it had any. Even if ram is full (including cache) it won't want to use swap space unless some anonymous page is significantly less recently used than any non anonymous page in cache. But if it does want to use swap space then having some swap space would probably make the system a tiny bit faster.

For a moderately heavily used 4GB system, swap space may significantly improve system throughput. With a heavier workload relative to ram size, swap doesn't just improve speed, it is necessary to avoid failures due to lack of memory.

Quote:

No, making swap space be twice the size of RAM is not always a good idea.
I agree. 2 times ram was always a stupid rule and has gotten stupider. My advice for a workstation is to make swap space about 2GB larger than the amount of swap you reasonably expect the system to use. For a lightly loaded workstation, reasonable use of swap space is very small, so 2GB more than that is 2GB. If there are specific reasons real swap use would be expected than add that expected use to 2GB. But if your system is seriously short of disk space, either buy a real disk or be less generous in allocating swap space.

16pide 10-05-2011 03:27 AM

Quote:

That concept of "virtual memory" as the sum of physical memory plus swap is completely unsound. It is based on a serious misconception of virtual memory and it leads to further misunderstandings.
Can you explain this please?
I read again http://en.wikipedia.org/wiki/Virtual_memory and the graph in top-right and don't see where you think I misunderstand something

johnsfine 10-05-2011 07:50 AM

Quote:

Originally Posted by 16pide (Post 4490363)
I read again http://en.wikipedia.org/wiki/Virtual_memory and the graph in top-right and don't see where you think I misunderstand something

Minor issue: The picture in the top right of that is a simplification leaving out quite a lot of important possibilities.

Major issue: That picture says Disk not Swap space for non resident sections virtual memory. That is an important distinction.

Only anonymous memory goes into swap space when it is non resident. Linux processes typically have a significant amount of non anonymous memory that is non resident, meaning it is on disk, but not in the swap space.

Having zero or too little swap space limits the amount of anonymous memory that can be non resident, so average access to anonymous memory is faster. But in doing so it reduces the amount of non anonymous memory that can be resident and makes access to non anonymous memory slower.

But remember, I'm not talking about the situation on a workstation with 12GB of ram and a low ram workload.


All times are GMT -5. The time now is 08:36 PM.