LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-20-2011, 12:26 PM   #1
l0rddarkf0rce
Member
 
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149

Rep: Reputation: 33
Total memory being reported incorrectly


Hello all, I'm running 13.1 on a Dell Latitude D630 with 4GB of RAM. My problem is that Slackware doesn't seem to see all of the available memory. Here are the #s being reported (just including pertinent #s rather than all output)...

Code:
free -m

   total: 3546
   used : 1003
   free : 2543
Code:
top
   Mem: 3631764k total, 1020544k used, 2611220k free
Code:
SuperKaramba
   Total Memory: 3547 MB
Code:
demicode -t memory

   Physical Memory Array
      Maximum Capacity: 4 GB

   Memory Device
      Size: 2048 MB

   Memory Device
      Size: 2048 MB
By reading the output of demicode I can see that the BIOS is reporting the correct amount available, but for some reason the rest of the applications seem to only see 3.5 GB rather than the whole 4GB that are availble. Any ideas on why this is happening and what can be done to resolve it will be appreciated.
 
Old 01-20-2011, 12:36 PM   #2
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Try either a PAE kernel or a x86_64 kernel.
 
1 members found this post helpful.
Old 01-20-2011, 12:38 PM   #3
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
If you run Slackware (32 bits), those results are absolutely normal, because it use HIGHMEM4G.

If you want to use the whole memory, you should build (and use) a kernel using HIGHMEM64G, or use a x86_64 kernel, like our friend guanx said, or to switch entirely to Slackware64.

Last edited by Darth Vader; 01-20-2011 at 12:49 PM.
 
1 members found this post helpful.
Old 01-20-2011, 01:11 PM   #4
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,504

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Do you perhaps have some system memory that is claimed by the video card?
 
1 members found this post helpful.
Old 01-20-2011, 02:07 PM   #5
X3J11
LQ Newbie
 
Registered: Jun 2009
Location: Ontario, Canada.
Distribution: Slackware, Mint, Arch, Raspbian
Posts: 13

Rep: Reputation: 5
This is normal behaviour. When using the standard addressing mode of 32-bit processors, the address space is limited to 4GB (2^32 bits). Within this the kernel maps your physical RAM as well as any other memory mappable devices (such as the framebuffer of your video adapter). Additional memory beyond what can fit within this 4GB range is ignored.

One can circumvent this by using a kernel with Physical Address Extension (PAE) support. Processes continue to see only the 4GB address space, but the kernel itself can use up to 64GB (2^36 bits), mapping different ranges for each process.

The option to set when building a PAE-enabled kernel is "Processor Type and Features -> High Memory Support -> 64GB". You should check that your processor is capable of using PAE. This feature will be listed as 'pae' in the flags line from /proc/cpuinfo.

You could also switch to Slackware64, as mentioned, which takes advantage of the 64-bit addressing mode of modern processors.

http://en.wikipedia.org/wiki/32-bit
http://en.wikipedia.org/wiki/64-bit
http://en.wikipedia.org/wiki/Protected_mode
http://en.wikipedia.org/wiki/Physical_Address_Extension
 
1 members found this post helpful.
Old 01-20-2011, 02:54 PM   #6
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 volkerdi View Post
Do you perhaps have some system memory that is claimed by the video card?
I would have to agree with this. Usually 3.7 GB = memory reserved by other programs and 3.3 GB = no PAE, just an observation. Also note that in RAM manufacturer terms 4 GB = 4 000 000 000 bytes, so that may also account for it. You may want to check /proc/iomem for reserved RAM.
 
Old 01-20-2011, 03:20 PM   #7
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
This user http://lkml.indiana.edu/hypermail/li...04.3/3436.html is also having ~3550 MB RAM from a Intel T7700 / 4GB system. T7700 also happens to be the best CPU supported by the OP's Dell Latitude D630. I suspect that the other user is using a similar machine.

BTW, Main memory manufactures usually use 1024 instead of 1000 as 1k.

Last edited by guanx; 01-20-2011 at 03:21 PM.
 
1 members found this post helpful.
Old 01-20-2011, 03:47 PM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by H_TeXMeX_H View Post
Also note that in RAM manufacturer terms 4 GB = 4 000 000 000 bytes, so that may also account for it.
I know it's common for storage manufacturers to play that game with hard-disk capacities and so on, but I've never seen anyone use a Gigabyte of anything other than 2^30 bytes when referring to system memory (RAM).

I'm not sure about chip based storage systems such as ssd and usb-sticks though.

Last edited by GazL; 01-20-2011 at 03:50 PM.
 
Old 01-20-2011, 05:56 PM   #9
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
same here

my slackware64-13.1 system even when adding the memory reserved for video by the BIOS does not get anywhere near 2^30 * 4

So Slack 64 will not solve your problem
john

Last edited by AlleyTrotter; 01-20-2011 at 06:02 PM.
 
Old 01-20-2011, 06:20 PM   #10
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by AlleyTrotter View Post
my slackware64-13.1 system even when adding the memory reserved for video by the BIOS does not get anywhere near 2^30 * 4

So Slack 64 will not solve your problem
john


Code:
gazl@slack:~$ uname -a
Linux slack 2.6.35.10 #2 SMP Thu Jan 6 19:06:19 CST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU     E7400  @ 2.80GHz GenuineIntel GNU/Linux
gazl@slack:~$ free -b
             total       used       free     shared    buffers     cached
Mem:    4149428224  428998656 3720429568          0   36601856  196907008
-/+ buffers/cache:  195489792 3953938432
Swap:            0          0          0
gazl@slack:~$ bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 

(2^30 * 4 ) - 4149428224
145539072
That's only 138MB shy of the 4GB.
 
Old 01-20-2011, 11:43 PM   #11
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
I'm pretty close to the full 4G myself:

Code:
# uname -a
Linux furd 2.6.33.4 #2 SMP Tue Sep 21 17:28:38 CDT 2010 x86_64 AMD Athlon(tm) II X4 635 Processor AuthenticAMD GNU/Linux

# free -b
             total       used       free     shared    buffers     cached
Mem:    4150456320 4099387392   51068928          0 2239926272  779100160
-/+ buffers/cache: 1080360960 3070095360
Swap:   2039848960    1572864 2038276096
 
Old 01-21-2011, 05:32 AM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Code:
bash-4.1$ uname -a
Linux SlackB 2.6.33.4 #2 SMP Tue Sep 21 17:28:38 CDT 2010 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ AuthenticAMD GNU/Linux
bash-4.1$ free -b
             total       used       free     shared    buffers     cached
Mem:    3887067136 1187000320 2700066816          0   66924544  646656000
-/+ buffers/cache:  473419776 3413647360
Swap:   1044570112          0 1044570112
That's 4 GB RAM with 256 MB shared video memory.
 
Old 01-21-2011, 07:36 AM   #13
l0rddarkf0rce
Member
 
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149

Original Poster
Rep: Reputation: 33
Thumbs up

Quote:
Originally Posted by Darth Vader View Post
If you run Slackware (32 bits), those results are absolutely normal, because it use HIGHMEM4G.

If you want to use the whole memory, you should build (and use) a kernel using HIGHMEM64G, or use a x86_64 kernel, like our friend guanx said, or to switch entirely to Slackware64.
As Darth Vader suggested enableing HIGHMEM64G and recompiling the kernel did the trick. Thanks Darth! I also could had tried Slack64, but I have toooooooo many 32-bit apps that may make it a pain in the rear to get running. If I recall correctly Alien Bob has instructions on how to create a hybrid 64/32 box, but for now that's more work than I have time for. At some point, when I can spare a few cycles, I guess I can give that a try, but for now I'm a happy Slacker.

Thanks to all!
 
Old 01-21-2011, 07:43 AM   #14
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
uname -a
Linux retired 2.6.37 #4 SMP Fri Jan 7 21:59:55 EST 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ AuthenticAMD GNU/Linux

free -b
total used free shared buffers cached
Mem: 4017254400 2767958016 1249296384 0 93769728 1806434304
-/+ buffers/cache: 867753984 3149500416
Swap: 4301783040 0 4301783040

free -m
total used free shared buffers cached
Mem: 3831 2639 1191 0 89 1722
-/+ buffers/cache: 827 3003
Swap: 4102 0 4102

bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
(2^30 * 4 ) - 4017254400
277712896

thats looks like 256M for video
never looked at free using -b bytes before
Everything does come very close to adding up
Thanks for the lesson

john
 
Old 01-21-2011, 08:26 AM   #15
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, V.N.Gaia, Portugal
Distribution: Slackware
Posts: 528

Rep: Reputation: 272Reputation: 272Reputation: 272
Quote:
Originally Posted by AlleyTrotter View Post
my slackware64-13.1 system even when adding the memory reserved for video by the BIOS does not get anywhere near 2^30 * 4

So Slack 64 will not solve your problem
john
That's not true.

Code:
root@vm-server:~# uname -a
Linux vm-server 2.6.33.4 #3 SMP Wed May 12 23:13:09 CDT 2010 x86_64 AMD Phenom(tm) II X4 965 Processor AuthenticAMD GNU/Linux
root@vm-server:~# free -m
             total       used       free     shared    buffers     cached
Mem:          7952       6141       1811          0        231       4005
-/+ buffers/cache:       1904       6048
Swap:         3906          0       3905
EDIT: ooops, misread your post (sorry)

Last edited by Slax-Dude; 01-21-2011 at 08:29 AM.
 
  


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
memory less reported rjnlinux Linux - Hardware 16 03-02-2010 10:33 AM
Hard drive size incorrectly reported after clone Bill Gatz Linux - Hardware 3 05-27-2009 09:45 PM
total size of segments reported by Readelf/Objdump doesn't match symbol table sizes quartermaster Linux - Software 1 08-11-2006 01:31 PM
Disk dimensions reported incorrectly - Slack 9.1, Thinkpad 380D BigBadPenguin Linux - Laptop and Netbook 5 02-19-2006 02:26 PM
Disk Free space being incorrectly reported NiallC Linux - General 2 10-02-2004 05:06 PM

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

All times are GMT -5. The time now is 08:58 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