[Nfs-ganesha-devel] Change in ffilz/nfs-ganesha[next]: Move put_ref() up to fsal_readdir

2016-10-05 Thread GerritHub
>From Daniel Gryniewicz :

Daniel Gryniewicz has uploaded a new change for review.

  https://review.gerrithub.io/297243

Change subject: Move put_ref() up to fsal_readdir
..

Move put_ref() up to fsal_readdir

The object passed to the readdir callback is refcounted by MDCACHE.
Previously, this ref was put by MDCACHE as well.  However, an uncached
FSAL doing it's own refcounting needs to have this ref put as well, so
move that put_ref() up into fsal_readdir().

Change-Id: I506cb30df7c7864ca58f16acda200581781f7f6e
Signed-off-by: Daniel Gryniewicz 
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c
M src/FSAL/fsal_helper.c
2 files changed, 18 insertions(+), 7 deletions(-)


  git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha 
refs/changes/43/297243/1
-- 
To view, visit https://review.gerrithub.io/297243
To unsubscribe, visit https://review.gerrithub.io/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I506cb30df7c7864ca58f16acda200581781f7f6e
Gerrit-PatchSet: 1
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Owner: Daniel Gryniewicz 

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


Re: [Nfs-ganesha-devel] is it possible to limit the number of cached FDs?

2016-10-05 Thread Malahal Naineni
I missed the group list in my last reply, here it is!

The max number of files that ganesha (or any process) can open is
1024*1024 (max on RHEL based distros at least). This can be controlled
by NOFILE parameter. By adding "NOFILE=100" into
/etc/sysconfig/ganesha and restarting ganesha, you can achieve what
you are trying to do. Please note that 100 is a too small value for
any non-trivial environments.

This brings up the thin documentation we have. Please add this to wiki
(we will have to turn wiki ino documentation in the source code
someday)

Regards, Malahal.

On Wed, Oct 5, 2016 at 9:31 AM, Frank Filz  wrote:
>> If I understand correctly, enabling fd caching caches the open fds and
> does
>> not close it until the belonging cache inode is evicted, which is quite
>> beneficial to NFSv3 protocol that may open/close on every read/write
>> without fd caching. (question: are there any chance that fds are closed?)
>>
>> Now, I want to limit the number of fds like, to 100.
>>
>> Is it possible to do this directly with some settings?
>> or is there some workaround to emulate that?
>>
>> I am seeing the wiki page and FD_*_Percent parameters may be what I am
>> looking for.
>> But I have no clear conclusion yet.
>>
>> https://github.com/nfs-ganesha/nfs-ganesha/wiki/CacheInodeParams
>
> Yes, those FD parameters will manage the number of open fds. I'm not sure it
> prevents opening, but will apply back pressure to close fds above the high
> water mark.
>
> This is an area Ganesha really needs improvement, and 2.4.0 actually
> increases the number of fd opened since one is opened for every NFS v4 open
> and lock stateid, and for each NLM (NFS v3) lock and share owner (though
> only FSAL_VFS and FSAL_GPFS use actual "file descriptors" as returned by the
> open system call. FSAL_GLUSTER and FSAL_CEPH use file descriptor analogs.
>
> ulimit -n can also set a hard limit (though note that Ganesha does use some
> file descriptors for the log file and such).
>
> Frank
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Nfs-ganesha-devel mailing list
> Nfs-ganesha-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel