Stop Microsoft

Miscellaneous => Technical Support => Topic started by: Aloone_Jonez on 27 October 2009, 16:48

Title: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 27 October 2009, 16:48
I've just upgraded to 512MB but Linux is only reporting 490.6MB.

I know I have an on board video adaptor which is configured to use 8MB which makes 504MB, so where's the remaining 13.4MB?

I know that this is an OS problem, not a BIOS or hardware problem because Windows reports 504MB.

I've tried removing one of the RAM modules and I still get the same problem so the upgrade isn't the problem, it's just what's caused me to notice it.

I know 13.4MB of memory isn't much, it would just be nice to know what's happened to it.
Title: Re: 13.4MB of memory is missing!
Post by: davidnix71 on 28 October 2009, 00:49
Bit and bytes, maybe. 512 divided by 1.024 equals exactly 500.

Maybe your ram is off-spec and the flavor of Linux you use does a ram check at boot and only found 490.6.
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 28 October 2009, 01:45
I know it isn't the RAM module because the amount of memory is reported correctly by  Windows and the BIOS.

As far as the rounding error is concerned: I don't see why it should be rounded like that. As far as I'm aware, RAM is normally specified in MiB, i.e. 1MiB = 1024KiB = 1,048,576 bytes, so to be pedantic I really have 536.9MB but 8.38MB is being used for video so it should report 528.5MB (more) not 490.6MB (less).

EDIT:
Even GRUB seems to be reporting the amount of memory correctly, 639KiB of conventional + 515,008KiB of extended memory which works out at 503.56MiB and is probably a rounding error.
Title: Re: 13.4MB of memory is missing!
Post by: davidnix71 on 28 October 2009, 02:36
If your ram maker lied like hard drive makers did before they got sued, then 512 million bites would be 488.28 MB
(512 divided by 1.048576)

If you read the fine print on some hard drives, the number may be "one terabyte" meaning 1 trillion bites (which is a lie, of course), but that's actually the minimum number of good sectors they will ship the drive with. The real number is always a little larger than that. When that ram module was made, it could have came in at 514.4 million bites or so, which is really 490.6 MB

Your ram module firmware may report it's size to Windows in a rounded fashion "I'm a 512MB DDR2-444 SO-DIMM module", but that's not the real usuable number.

I would trust Linux to check the real usable number and pass that on to you.
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 28 October 2009, 14:12
But the BIOS memory check actually scans the memory at boot up and reports the memory in KB which I divided by 1024 to give exactly 504MB of RAM.

I doubt the hard drive companies were actually sued because they were right, the International Standard System of Units lists 1MB as 1,000,000 bytes not 1,048,576 bytes which is really 1MiB.

http://en.wikipedia.org/wiki/Megabyte (http://en.wikipedia.org/wiki/Megabyte)
http://en.wikipedia.org/wiki/Binary_prefix (http://en.wikipedia.org/wiki/Binary_prefix)

I think more investigation is required, I'll try removing one of the of the modules and see if the amount of RAM missing stays the same, if it does then I'll replace the module and remove the other, to check they're both the same capacity.
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 30 October 2009, 11:56
I removed the new module and Linux reported 238MB of RAM. I swapped the old module with the new and it still reported 238MB.


Let's see if it's a rounding error as you descried above:
238
Title: Re: 13.4MB of memory is missing!
Post by: Lead Head on 31 October 2009, 16:09
RAM has always been in MiB, and still is (as far as I know), hence why 1GB of ram is advertised as 1024MB
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 31 October 2009, 23:12
That's what I thought.

MiB makes sense when you think of the addressing system on the memory IC.

I don't know though, what else could explain this mystery?

I ran a memtest and it reported 504MB so I assume it's a problem with the kernel as it's the only thing that seems to report a lower figure.

Title: Re: 13.4MB of memory is missing!
Post by: Lead Head on 14 December 2009, 07:47
Do you have an onboard modem/ethernet/sound that could be using some of that ram?
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 14 December 2009, 13:13
I don't know, I would've thought that the BIOS would have taken that into account like it did for my on-board graphics.

I've installed a graphics card now so I'll have a look at the memory reported under Linux next time I reboot.

Windows: Control Panel -> System says 512MB and task manager says 523,760KB which works out just under 512MB but it's an acceptable rounding error.
Title: Re: 13.4MB of memory is missing!
Post by: Lead Head on 14 December 2009, 23:18
Was just messing around on my Ubuntu rig, with a dedicated video card and 512MB of ram, "Sysinfo" reports 497MB. Odd.
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 15 December 2009, 00:25
I'll try installing a Linux distro in a VM with a known amount of RAM and see what it reports.
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 31 December 2009, 23:14
I've just tried that with Fedora, I set up a VM with 512MB RAM and it said 245MB.

Perhaps this is a question for the kernel developers?
Title: Re: 13.4MB of memory is missing!
Post by: Lead Head on 2 January 2010, 01:48
Interesting issue. Are you sure in Fedora it wasn't reporting useable ram, instead of say total installed?
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 2 January 2010, 02:48
Sorry I ment to say the VM had 256MB RAM and it said 245MB.

Why should there be a difference between usable and total RAM?

I told VirtualBox to allocate 256MB for the VM so I don't see why any less than 256MB should be available to the VM.
Title: Re: 13.4MB of memory is missing!
Post by: Lead Head on 2 January 2010, 17:25
Sometimes operating systems like to take a chunk of ram for themselves, and under no circumstances can anything else use it. Like under Windows 7, I have Total Ram, Cached Ram, Available Ram, and Free Ram. Right now I have 1534 MB total(actually 1536 installed, rounding error?), 763MB cached, 801MB Available and 87MB Free. Figure that one out. It also says the Kernel is using 144MB of paged memory, and 27MB of non paged memory. I'm assuming that means no matter what, at least 27MB of RAM is going to be used by the Kernel.
Title: Re: 13.4MB of memory is missing!
Post by: Kintaro on 27 April 2010, 03:51
The answer is: your linux kernel and its modules.  :P
Title: Re: 13.4MB of memory is missing!
Post by: Calum on 27 April 2010, 13:00
are you saying his windows 7 has a linux kernel? scandalous if so!
Title: Re: 13.4MB of memory is missing!
Post by: Kintaro on 28 April 2010, 21:57
Thought the guy was talking about Linux, but probably the exact same thing.
Title: Re: 13.4MB of memory is missing!
Post by: Aloone_Jonez on 27 May 2010, 10:23
Yes we're talking about Linux.

With 1GB Fedora 13 64-bit says I have 999.4MB. I don't know whether this is any different to the 32-bit version on 1GB RAM - I haven't tested it.