Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Jun 2009 19:19:49 -0400
From:      Greg Larkin <glarkin@FreeBSD.org>
To:        Steve Bertrand <steve@ibctech.ca>
Cc:        Glen Barber <glen.j.barber@gmail.com>, "freebsd-questions@freebsd.org Questions -" <freebsd-questions@freebsd.org>
Subject:   Re: Set task priority
Message-ID:  <4A25B395.6060502@FreeBSD.org>
In-Reply-To: <4A25B1DA.10201@ibctech.ca>
References:  <4A25B029.1030608@ibctech.ca>	<4ad871310906021609y4b85025bwe16346b824df7bf3@mail.gmail.com> <4A25B1DA.10201@ibctech.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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 <steve@ibctech.ca> 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-----




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A25B395.6060502>