LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-27-2011, 05:20 AM   #16
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301

Ok, here's my current theory:

5111808k (BIOS misreports this) - 1257020k (missing because BIOS reports it wrong) = 3854788k of real available RAM (which is 3.67 GB) - 151908k (148 MB reserved by video card) = 3702880k (available to OS = 3.53 GB)

Are you sure there is nothing in the BIOS about how much RAM is detected ?
 
Old 01-27-2011, 07:08 AM   #17
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by H_TeXMeX_H View Post
5111808k (BIOS misreports this)
Not misreported. That is the amount of physical address space used to contain all the ram. Hex 138000000 is exactly 511808K.

The rest of the numbers don't seen to work out exactly to anything in the physical map.

Quote:
1257020k (missing because BIOS reports it wrong) = 3854788k of real available RAM (which is 3.67 GB) - 151908k (148 MB reserved by video card) = 3702880k (available to OS = 3.53 GB)
I can't tell where you are getting any of that from.
 
Old 01-27-2011, 07:21 AM   #18
startover
Member
 
Registered: May 2010
Posts: 37

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by H_TeXMeX_H View Post
Are you sure there is nothing in the BIOS about how much RAM is detected ?
The BIOS only "reports" amount of available memory and that is 4G. It is not modifiable or anything.
 
Old 01-27-2011, 07:39 AM   #19
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by johnsfine View Post
Not misreported. That is the amount of physical address space used to contain all the ram. Hex 138000000 is exactly 511808K.

The rest of the numbers don't seen to work out exactly to anything in the physical map.



I can't tell where you are getting any of that from.
From:

Code:
~$ dmesg | grep Memory
[    0.000000] Memory: 3702880k/5111808k available (4551k kernel code, 1257020k absent, 151908k reserved, 7258k data, 948k init)
Right, but 5111808k = 4.875 GB ... how is that possible ? That's not the amount of RAM available, because it's 4 GB. I think the BIOS reports it wrong, that's the only thing that can explain this.
 
Old 01-27-2011, 08:30 AM   #20
startover
Member
 
Registered: May 2010
Posts: 37

Original Poster
Rep: Reputation: 2
This is very weird. I double checked Windows 7 and it reports 4.00 GB (3.68 GB usable) for installed memory. If I can trust my eyes I had not seen that in the parenthesis part before. I ran windows memory diagnostic tool with a standard test but it didn't report any problem.
Now I have 3 numbers for the amount of memory 4.00GB, 3.68GB from Windows, and 3.5GB from Linux.

Last edited by startover; 01-27-2011 at 08:44 AM.
 
Old 01-27-2011, 09:03 AM   #21
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
No, in Linux it is 3854788k of real available RAM (which is 3.67 GB), minus the video card, maybe Window$ doesn't report the part used by the video card.

EDIT:
Oh, and I forgot to ask, what brand video card ? Intel integrated ones usually have shared memory from RAM, so they will take some of it. Maybe in Window$ it takes the RAM dynamically, while in Linux it is pre-allocated.

Last edited by H_TeXMeX_H; 01-27-2011 at 09:09 AM.
 
Old 01-27-2011, 09:27 AM   #22
startover
Member
 
Registered: May 2010
Posts: 37

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by H_TeXMeX_H View Post
No, in Linux it is 3854788k of real available RAM (which is 3.67 GB), minus the video card, maybe Window$ doesn't report the part used by the video card.

EDIT:
Oh, and I forgot to ask, what brand video card ? Intel integrated ones usually have shared memory from RAM, so they will take some of it. Maybe in Window$ it takes the RAM dynamically, while in Linux it is pre-allocated.
Graphics Card: Intel HD Graphics
Video Memory: 128MB

128M is roughly (not exactly) equal to the difference between linux number for memory and windows usable memory. But still there is gap between 4G and 3.68.
 
Old 01-27-2011, 09:48 AM   #23
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by H_TeXMeX_H View Post
5111808k = 4.875 GB ... how is that possible ? That's not the amount of RAM available, because it's 4 GB. I think the BIOS reports it wrong, that's the only thing that can explain this.
Ram and physical address space are two very different things. That is the reason a system that can only support 4GB of physical address space supports significantly less than 4GB of ram.

This system can support more than 4GB of physical address space.

The 5111808k is a measure of physical address space, not a measure of ram.

The BIOS has mapped most of the first 3GB of ram into the first 3GB of physical address space. The part of that 3GB that is missing is confusing.

The BIOS has mapped most of the fourth 1GB of ram into the fifth 1GB of physical address space. Exactly 128MB is missing from that mapping, which might be the shared video ram, except that the shared video ram is typically missing from the earlier section and that earlier section is missing enough it would be very hard to explain if it isn't shared video ram.

The main chunks of usable ram are
0000000000100000 - 00000000b327c000 = 2934256 KB
0000000100000000 - 0000000138000000 = 917504 KB
There are also two fragmented areas: 0-100000 and b327c000-b3800000 that contain 2516 KB of usable memory scattered through 23824 KB of physical address space. That fragmentation means 21308 KB of ram is unusable (should be missing after we account for all ram use).

So we have 2934256+917504+2516 = 3854276 KB that the BIOS lets Linux or Windows use. What is the 3702880 KB reported by dmesg | grep Memory, specifically what is included in the 151396 KB difference between those two numbers?

From the other side: We have 4194304 KB total ram, subtract 21308 KB lost mainly to address fragmentation (but including some ram kept by the BIOS for its own use), and subtract 131072 KB for the shared video memory. That leaves 4041924 KB that should be usable. Subtract the 3854276 KB that is usable and we get 187648 KB that the BIOS seems to have misplaced.

Last edited by johnsfine; 01-27-2011 at 10:10 AM.
 
1 members found this post helpful.
Old 01-27-2011, 01:57 PM   #24
startover
Member
 
Registered: May 2010
Posts: 37

Original Poster
Rep: Reputation: 2
Is there a way I can figure out if there is a hardware problem in here? like broken or defective RAM?
 
Old 01-27-2011, 02:33 PM   #25
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Got get one of the memtests86+ BOOT disks. Best way I know of testing ram.

 
Old 10-13-2011, 01:54 PM   #26
martje
LQ Newbie
 
Registered: Jan 2008
Posts: 12

Rep: Reputation: 0
@johnsfine Thanks for your helpful comments. That is, they helped me solve a similar problem on my own PC, but the cause of the problem is not really in the hardware. The memory limitation of 3.5GB is caused by the 32bit Linux OS, be it possibly because the motherboard does not (fully) support 64bit. So: first check what the motherboard supports, then make sure Linux installs in 64bit mode, and finally enjoy all your memory GBs.
 
Old 10-13-2011, 03:35 PM   #27
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by martje View Post
they helped me solve a similar problem on my own PC, but the cause of the problem is not really in the hardware. The memory limitation of 3.5GB is caused by the 32bit Linux OS
I'm happy to hear my comments helped, But it is hard to see how my comments (about a complicated 64 bit Linux situation) might have helped you with 32bit Linux, while leaving you apparently still misinformed.

32 bit Linux does not cause the 3.5GB limit.

The limit of how much ram can be used within 4GB of physical address space is determined by the BIOS and motherboard. 3.5GB is a fairly typical amount for ram within 4GB physical addressing.

Whether you can use any ram outside 4GB physical addressing also depends on the BIOS and motherboard.

On a motherboard where a 64-bit OS can use ram outside 4GB physical addressing, a 32bit Linux can also use ram outside 4GB physical (you need to select the PAE kernel).

Quote:
be it possibly because the motherboard does not (fully) support 64bit. So: first check what the motherboard supports, then make sure Linux installs in 64bit mode, and finally enjoy all your memory GBs.
32 bit PAE works on many older x86 systems that don't support 64 bit. 32 bit PAE also works on all x86 systems that support 64 bit.

Maybe a 64bit Linux is a better choice for other reasons. But for supporting more ram than fits in 4GB physical, a 32bit PAE Linux kernel will do the job.
 
Old 10-14-2011, 01:56 AM   #28
martje
LQ Newbie
 
Registered: Jan 2008
Posts: 12

Rep: Reputation: 0
Smile

Your comments did not give me a straight answer, but they pushed me out of the circle my searching was trapped in. So I searched better and indeed, as you say, I ended with the PAE solution. I do think the problem is the OS which cannot cope with the CPU/memory capability of 64-bit. But Linux has a solution, as opposed to Windows XP: the PAE kernel. So I slept well tonight. See Wikipedia on the 3GB barrier, and on 64-bit.

In my case the BIOS was correct in detecting my memory size, and also 'lshw' got that information right. But then 'cat /proc/meminfo' revealed the problem: the famous 3GB barrier.

Therefore: thanks for not giving we an answer, but helping me to find it. Well, my son-in-law also kept me right.

Last edited by martje; 10-14-2011 at 01:58 AM.
 
0 members found this post helpful.
Old 10-14-2011, 08:34 AM   #29
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by martje View Post
Your comments did not give me a straight answer, but they pushed me out of the circle my searching was trapped in. So I searched better and indeed, as you say, I ended with the PAE solution. I do think the problem is the OS which cannot cope with the CPU/memory capability of 64-bit. But Linux has a solution, as opposed to Windows XP: the PAE kernel. So I slept well tonight. See Wikipedia on the 3GB barrier, and on 64-bit.
From wiki 3GB barrier
Quote:
In computing, the 3 GB barrier is a limitation of some 32-bit operating systems running on x86 microprocessors. It prevents the operating systems from using more than about 3 GB (3 × 10243 bytes) of main memory (RAM).
Has nothing to do with 64-bit when using a X86_32 based OS. When ever using a X86_32 system, one must insure that PAE capable kernel is in place to break the 3GB barrier on that x86_32 OS.
Quote:
Originally Posted by martje View Post
In my case the BIOS was correct in detecting my memory size, and also 'lshw' got that information right. But then 'cat /proc/meminfo' revealed the problem: the famous 3GB barrier.

Therefore: thanks for not giving we an answer, but helping me to find it. Well, my son-in-law also kept me right.
'johnsfine' is correct in his definition. You just do not understand the system nor the reasoning behind physical address extension (PAE) mode on x86 systems.

If you do have a x86_64 system then there will be no need for physical address extension (PAE) mode;
Quote:
excerpt from physical address extension

In computing, Physical Address Extension (PAE) is a feature to allow (32-bit) x86 processors to access a physical address space (including random access memory and memory mapped devices) larger than 4 gigabytes.
First implemented in the Intel Pentium Pro in 1995, it was extended by AMD to add a level to the page table hierarchy, to allow it to handle up to 52-bit physical addresses, add NX bit functionality, and make it the mandatory memory paging model in long mode.[1] PAE is provided by Intel Pentium Pro and above CPUs, including all later Pentium-series processors (except the 400 MHz-bus versions of the Pentium M). It is also available on other processors with similar or more advanced versions of the same architecture, such as the AMD Athlon[dubiousdiscuss] and later AMD processor models.
x86 processor hardware-architecture is augmented with additional address lines used to select the additional memory, so physical address size increases from 32 bits to 36 bits. This, theoretically, increases maximum physical memory size from 4 GB to 64 GB. The 32-bit size of the virtual address is not changed, so regular application software continues to use instructions with 32-bit addresses and (in a flat memory model) is limited to 4 gigabytes of virtual address space. The operating system uses page tables to map this 4-GB address space into the 64 GB of physical memory. The mapping is typically applied differently for each process. In this way, the extra memory is useful even though no single regular application can access it all simultaneously.
To use PAE, operating system support is required. Intel versions of Mac OS X support PAE. The Linux kernel supports PAE as a build option and most major distributions provide a PAE kernel either as the default or as an option (Red Hat Enterprise Linux 6+ kernels expect PAE). FreeBSD and NetBSD also support PAE as a kernel build option.
Look at '1.3 Virtual address space details' & 1.4 Physical address space details to get a little more information to help understand a x86_64 system. So please re-read the wiki(s) and then come back with an apology.
 
Old 10-14-2011, 11:15 AM   #30
martje
LQ Newbie
 
Registered: Jan 2008
Posts: 12

Rep: Reputation: 0
@ onebuck. Thanks for your kind words. I will continue to learn.
 
  


Reply



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
tool to detect number of memory slots, memory module type, speed, and size stefanwolf Linux - Hardware 8 04-22-2013 09:48 AM
Slackware can not detect 3GB memory. Wilson_Lee Slackware 10 07-17-2008 07:50 AM
Am I right to say that SLAX helps to detect bad memory? StevenO Slackware 3 01-23-2006 03:32 AM
detect memory trashing in linux raees Linux - Software 1 06-28-2005 03:20 PM
how to detect memory leaks abirami Linux - Networking 2 11-08-2004 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:38 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration