From owner-freebsd-questions@FreeBSD.ORG Tue Jun 2 23:19:56 2009 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 F0742106566C for ; Tue, 2 Jun 2009 23:19:56 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net [72.32.213.11]) by mx1.freebsd.org (Postfix) with ESMTP id CB1C28FC0A for ; Tue, 2 Jun 2009 23:19:56 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from 68-189-245-235.dhcp.oxfr.ma.charter.com ([68.189.245.235] helo=cube.entropy.prv) by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1MBdGp-0009vq-E0; Tue, 02 Jun 2009 19:19:56 -0400 Received: from [127.0.0.1] (fireball.entropy.prv [192.168.1.12]) by cube.entropy.prv (Postfix) with ESMTP id F0FEF2F5E3B5; Tue, 2 Jun 2009 19:19:50 -0400 (EDT) Message-ID: <4A25B395.6060502@FreeBSD.org> Date: Tue, 02 Jun 2009 19:19:49 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Steve Bertrand References: <4A25B029.1030608@ibctech.ca> <4ad871310906021609y4b85025bwe16346b824df7bf3@mail.gmail.com> <4A25B1DA.10201@ibctech.ca> In-Reply-To: <4A25B1DA.10201@ibctech.ca> X-Enigmail-Version: 0.95.7 OpenPGP: id=1C940290 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.6 (/) Cc: Glen Barber , "freebsd-questions@freebsd.org Questions -" Subject: Re: Set task priority X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2009 23:19:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steve Bertrand wrote: > Glen Barber wrote: >> Hi Steve >> >> On Tue, Jun 2, 2009 at 7:05 PM, Steve Bertrand wrote: >>> Hi everyone, >>> >>> I'm attempting to "mysqldump" a database on a box that is hovering near >>> max CPU and mem usage. >>> >>> When I run the command, other critical programs fail to respond causing >>> an 'outage-like' situation. >>> >>> Normally, this is a time-of-day task and will run happily later into the >>> night, but I want to run it now. >>> >>> What is the best way to set priority on my task in order to ensure it >>> completes as quickly as possible, but does not cause a situation where >>> other programs and their children can't respond? >>> >> You can use nice(1) or renice(1) to set priorities, but I/O and >> bandwidth will end up being your bottleneck. > > Thanks Glen, > > I'll have to play around a bit. Looking closer, it does appear to be a > disk I/O issue, but I figured that if I tried to prioritize the job, it > might ease-up on all system aspects. > > Cheers, > > Steve Hi Steve, I had the same situation here, and nice(1) wasn't cutting it for me. I finally switched to idprio(1): http://www.freebsd.org/cgi/man.cgi?query=idprio&sourceid=opensearch idprio 31 mysqldump ..... will run only when other processes are idle. That should prevent any further self-incurred DOS symptoms for you. Cheers, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKJbOV0sRouByUApARAs7DAKC2+IC4xaB+ErFBlIAdhvoLd9isigCgr9Gc 8nScru/gfYcptK1EeFaekfI= =SS04 -----END PGP SIGNATURE-----