From owner-freebsd-questions@FreeBSD.ORG Wed Dec 14 00:23:27 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3992106566B for ; Wed, 14 Dec 2011 00:23:27 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 345C08FC0A for ; Wed, 14 Dec 2011 00:23:26 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so462655wgb.31 for ; Tue, 13 Dec 2011 16:23:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=mIiFA4P5EGpLrpCswepj7FUe8S/p2bfVwnhwpD3pyvc=; b=AJalLbG7n5F0cIjf9+XTGBHAgGGltVjSrGeNjAcea+rniyfOsMmTmEEMq07kn1eje3 HVElwl31RduuinHd9s76n/jmD/bECLgH73NpmdjbfCBlmV8mD8X88V3jifAbNhk3XAwI QJp/+tj2wGPIKYCn/3L1hMnrjArAVoJ1PuiaM= Received: by 10.180.73.193 with SMTP id n1mr1151927wiv.1.1323822206196; Tue, 13 Dec 2011 16:23:26 -0800 (PST) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id v10sm1018412wiy.23.2011.12.13.16.23.24 (version=SSLv3 cipher=OTHER); Tue, 13 Dec 2011 16:23:24 -0800 (PST) Date: Wed, 14 Dec 2011 00:23:22 +0000 From: RW To: freebsd-questions@freebsd.org Message-ID: <20111214002322.09da0955@gumby.homeunix.com> In-Reply-To: <4EE79220.8050007@rambler.ru> References: <4EE79220.8050007@rambler.ru> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Free memory exhausted by networking X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2011 00:23:27 -0000 On Wed, 14 Dec 2011 00:57:52 +0700 Dmitriy Kryuk wrote: > I'm running Transmission (http://www.transmissionbt.com/), =D0=B0 > BitTorrent client on my FreeBSD 7.2 box. It requests large recieve > buffers for its network connections. This leaves my system with > absolutely no free memory. If some process frees a large amount of > memory, it gets consumed about 1.5 megabytes per second until it > drops to zero. I don't seem to have any problems like denied network > connections or memory allocation, but it makes my system swap in and > out often. As top shows: >=20 > CPU: 24.9% user, 0.0% nice, 27.2% system, 33.1% interrupt, 14.8% idle > Mem: 217M Active, 143M Inact, 105M Wired, 25M Cache, 59M Buf, 8K Free > Swap: 4352M Total, 236K Used, 4352M Free Swapping doesn't have much to do with low free memory. There's actually very little swap use, but only 2 pages of free memory. I think that means that the memory is being used for interrupt handling, because anything else would allocate from the cache queue well before that happened.=20 You might try switching the interface to polling or increasing both of the free memory watermarks vm.v_free_min and vm.v_free_target.=20