Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 1999 18:36:20 -0800 (PST)
From:      Jaye Mathisen <mrcpu@internetcds.com>
To:        hackers@FreeBSD.ORG
Subject:   Processor affinity?
Message-ID:  <Pine.NEB.3.95.990214183141.27256P-100000@schizo.cdsnet.net>

next in thread | raw e-mail | index | archive | help


Noticed somethign a little odd with a 3.1-stable supped a few days ago.

There were only 3 processes of any significance running on a dual
processor P6.

mysql, top, and a perl script pumping kazillions of small records into the
mysql database.

The perl script was basically burning 99.9% of the CPU.  Mysql was chewing
up 40-60% of the CPU.

For some reason that on the suface does not make sense to me, the perl
script moved back and forth among the CPU's, just about like clockwork,
every update or so of top.

This seems odd to me, in that given the size of the program (small), and
the amount of CPU burning, it would be better if the perl process stayed
stuck to 1 CPU to maximise the use of the cache (512k) of that CPU,
instead of having to wander around.

Is there some way to set processor affinity on a process?  Or some tweak
to some sysctl variable somewhere that I can take advantage of?


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.990214183141.27256P-100000>