Date: Tue, 22 Apr 2003 08:32:33 -0400 From: Bill Moran <wmoran@potentialtech.com> To: Adam <blueeskimo@gmx.net> Cc: freebsd-questions@freebsd.org Subject: Re: Strange networking behaviour (memory leak?) Message-ID: <3EA53661.6010007@potentialtech.com> In-Reply-To: <20030422004530.CAAB.BLUEESKIMO@gmx.net> References: <20030422004530.CAAB.BLUEESKIMO@gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Adam wrote: > I've recently become very concious of possible memory leaks on my > FreeBSD box. While troubleshooting a particular memory leak, I came > across some very peculiar behaviour when copying files over the local > 100mbit network. > > When copying files over the network, the free memory on my FreeBSD box > drops at a rate of about 30mb every couple seconds. It eventually > bottoms out at about 500k free. > > If I kill the active transfer, the amount of free RAM is not affected. > However, if I delete the file that was being written to the FreeBSD box, > the free RAM instantaneously increases by about 400-450mb. Note that > this has only been tested on transfers of large files (>600mb). > > I've tested this behaviour both by downloading from my Windows computer > to the FreeBSD box (using lftp on FreeBSD), and by uploading from the > Windows computer to the FreeBSD machine via PureFTPd (SFTP behaves > similarly, but much slower since I get max 165k/s via SFTP). > > Is this behaviour expected? Is it normal? Yes and yes. I assume that you're looking at the output of top while you're doing this. FreeBSD is pretty smart about memory. In the top display you see active, inactive, cache, buffer, wired, and free memory. The memory that's actually free is really the sum of inactive, buffer, cache, and free. The free memory is free immediately, those other three can become free with very, very little effort on the part of the kernel, but if you call up the same application again and it's still in inactive memory, it'll start up quicker than if it has to reload it from disk. Free memory is wasted memory. -- Bill Moran Potential Technologies http://www.potentialtech.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EA53661.6010007>