From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 15 03:19:18 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E35E316A401 for ; Sat, 15 Apr 2006 03:19:18 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B8FE43D49 for ; Sat, 15 Apr 2006 03:19:18 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 4473F1A4DE0; Fri, 14 Apr 2006 20:19:18 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 5FE1A51878; Fri, 14 Apr 2006 23:19:17 -0400 (EDT) Date: Fri, 14 Apr 2006 23:19:17 -0400 From: Kris Kennaway To: Dragos Ionita Message-ID: <20060415031917.GA12531@xor.obsecurity.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: grep out of memory error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2006 03:19:19 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 15, 2006 at 12:16:23PM +1000, Dragos Ionita wrote: > Hi, >=20 > not sure that I'm in the right mailing list here, but I got myselft =20 > the 6.1-RC1 amd64 iso yesterday and installed it. >=20 > I've got a minimum system running and just 10 minutes ago, I ran a =20 > 'grep' command and it returned an "out of memory" error. >=20 > The command run was: >=20 > grep -d recurse sasl /* >=20 > The error caused: >=20 > swap_pager: out of swap space > swap_pager_getswapspace(16): failed > HOSTNAME kernel: pid 618 (grep), uid 0, was killed: out of swap space > Killed >=20 > Not sure, but this seems a bit odd; I've got one GB of RAM and 512M =20 > of swap space allocated. >=20 > Running top beside the command gives you a nice view of what's =20 > happening: All of the RAM is used up almost instantly and the the =20 > swap space. All in all, in about 3 seconds, I get that out of memory =20 > error. >=20 > Again, I'm not an expert in these matters, but it seems odd that grep =20 > needs more than 1.5GB to grep (even if it's recursive from the root =20 > dir). >=20 > Does anyone else experience that problem as well? It's probably grepping /dev/zero, which is an exercise in futility. Kris --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEQGY0Wry0BWjoQKURArIsAJ4v4K4WSJRmSdxJqmh4/a9WLn48qACfUinC PEkMNIuhCRBqhy78N4KqmpM= =xWhr -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--