Re: repeated failed open()'s results in lots of used memory [Was: [Fwd:

Andreas Dilger (adilger@turbolinux.com)
Wed, 1 Aug 2001 16:04:10 -0600 (MDT)


You write:
> We've been experiencing a problem where an errant process would run in a
> tight loop trying to create files in a directory where it did not have
> access. While this errant process was running, we'd notice all of the
> available memory shift from buffers/cache (or free) to used and stay
> that way while the process was running. vmstat also reports heavy in/out
> traffic on the swap, but swap consumption does not grow past a few dozen
> megabytes. The memory used by the process itself does not grow.
>
> Note that we increase the default values for certain FS parameters:
>
> echo '16384' >/proc/sys/fs/super-max
> echo '32768' >/proc/sys/fs/file-max
> echo '65535' > /proc/sys/fs/inode-max

You are probably creating negative dentries. Check /proc/slabinfo for
the number of dentries, and it will confirm this. I'm not sure why
that would cause swapping, but then again I haven't checked the policy
for shrinking the dentry cache recently, and there have been a number
of changes in that area lately.

Cheers, Andreas

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/