Mombu the GNU Linux Forum

Go Back   Mombu the GNU Linux Forum > GNU_Linux > question about memory usage
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 2nd July 01:24
eric
External User
 
Posts: 1
Default question about memory usage



I have 2 systems both running mandriva 2008.1 and 2.6.24.7 kernels
One system has 4Gig and the other has 3 gig of ram installed.
I noticed that on the 3 gig 44% is disk cache and 54% is app Data
while on the 4gig machine Disk cache is 15%, disk buffers 12% and app data
34%. I got this info from running kinfocenter. It seems odd to me that on
the 4gig machine that 37% memory isnt even used. while on the 3 gig machine
there is almost no buffer space and a much larger disk cache.
Is this configurable? I had 4gig in the 3 gig machine for awhile (till a
dimm failed) and had almost the same figures as i have now, but disk cache
actually grew a bit making the disparity even more-so.
Can anyone explain this? I would think the percentages would be fairly close
and i would expect to see less disk cache and at least a fair bit of buffer
space on the 3 gig machine, and a lot more disk cache on the 4 gig machine.
Here's a summary snapshot i just took:
Installed DRAM 3gig 4gig
Free Phys Mem <1% (~19meg free) 37%
Disk Cache 44% 15%
Disk Buffers none 12%
Application Data 54% 33%
Thanks
Eric
  Reply With Quote


 


2 3rd July 22:08
aragorn
External User
 
Posts: 1
Default question about memory usage



That's because you're using a 32-bit kernel without PAE support. PCI
equipment requires a memory address for the kernel to be able to access it,
and a memory address cannot be assigned to both a PCI device and a RAM
location. Considering that 4 GB is the upper RAM limit for 32-bit systems,
the PCI addresses are assigned downward on from that 4 GB upper RAM limit.

This is known as "the PCI memory hole" and can only be circumvented by
running a PAE-enabled kernel - i.e. a kernel built with /HIGHMEM_64/ - or
by running a 64-bit kernel, provided that you're using 64-bit hardware.

The lower percentage should therefore also only be seen as that, i.e. a
percentage, and thus an amount of RAM relative to the total amount of RAM
in the machine. This total amount of RAM in the machine may vary between
kernel versions as some kernels report the amount of RAM installed as seen
by the BIOS, while other kernels only report the maximum amount of RAM they
can access on that same machine.


Buffering and cache are assigned dynamically by the kernel, depending on the
load and the needs of the machine, and somewhat depend on the chosen
filesystem type. If the kernel decides that you need more room for
caching/buffering, it will use up more free memory and/or swap out some of
the used memory to disk.


That's because the kernel may find that with less RAM in the machine,
performance is benefitted more by increasing disk cache. Like I said, this
is highly variable and dynamic. There is no pre-set value for disk caching
and buffering. The kernel assigns memory to cache and buffering as it sees
fit for the moment.


I think I just have. ;-)

--
*Aragorn*
(registered GNU/Linux user #223157)
  Reply With Quote


 


3 3rd July 22:08
eric
External User
 
Posts: 1
Default question about memory usage


No, I'm not running 32 bit, i am x86_64 on both systems, I should have said
that to begin with. Also, even if this was 32 bit the situation has nothing
to do with the pci/mmio space. All of ram is available and usable on both
pc's, its just that its being used quite a bit differently between the 2
machines, and in one case a lot of ram is sitting idle/unused. Maybe its
just that there's not enough demand to use the extra memory. The other
thing that i wondered about was why "Disk Buffers" were so small on the 3
gig machine at 22mb. Again, maybe there just isnt the demand.
Thanks
Eric
Eric
  Reply With Quote
4 3rd July 22:08
aragorn
External User
 
Posts: 1
Default question about memory usage


You've just answered your own questions. ;-)

--
*Aragorn*
(registered GNU/Linux user #223157)
  Reply With Quote
Reply


Thread Tools
Display Modes




666