Memory problems in NFS client server

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Memory problems in NFS client server
# 1  
Old 05-02-2012
Memory problems in NFS client server

Hi all,

i have some doubts in a situation that i fail to get an answer in Google.

I have a solaris 10 nfs server and 5 centos 6.0 nfs clients.

The problem/situation is that in the clients the free memory is "disappearing" along the time (passing to used)..and it gets free if i umount the nfs mount point. I can see also that the speed that the memory is "disappearing" is related to the use of the nfs fs (3 of the 5 servers use the nfs fs more intensively and in those it disappears faster).

I m mounting with:
rw,vers=4,hard,rsize=32768,wsize=32768,noac

Kernel version:2.6.32-71.el6.x86_64 and 2.6.32-220.13.1.el6.x86_64 (i have updated in one server to check the behavior and its the same)

and:

rpm -aq | grep -i nfs
nfs-utils-1.2.2-7.el6.x86_64
nfs4-acl-tools-0.3.3-5.el6.x86_64
nfs-utils-lib-1.1.5-1.el6.x86_64

and in the updated server
nfs4-acl-tools-0.3.3-5.el6.x86_64
nfs-utils-lib-1.1.5-4.el6.x86_64
nfs-utils-1.2.3-15.el6.x86_64

By the way i m checking the memory with the free -m command in this line:
...
-/+ buffers/cache: 480 3286
...
(i did a umount/mount some time ago so now its not bad, but in couple of days it gets the opposite or worse..)


Can someone give me some lights about this behavior?

Thanks
# 2  
Old 05-02-2012
The clients are caching. They are supposed to.

Read this: Help! Linux ate my RAM!

also, try this command:

Code:
vmstat -s -S M | egrep 'mem|swap'


If the memory is in cache, you are fine.
# 3  
Old 05-02-2012
Hi mark54g,

Thanks in advance.

I don't think that is the case because i m considering free memory as free + plus buffers and cache.

for example:
free -m
total used free shared buffers cached
Mem: 3767 1684 2082 0 327 871
-/+ buffers/cache: 485 3281
Swap: 1999 0 1999

used memory is 485 and free 3281.

the picture now is good (because i did the umount/mount) lots of free memory (3281) but in a couple of days free memory will tend to 0. i never let it get to 0 because the memory is in "really" used state.

i can put a script in cron to umount and mount the nfs fs but i would like to know and correct this behavior if possible.

Can it be something like a nfs caching? i used the noac option to disable the file attribute caching and so the client as to go all the times to the server to check the status of the file

What do you think?

Thanks
# 4  
Old 05-02-2012
It's not the attribute caching, it is the data. When the problem occurs, you may want to see what is consuming the memory.

Have you run the command I specified?

Also, unmounting an nfs volume is usually a bad idea if traffic is going across.

Try this instead:

Code:
sync && echo 3 > /proc/sys/vm/drop_caches

If that fixes your memory issues, it is caching.
# 5  
Old 05-04-2012
regarding the umount of the nfs fs i stoped the server in LB first so no requests were being made when i did the "remount"

Output from a server with the nfs fs mounted for +-2 days
vmstat -s -S M | egrep 'mem|swap'
3766 M total memory
897 M used memory
237 M active memory
428 M inactive memory
2868 M free memory
199 M buffer memory
452 M swap cache
1999 M total swap
0 M used swap
1999 M free swap
0 pages swapped in
0 pages swapped out

Output from a server with the nfs fs mounted for +-6 days
vmstat -s -S M | egrep 'mem|swap'
3767 M total memory
1863 M used memory
355 M active memory
941 M inactive memory
1904 M free memory
197 M buffer memory
1080 M swap cache
1999 M total swap
0 M used swap
1999 M free swap
0 pages swapped in
0 pages swapped out

Other server with +-7 days with the nfs fs mounted
vmstat -s -S M | egrep 'mem|swap'
3767 M total memory
1830 M used memory
376 M active memory
888 M inactive memory
1936 M free memory
204 M buffer memory
1050 M swap cache
1999 M total swap
4 M used swap
1995 M free swap
532 pages swapped in
1285 pages swapped out


i can see an increase of inactive memory and swap cache and in this last one some swap activity.

Code:
sync && echo 3 > /proc/sys/vm/drop_caches

solved the issue, this means that it back to the normal state.

Before:
free -m
total used free shared buffers cached
Mem: 3767 1865 1902 0 197 1079
-/+ buffers/cache: 588 3178
Swap: 1999 0 1999


After:
free -m
total used free shared buffers cached
Mem: 3767 186 3580 0 4 21
-/+ buffers/cache: 160 3606
Swap: 1999 0 1999


I m confused, the free -m command in second line i was thinking the used field would be really used memory since free (in that line) is already a sum of free + buffers + cache (from the first line)

Can you give some lights? for example if a program requests memory and the free (2º line) is 0 what will happen?

And client caching in a nfs fs ins't dangerous?

thanks
# 6  
Old 05-04-2012
In the output of the commands I gave you, look to "Active Memory"

This is simply the memory being actively used by the OS and applications. If you dropped your cache, you did not get any free memory back. The memory was always available if you needed it.

Caching is not dangerous. Otherwise network traffic gets to be a burden.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris 10 NFS client cannot mount a share from a Windows server

I have a Solaris 10 server, I'm trying to mount a share from a Windows nfs server. If I add this entry (tst-walnut:/test_sap_nfs - /majid nfs - yes rw,soft) to my /etc/vfstab, then I can mount, but when I create a file by root:root, the file owner changes to... (1 Reply)
Discussion started by: Hiroshi
1 Replies

2. AIX

AIX NFS Server and NFS Client

Hi 2 ALL, try to run NFS Server in AIX 7.1 : 1. Step by step on NFS Server node mkdir /tmp/test chgrp staff /tmp/test chmod 775 /tmp/test-- create export directory (fs) mknfsexp -d /tmp/test -t ro exportfs -va show mount -e :/# exportfs -av exports: 1831-187 re-exported /tmp/test... (4 Replies)
Discussion started by: penchev
4 Replies

3. Red Hat

Unable to access NFS share on Solaris Server from Linux client

Hi, I am trying to access a NFS shared directory on Solaris 10 Server from a client which is RHEL 4 Server. On the NFS Server, in /etc/dfs/, I added following line to dfstab file. share -F nfs -o rw /var/share & then ran the following svcadm -v enable -r... (3 Replies)
Discussion started by: SunilB2011
3 Replies

4. Solaris

Can't access NFS Share on Solaris Server from a Linux Client

Hi, I am trying to access a NFS shared directory on Solaris 10 Server from a client which is RHEL 4 Server. On the NFS Server, in /etc/dfs/, I added following line to dfstab file. & then ran the following On the client machine, while running the mount command, I am... (0 Replies)
Discussion started by: SunilB2011
0 Replies

5. AIX

can not mount from aix client to linux nfs server

Hi, I am trying to mount a nfs folder from AIX client to Linux NFS Server, but I got the following error: # mount 128.127.11.121:/aix /to_be_del mount: 1831-010 server 128.127.11.121 not responding: RPC: 1832-018 Port mapper failure - RPC: 1832-008 Timed out mount: retrying... (1 Reply)
Discussion started by: victorcheung
1 Replies

6. Solaris

Solaris 9 as a nfs client -- centos as a nfs server.

Hello, I have a centos as nfs server, its name is centos_A. After I finish the setup of the nfs server, the other linux can access this nfs server immediately via /net/centos_A/* But, My solaris 9 can not access /net/centos_A/* immediately. I have to leave /net/centos_A, and wait for about... (1 Reply)
Discussion started by: bruceharbin
1 Replies

7. UNIX for Advanced & Expert Users

Determining IP address of NFS server on client

Hi. We use an Isilon cluster system to provide our NAS. The Isilon uses a round-robin DNS setup to spread mount requests across the many nodes of the cluster. When a node needs work, the filesystems that are mounted to it need to be moved to other nodes prior to shutting the node down. I... (2 Replies)
Discussion started by: rascalrick
2 Replies

8. Programming

tcp server listening, client connecting problems

hello everyone. I tried searching for something related to this, but I figured it was time to ask my own question. I am experiencing these problems using Ubuntu 7.04 I am starting up a TCP listener/server and once connected, will act as a communication/control link with a program on another... (3 Replies)
Discussion started by: pjwhite
3 Replies

9. Linux

NFS Server FC7 Solaris client problems!

Hi, my problem is that I am not able to grand the nfs directory on a Fedora 7 server to a standard solaris client. I always got the messages no permission. Important: No change on the client (Solaris) is possible! So I am not able to change the NFS Version on the client side to force the... (3 Replies)
Discussion started by: joerg
3 Replies

10. UNIX for Advanced & Expert Users

NFS server problems [merged]

I have a machine A NFS mounted on machine B I am doing a build from machine B on the MFS mounted dir of machine A but I keep getting the following: NFS server A not responding still trying. I go to machine A and can log onto machine A and everything seems fine. How do I go about finding... (6 Replies)
Discussion started by: brv
6 Replies
Login or Register to Ask a Question