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 Why could the system be utilizing such high memory ? Any ideas ?? By the way, the server is not running other processes.. The samba version running in it is 3.0.33-0.17 I am confused what could be going wrong....
On Wed, Nov 11, 2009 at 3:53 PM, Ramesh <cfmx07 at yahoo.com> wrote:> 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 > > > > > > Why could the system be utilizing such high memory ? Any ideas ?? > > > > By the way, the server is not running other processes.. > > > > The samba version running in it is 3.0.33-0.17 > >This is most likely disk cache Post the output of free -m John
When I run free -m, then it outputs as below: [root at localhost ~]# free -m ???????????? total?????? used?????? free???? shared??? buffers???? cached Mem:????????? 3804?????? 2889??????? 914????????? 0??????? 357?????? 2210 -/+ buffers/cache:??????? 321?????? 3482 Swap:???????? 2047????????? 0?????? 2047 --- On Wed, 11/11/09, John Drescher <drescherjm at gmail.com> wrote: From: John Drescher <drescherjm at gmail.com> Subject: Re: [Samba] high memory utilzation To: "Ramesh" <cfmx07 at yahoo.com> Cc: samba at lists.samba.org Date: Wednesday, November 11, 2009, 4:11 PM On Wed, Nov 11, 2009 at 3:53 PM, Ramesh <cfmx07 at yahoo.com> wrote:> 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 > > > > > > Why could the system be utilizing such high memory ? Any ideas ?? > > > > By the way, the server is not running other processes.. > > > > The samba version running in it is 3.0.33-0.17 > >This is most likely disk cache Post the output of free -m John
On Wed, Nov 11, 2009 at 4:17 PM, Ramesh <cfmx07 at yahoo.com> wrote:> When I run free -m, > > then it outputs as below: > > [root at localhost ~]# free -m > total used free shared buffers cached > Mem: 3804 2889 914 0 357 2210 > -/+ buffers/cache: 321 3482 > Swap: 2047 0 2047 > >This shows you have only 321 MiB being used by applications. With 3482 MiB free. John
Thank you for the reply. However I have a question... why is it says I have used 2889 out of total 3804 memory and only 914Mb is free ? I am a bit confused... ? ?? ?????? ? ? ? total?????????? used?????? free???? shared??? buffers???? cached Mem:????????? 3804?????? 2889??????? 914????????? 0??????? 357?????? 2210 --- On Wed, 11/11/09, John Drescher <drescherjm at gmail.com> wrote: From: John Drescher <drescherjm at gmail.com> Subject: Re: [Samba] high memory utilzation To: "Ramesh" <cfmx07 at yahoo.com>, "samba" <samba at lists.samba.org> Date: Wednesday, November 11, 2009, 5:27 PM On Wed, Nov 11, 2009 at 4:17 PM, Ramesh <cfmx07 at yahoo.com> wrote: When I run free -m, then it outputs as below: [root at localhost ~]# free -m ??????????? ? ? ? total?????????? used?????? free???? shared??? buffers???? cached Mem:????????? 3804?????? 2889??????? 914????????? 0??????? 357?????? 2210 -/+ buffers/cache:??????? 321?????? 3482 Swap:???????? 2047????????? 0????? ? ?? 2047 This shows you have only 321 MiB being used by applications. With 3482 MiB free. John
---------- Forwarded message ---------- From: John Drescher <drescherjm at gmail.com> Date: Wed, Nov 11, 2009 at 5:44 PM Subject: Re: [Samba] high memory utilzation To: Ramesh <cfmx07 at yahoo.com> On Wed, Nov 11, 2009 at 5:41 PM, Ramesh <cfmx07 at yahoo.com> wrote:> > Thank you for the reply. However I have a question... > > why is it says I have used 2889 out of total 3804 memory and only 914Mb is > free ? I am a bit confused... > > > total used free shared buffers > cached > Mem: 3804 2889 914 0 357 2210 > > > >That is counting disk cache and disk buffers. These disk cache and buffers will be released when an application needs memory so its not really used memory. To avoid confusion over this always read only the second line of free. This is the true memory available. John -- John M. Drescher
The trick here is to look at the 2nd line of numbers from free. used free -/+ buffers/cache: 321 3482 This is what the system memory use looks like if you ignore the cache and buffers. -- David On Wed, Nov 11, 2009 at 5:44 PM, John Drescher <drescherjm at gmail.com> wrote:> ---------- Forwarded message ---------- > From: John Drescher <drescherjm at gmail.com> > Date: Wed, Nov 11, 2009 at 5:44 PM > Subject: Re: [Samba] high memory utilzation > To: Ramesh <cfmx07 at yahoo.com> > > > > > On Wed, Nov 11, 2009 at 5:41 PM, Ramesh <cfmx07 at yahoo.com> wrote: > > > > > Thank you for the reply. However I have a question... > > > > why is it says I have used 2889 out of total 3804 memory and only 914Mb > is > > free ? I am a bit confused... > > > > > > total used free shared buffers > > cached > > Mem: 3804 2889 914 0 357 2210 > > > > > > > > > That is counting disk cache and disk buffers. These disk cache and buffers > will be released when an application needs memory so its not really used > memory. To avoid confusion over this always read only the second line of > free. This is the true memory available. > > John > > > > -- > John M. Drescher > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
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