Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jan 2005 12:06:41 +0000 (GMT)
From:      Robert Watson <rwatson@freebsd.org>
To:        Phillip Salzman <phill@sysctl.net>
Cc:        stable@freebsd.org
Subject:   Re: Very large directory
Message-ID:  <Pine.NEB.3.96L.1050121120414.92514C-100000@fledge.watson.org>
In-Reply-To: <00b001c4fea0$7533d490$6745a8c0@MESE>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Jan 2005, Phillip Salzman wrote:

> I have a pair of servers that act as SMTP/AV gateways.  It seems that
> even though we've told the AV software not to store messages, it is
> anyway. 
> 
> They've been running for a little while now - and recently we've noticed
> a lot of disk space disappearing.  Shortly after that, a simple du into
> our /var/spool returned a not so nice error: 
> 
> 	du: fts_read: Cannot allocate memory
> 
> No matter what command I run on that directory, I just don't seem to
> have enough available resources to show the files let alone delete them
> (echo *, ls, find, rm -rf, etc.) 
> 
> I'm hoping someone else here might have a suggestion as to what I can do
> to fix this. 

fts(3) is quite memory intensive--more though than strictly necessary for
the functionality required by du(1).  du is running into an administrative
memory resource limit.  Depending on the shell and login.conf
configuration you're using, you may need to use the limits(1) command,
limit(1), or tweak the user's class settings.  I run into this on my boxes
with 1,000,000 files or so in a directory, or with large directory trees
(i.e., 7,000,000 files).

Robert N M Watson




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1050121120414.92514C-100000>