LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-23-2005, 10:53 AM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
Memory Loss?


I have a Pentium M system running(Debian Sarge 3.1) with 1GB of RAM. I was checking the information of RAM detected on my system by giving the command:

debian# cat /proc/meminfo

and there is the output of that command:

Code:
debian:~/Scripts# cat /proc/meminfo
MemTotal:       906732 kB
MemFree:        685468 kB
Buffers:         10348 kB
Cached:         112796 kB
SwapCached:          0 kB
Active:         134856 kB
Inactive:        68664 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       906732 kB
LowFree:        685468 kB
SwapTotal:      995988 kB
SwapFree:       995988 kB
Dirty:             280 kB
Writeback:           0 kB
Mapped:         117092 kB
Slab:            10924 kB
Committed_AS:   183828 kB
PageTables:        944 kB
VmallocTotal:   122800 kB
VmallocUsed:      3324 kB
VmallocChunk:   119212 kB
In the first line of the output it says :
MemTotal: 906732 kB

which is around 900MB. Ideally this should be atleast around 1000MB

Does anyone knows why is this happening? My Video Memory is 16MB(I guess).


thanks

Last edited by kushalkoolwal; 09-23-2005 at 01:45 PM.
 
Old 09-24-2005, 12:12 PM   #2
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Anyone?
 
Old 09-24-2005, 07:29 PM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
http://www.linuxquestions.org/questi...ghlight=memory

This explains about memory usage.
Also, some RAM gets reserved - so is not available for you to use.

i.e. I have 512Mb and 256Mb cards installed - this should add up to 768Mb or 786,432kb total. However, when I do this:
Code:
[~]$ free
             total       used       free     shared    buffers     cached
Mem:        742860     724064      18796          0     134888     154976
-/+ buffers/cache:     434200     308660
Swap:      1012084       1024    1011060
See the difference?
 
Old 09-24-2005, 07:46 PM   #4
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
there is a kernel config option that has to be enabled to use more then something like 800 or 900 Mb I don't know about debian but I was running my gentoo system for a month before I noticed the missing ram. turned it on rebuilt the kernel and then my ram showed up.
 
Old 09-26-2005, 12:31 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
The kernel option works only in situation when your system has more than 1GB of RAM installed. The default kernel that comes with Debian can detect memory only upto 1GB. That was for RAM more than 1GB.

But in my case I have exactly 1GB of RAM and the detected RAM as I told before is around 900MB. I check the following link as suggested by one of the memeber but I could not find anything that answer my question.

In the man bootparam I found the following paragraph:
`mem=...'
The BIOS call defined in the PC specification that returns the amount
of installed memory was only designed to be able to report up to 64MB.
Linux uses this BIOS call at boot to determine how much memory is
installed. If you have more than 64MB of RAM installed, you can use
this boot arg to tell Linux how much memory you have. The value is in
decimal or hexadecimal (prefix 0x), and the suffixes `k' (times 1024)
or `M' (times 1048576) can be used. Here is a quote from Linus on
usage of the `mem=' parameter.

``The kernel will accept any `mem=xx' parameter you give it, and if it
turns out that you lied to it, it will crash horribly sooner or later.
The parameter indicates the highest addressable RAM address, so
`mem=0x1000000' means you have 16MB of memory, for example. For a 96MB
machine this would be `mem=0x6000000'.

NOTE NOTE NOTE: some machines might use the top of memory for BIOS
cacheing or whatever, so you might not actually have up to the full
96MB addressable. The reverse is also true: some chipsets will map the
physical memory that is covered by the BIOS area into the area just
past the top of memory, so the top-of-mem might actually be 96MB +
384kB for example. If you tell linux that it has more memory than it
actually does have, bad things will happen: maybe not at once, but
surely eventually.''

But that does not justify completely of such a high memory loss as in my case. I checked with 256MB and 512MB of RAM also, but everytime it will show 50-100MBs of less memory.

Anyone who has some vast experience in memory related matters?

Thanks

Last edited by kushalkoolwal; 09-26-2005 at 12:33 PM.
 
Old 09-26-2005, 05:42 PM   #6
Krugger
Member
 
Registered: Oct 2004
Posts: 229

Rep: Reputation: 30
You need to compile your kernel with high mem support. I had the same problem a while ago.
 
Old 09-28-2005, 11:07 AM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally posted by Krugger
You need to compile your kernel with high mem support. I had the same problem a while ago.
Actually we need to compile the kernel only when we have more than 1GB of memory. I have tried it on my system. I installed 2GB of memory and booted normally with the pre-compiled kernel and it detected only 1GB of memory as expected. Then I recompiled the kernel with High mem support option enabled and it started to detect more than 1GB memory.

But my problem is that I have 1GB of memory and even that does not get detected fully. It show 125-140MB of less memory. See my first message in the post.

Can anyone please help me? Can anyone reproduce the same problem on their debain system?

Thank you for your help.

Last edited by kushalkoolwal; 09-28-2005 at 11:22 AM.
 
Old 09-28-2005, 09:58 PM   #8
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Amazing that people keep telling you to recompile for high-mem support

Note in post #3 I have reproduced a similar effect for less than 1Gb RAM. I'm missing 43572k or about 5.4%

You're missing 141844k out of 1048576k or about 13.5%

(someone check the math?)

You're right, it would be nice to see if other systems with 1Gb RAM show a similar total RAM drop. It would suggest that this is legit.
 
Old 09-30-2005, 04:09 PM   #9
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Yes Simon, you are right. I am missing about 141MB of memory and that was the reason why I was so worried about getting my RAM back.

Can someone please check on their system if they are getting the same problem of memory(RAM) loss?


Thanks
 
Old 09-30-2005, 10:52 PM   #10
victorh
Member
 
Registered: Jul 2005
Location: La Paz, Bolivia
Distribution: Debian Sarge - Sid, Slackware, Gentoo, openSuse, Fedora, Ubuntu, Mandriva
Posts: 241

Rep: Reputation: 30
Hi, I'm running Debian Sid with kernel 2.6.12-1-686, and I have 1 GB of RAM, I'll post you the same command that you did

Code:
victor@debian:~$ cat /proc/meminfo

MemTotal:      1035744 kB
MemFree:        451436 kB
Buffers:         32236 kB
Cached:         329760 kB
SwapCached:          0 kB
Active:         335080 kB
Inactive:       207388 kB
HighTotal:      130304 kB
HighFree:          120 kB
LowTotal:       905440 kB
LowFree:        451316 kB
SwapTotal:     2008076 kB
SwapFree:      2008076 kB
Dirty:             756 kB
Writeback:           0 kB
Mapped:         261364 kB
Slab:            26536 kB
CommitLimit:   2525948 kB
Committed_AS:   600992 kB
PageTables:       1928 kB
VmallocTotal:   114680 kB
VmallocUsed:     25800 kB
VmallocChunk:    87540 kB
As you can see, Debian has recognized 1035744 KB, that is 1011.47 MB, It was supposed to be 1024 MB but the difference 12.1 MB is just a lost of 1.2 %.

If you check my meminfo you'll notice that you don't have high memory available, this is the problem!

When I was using the kernel 2.4.29 in Debian Sarge I have the same problem, Sarge just recognized around 900 MB, and in the logs I found that the high mem was not properly configured.

Since I change to kernel 2.6.* the problem has gone!, I guess that the kernels 2.6.* have been compiled with the high mem support.

Hope this can help to solve your problem.

Last edited by victorh; 10-01-2005 at 10:30 AM.
 
Old 10-03-2005, 01:01 PM   #11
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Thanks for the information. Just to make sure, are you talking about the High Memory support which is under the 'Processor Type and Features' option in kernel configuration . I am using 2.6.8 kernel version. There are three option: off, 4GB, 64GB. Are you talking about this?

Also, you mentioned about logs where you found that High memory support was not there. Which log file are you tallking about.

If yes, then I will try it and let you know. If no, which option are you talking about.

as a matter of fact, I know this won't solve my problem because the other day I tested with 256MB and 512MB of RAM also. Again I had some memory drop.

Simmon, do you have any further suggestion?


Kushal

Last edited by kushalkoolwal; 10-03-2005 at 01:17 PM.
 
Old 10-03-2005, 01:56 PM   #12
samael26
Member
 
Registered: Oct 2004
Location: France, Provence
Distribution: Debian
Posts: 848

Rep: Reputation: 30
I am like you : memory loss. 1 gig installed, this is the output :

MemTotal: 970720 kB
MemFree: 180584 kB
Buffers: 76220 kB
Cached: 515388 kB
SwapCached: 0 kB
Active: 461628 kB
Inactive: 286136 kB
HighTotal: 64768 kB
HighFree: 140 kB
LowTotal: 905952 kB
LowFree: 180444 kB
SwapTotal: 1951856 kB
SwapFree: 1951856 kB
Dirty: 644 kB
Writeback: 0 kB
Mapped: 200588 kB
Slab: 23624 kB
CommitLimit: 2437216 kB
Committed_AS: 486072 kB
PageTables: 1208 kB
VmallocTotal: 114680 kB
VmallocUsed: 10424 kB
VmallocChunk: 102900 kB
 
Old 10-03-2005, 02:32 PM   #13
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
First off, a happy birthday to victorh.

Secondly,

Kernels without CONFIG_HIGHMEM actually support only up to 896 MB memory. This is because 128 MB of the mapped memory regions (virtual memory) is reserved for information about the memory mapping, page tables, and the like.

If you want more than 896MB to appear to processes, you must enabled CONFIG_HIGHMEM.

Read the following for details: http://kerneltrap.org/node/2450
 
Old 10-03-2005, 04:27 PM   #14
victorh
Member
 
Registered: Jul 2005
Location: La Paz, Bolivia
Distribution: Debian Sarge - Sid, Slackware, Gentoo, openSuse, Fedora, Ubuntu, Mandriva
Posts: 241

Rep: Reputation: 30
Thanks Matir! I didn't notice that nice cake below my name, what a nice surprise from LQ, thanks again Matir and thanks LQ!

To the matter, I've some points so you can consider them Kushal:

- I've used kernel 2.6.8, 2.6.10 and now 2.6.12 all of them compiled by Debian team, all of them came with High Mem Support set. If you are using one of this kernels they have this option set. Even more, I've compiled some kernels, 2.6.11 and recently 2.6.13 for my Gentoo system. This is the option:

High Memory Support
1. off (NOHIGHMEM)
> 2. 4GB (HIGHMEM4G)
3. 64GB (HIGHMEM64G)

This option (is already preselected to 4GB so if you want to compile your own kernel you don't have to change this option at all. This kernels also work well. Since you're running kernel 2.6.8 it's very strange that this option is not set....

- Sorry for not being more especific, when I was refering to a log file, I was referring to the syslog file located in /var/log, in this file you can search all the messages of the kernel at booting, it's here that I discovered that I don't have high mem support when I was using kernel 2.4.29 in Debian Sarge, also you can access this messages typing dmesg

- If it's not high mem support (which is I suspect) then you'll find useful information there, just to compare here is what it said in my case:

BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003ff40000 (usable)
BIOS-e820: 000000003ff40000 - 000000003ff50000 (ACPI data)
BIOS-e820: 000000003ff50000 - 0000000040000000 (ACPI NVS)
127MB HIGHMEM available.
896MB LOWMEM available.
On node 0 totalpages: 261952
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 225280 pages, LIFO batch:16
HighMem zone: 32576 pages, LIFO batch:7

- It'll be nice if you can post the part referring to memory for your system so we can rule out this option and maybe start thinking in a hardware problem...

Anyway, the reading recommended by Matir is very interesting, thanks Matir, it's fascinating you never stop learning in Linux...
 
Old 10-03-2005, 04:43 PM   #15
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
As an FYI, even with only 1 GB, I run my system with CONFIG_HIGHMEM4G, and have no noticable slowdown. I can compile x.org and do normal activities with no swapping either.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Memory loss during copies across mounted partition ramram Linux - Software 1 09-08-2005 12:36 PM
Memory Loss--Big Time cabinetcrafter Mandriva 0 04-21-2004 06:07 PM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM
At a loss... please help antihero Linux - General 2 08-23-2001 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:01 PM.

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