Re: VmSiZE to physical memory mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- kernel learner <kernellearner@xxxxxxxxx> escreveu:

> Hi all!
> 
> Suppose five processes are there.
> A, B, C, D , E.
> These processes have some shared libraries also.
> 
> NOw,
> 
> cat /proc/meminfo      gives me the following output.
> total:    used:    free:  shared: buffers:  cached:
> Mem:  131186688 117026816 14159872        0  1077248 78221312
> Swap:        0        0        0
> MemTotal:       128112 kB
> MemFree:         13828 kB
> MemShared:           0 kB
> Buffers:          1052 kB
> Cached:          76388 kB
> SwapCached:          0 kB
> Active:          27448 kB
> Inactive:        77172 kB
> HighTotal:           0 kB
> HighFree:            0 kB
> LowTotal:       128112 kB
> LowFree:         13828 kB
> SwapTotal:           0 kB
> SwapFree:            0 kB
> 
> 
> I think here MemTotal = amount of physical memory + swap space
> present =
> amount of physical memory present

IMHO, MemTotal is the size of RAM memory. It is not related to swap
space. SwapTotal and SwapFree are fields related to swap space.

Take a look under your kernel source directory the file
Documention/filesystem/proc.txt for more info.

> MemTotal - MemFree = amount of physical memory + swap space being
> used =
> amount of physical memory used (becoz swap space is 0 in this case)
Again, MemTotal and MemFree are related to RAM memory (main memory) and
not swap space.

Have you checked if you have swap partition?

Type 'cat /proc/swaps' on your terminal to verify if you have a swap
partition.

BR,

Mauricio Lin.

> 
> and "A,B,C,D,E" are the only prcoesses running on the system
> 
> What parameter should i use for these five processes such that
> 
> parameter(A) + parameter(A) + parameter(A) + parameter(A) +
> parameter(A) =
> (MemTotal - MemFree)
> 
> Earlier i thought i can use VmSize for all the processes.
> but shared library size get added to VmSize for all the processes
> individually(even though its physically loaded only once). so i cant
> use
> that.
> Then i thought i will subtract VmLib from that but i dont what is the
> size
> of individual shared libraries.
> 
> How should i proceed with this? Can nyone help?
> 
> Regards
> 



	
	
		
____________________________________________________


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux