diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2010-10-26 06:39:06 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-10-26 23:11:40 -0700 |
commit | bd890a0f53142e60e70e6cad8363738d607fbdb4 (patch) | |
tree | 72ca0e37a9d14c0dfc3456a710d9b432b56fbd81 /libglusterfs/src/inode.c | |
parent | c9c411b48aa0477cd44c18cbdf83d14389d27221 (diff) |
core: Use lru_limit as count for inode and dentry mempool
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1948 (For each subvolume started, glusterfs process takes up around 30-35MB more memory)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1948
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r-- | libglusterfs/src/inode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index 04e4560ed..57a3c35df 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -1047,14 +1047,18 @@ inode_table_new (size_t lru_limit, xlator_t *xl) new->hashsize = 14057; /* TODO: Random Number?? */ - new->inode_pool = mem_pool_new (inode_t, 204654); + /* In case FUSE is initing the inode table. */ + if (lru_limit == 0) + lru_limit = DEFAULT_INODE_MEMPOOL_ENTRIES; + + new->inode_pool = mem_pool_new (inode_t, lru_limit); if (!new->inode_pool) { GF_FREE (new); return NULL; } - new->dentry_pool = mem_pool_new (dentry_t, 204654); + new->dentry_pool = mem_pool_new (dentry_t, lru_limit); if (!new->dentry_pool) { GF_FREE (new); |