Ramesh ha scritto:
Hi I have a server running samba process and there
are about 70 samba users connected at a time. The system has 4Gb of
memory and it seems each samba process is utilizing only 3352Kb of
memory.



When I run the command



pmap -d (pid of samba)



It gives as:



b7ffa000       4 rw-s- 0000000000000000 0fd:00003 messages.tdb

bfe46000    1768 rw--- 00000000bfe46000 000:00000   [ stack ]

ffffe000       4 r-x-- 0000000000000000 000:00000   [ anon ]

mapped: 33384K    writeable/private: 3352K    shared: 20504K







But when I run the top command, it results as below:



Tasks: 163 total,   1 running, 162 sleeping,   0 stopped,   0 zombie

Cpu(s):  0.9% us,  4.9% sy,  0.0% ni, 93.3% id,  0.8% wa,  0.2% hi,  0.0% si

Mem:   3895444k total,  3163192k used,   732252k free,   352344k buffers

Swap:  2097144k total,      208k used,  2096936k free,  2487636k cached

Hi,
   here's a quick explanation of the "top" fields:

Mem total = the amount of physical RAM you have available.

Mem used = total amount of RAM the system is using. What you want here is a number as close to Mem total as possible, unless you find it useful to fill your ram banks with costly unused chips... :-)

Mem free = this is of course total - used, so you want here a number as low as possible.

Buffers = amount of RAM used for various types of system buffers (e.g. network buffers). This amount varies with the workload. For example if you are copying a disk image over the network you'll have a large value here.

Cached = amount of RAM used for disk cache. This value varies with the current workload too. It is used to avoid reading directly from disk something you have already read once. Roughly speaking, if a client requests a 10M file, it's first read from disk but then it remains in memory so that if another client (or the same one) requests the same file, the system doesn't have to read it again from the (very slow) disk, but can serve it directly from (very fast) RAM. The disk cache is not allocated by the applications, it is instead managed directly by the kernel, so if an app needs more ram, the disk cache is sacrified.

Thus you can count buffers and disk cache as free memory (i.e. not allocated by apps).

HTH

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to