From owner-freebsd-questions@FreeBSD.ORG Fri Jun 26 18:10:28 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 F1114106564A for ; Fri, 26 Jun 2009 18:10:28 +0000 (UTC) (envelope-from davidn04@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id A6A558FC1E for ; Fri, 26 Jun 2009 18:10:28 +0000 (UTC) (envelope-from davidn04@gmail.com) Received: by qw-out-2122.google.com with SMTP id 5so148691qwd.7 for ; Fri, 26 Jun 2009 11:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=3Ym1TnMsHHzsTUG48KtG0d5pbrN1scXVHlamLYdBn70=; b=Wz9Fh7X4f3cvM7mtbpn2ec2S42+vzBSLGl+RLhJQ9DCRVIB8H+pcExHJNqKk0MEq61 wdErKH7SRl37IRZRJZoozmRvOkibGyjt701tNuzgIvnTiGF7xfspOPnT+OSml+xo8Cnn T0j4rLM/uisX8ftlaX4zV3YLt7LvVjk5W1UAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xjenFgPBpozu4odPDpso18qbKi2SMmBET7BRj+TRB4q+x8B8aa/i1s2SmCPLc56l25 5fJSqWKgyavwxgUDbBmGhVihVDx4RZwfZniA4pc6fXcYAHlYSN8l1/FaK+S6RohZhSIn Rxdxwd2hUysqOCeeKkKGhAyA9DJJiB8NSmJ2w= MIME-Version: 1.0 Received: by 10.229.100.14 with SMTP id w14mr1167505qcn.48.1246039828033; Fri, 26 Jun 2009 11:10:28 -0700 (PDT) In-Reply-To: References: Date: Sat, 27 Jun 2009 04:10:27 +1000 Message-ID: <4d7dd86f0906261110j4bf1022cw374b1d08564dfd87@mail.gmail.com> From: David N To: Chuck Swiger Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Daniel Underwood , freebsd-questions@freebsd.org Subject: Re: Restrict process(es) to single core 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: Fri, 26 Jun 2009 18:10:29 -0000 2009/6/27 Chuck Swiger : > On Jun 26, 2009, at 10:40 AM, Daniel Underwood wrote: >> >> Suppose I'm running a multi-threaded program that's utilizing both >> cores of my CPU. =A0I'm not interested in it's speed, however, and would >> like to free up another core for general purpose. Is there a way >> (without altering/recompiling the program, obviously) to restricting a >> process and its children to a single core? > > The simple way would be to use renice to change the process priority; oth= er > normal processes you run would get CPU first, but this task would be able= to > use all system resources if nothing else is. =A0I'm not sure whether Free= BSD > currently has a way to bind tasks to only running on a subset of availabl= e > CPUs (ie, CPUSETs mechanism in Linux, set CPU affinity in Windows, etc). > > Regards, > -- > -Chuck > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" > If you're running FreeBSD 7.1 or up, theres a program called cpuset. man cpuset I think that's what you're after. Allows binding of process to certain CPUs= . Regards David N