From owner-freebsd-questions@FreeBSD.ORG Wed May 22 20:17:20 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 650BCF87 for ; Wed, 22 May 2013 20:17:20 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from mail-ie0-x22d.google.com (mail-ie0-x22d.google.com [IPv6:2607:f8b0:4001:c03::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 393E7A96 for ; Wed, 22 May 2013 20:17:20 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id k5so6301757iea.18 for ; Wed, 22 May 2013 13:17:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=2F0n9TXkINsxeEQVSsJ8M5gv5n+TH3YbeUtOURWPLgg=; b=zuAgKRkN30ikkiLFZKxJrFincYM6oU4xn6uFF0zMjPUGiyJXasZ5K4BGRovr0bgEXq CCZAID5mAbduTEXSo7QU0dwHsqqEmr10/UgPzKOLKsK2xk/0aRMsjACECH9yc1GBmGg8 FrJXS7GuVMRCZtHON3anX4K6gZ3jWtSiWOh8q3yjcFJa4cvL7Wl0S5t495352S8Ec2X1 hqwguhGRtVxf5w1djosiM934popFfE50PViRLU5Beipc/P2tU9efCcD19c8qYbX8LBOo 6voTfwGiH3drHy1trx9mjyWJr2ips6t+eML3UrEvqc3iRCMnqU70imBZwo1jPUrIJJ/9 4D0Q== X-Received: by 10.50.114.161 with SMTP id jh1mr3376797igb.112.1369253839943; Wed, 22 May 2013 13:17:19 -0700 (PDT) Received: from [192.168.1.34] (c-98-212-197-211.hsd1.il.comcast.net. [98.212.197.211]) by mx.google.com with ESMTPSA id ji5sm16629859igb.0.2013.05.22.13.17.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 May 2013 13:17:19 -0700 (PDT) Message-ID: <519D27B4.1060805@gmail.com> Date: Wed, 22 May 2013 15:16:52 -0500 From: Joshua Isom User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: David Demelier Subject: Re: Unkillable processes References: <519935D0.5080202@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2013 20:17:20 -0000 On 5/22/2013 1:47 AM, David Demelier wrote: > 2013/5/19 Joshua Isom : >> >> A process can be unkillable if it's holding a lock, like reading from disk. >> Eventually, the lock will release and it should die. You can use limits to >> change how much CPU and memory a process can use. My guess is what happened >> is it started using a lot of memory, but you ran out and have a lot of swap. >> It was trying to run while using your hard drive instead of ram. With >> limits, you should be able to prevent it from using swap which could help, >> and cap the amount of ram and cpu. > > Hello, thank you for that precise explanation, I will add limits into > the new rctl.conf, however I don't know how many amount of ram I > should allow, in fact I have absolutely no idea how much of ram an > usual program eats, is 50Mo enough for user applications ? > > Regards, > > -- > Demelier David > A "usual program" on FreeBSD could be anything. Right now my cron's using about 1.5 megs, while my ZFS ARC is about 20 gigabytes. Firefox can use a gigabyte somewhat easily. What I'd recommend is using limits to disable swap for it, and temporarily set the maximum memory to around 2/3's your currently free memory. If it's behaving properly that should be safe. While it's running properly, get an idea of how much it wants and set the ram to 1.5 times that number. If it's misbehaving, your system should still run properly and maybe you can diagnose the problem.