🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.sequent
12 messages
12 total messages Started by Tony Beaumont Thu, 08 Feb 1990 09:19
timing parallel programs
#894
Author: Tony Beaumont
Date: Thu, 08 Feb 1990 09:19
34 lines
1880 bytes
We have a prototype OR-parallel Prolog system, written in C and running on a
sequent symmetry with 12 processors and a micro-second clock.

We want to get accurate timings of the run-times of Prolog programs when we
use 1, 2, ... 11 processors in order to accurately measure the speed-ups.

Our sequent is also running X-windows and there are 4 or 5 X-terminals
attached.

THE PROBLEM...
1.  How can we be sure that a program using (say) 6 DYNIX processes will
be run on 6 processors without interruption by other processes (ie
operating system processes, X-windows processes etc)

Is there a way to get a processor to exclusively run a process?

2.  Our current solution is to ask other users to log off when we make
timing runs, ensuring the load on the machine is as low as possible.
However, operating system processes are still running and although we
always leave at least 1 processor idle, how can we be sure that the
operating system processes do not interfere with (slow down) the processes
we are timing?  Also this approach is rather unfortunate in that we
require all other users to log off which in effect means that we have to
make our timings during the night.

email replies directly to me and if there is any interest I'll post a
summary of responses.

-Tony Beaumont
email (JANET): beaumont@uk.ac.bristol.compsci
Post: Department of Computer Science
      University of Bristol
      Bristol BS8 1TR
      UK
Re: timing parallel programs
#895
Author: Ian Dickinson
Date: Mon, 12 Feb 1990 10:28
21 lines
1432 bytes
In article <1324@csisles.Bristol.AC.UK> beaumont@CompSci.Bristol.AC.UK (Tony Beaumont) writes:
>Is there a way to get a processor to exclusively run a process?

Yes.
If you are running the code as setuid.
There is a system call called tmp_affinity or similar
(try 'man -k affinity' and you should get something in section 2)
This call will make a process have exclusive use of a single processor.
If you make all the parallel processes call this,
then spin until they are synchronised,
you should be able to conduct reasonable tests
without an other process intervening.

It might still be worthwhile running the tests during light load periods
so bus congestion, paging etc are less of a problem.

Hokay!
-- 
\/ato.  vato@uk.ac.warwick.  *NIX gives good head.  Support the FSF.  Plinth.
"When it's a smoking charred stump, that's too much.
                       Mine hasn't charred yet."    - entropy@alembic.acs.com
Re: timing parallel programs
#896
Author: Jim Reid
Date: Mon, 12 Feb 1990 15:28
38 lines
2662 bytes
In article <1324@csisles.Bristol.AC.UK> beaumont@CompSci.Bristol.AC.UK (Tony Beaumont) writes:
>We want to get accurate timings of the run-times of Prolog programs when we
>use 1, 2, ... 11 processors in order to accurately measure the speed-ups.

> Our current solution is to ask other users to log off when we make
>timing runs, ensuring the load on the machine is as low as possible.
>However, operating system processes are still running and although we
>always leave at least 1 processor idle, how can we be sure that the
>operating system processes do not interfere with (slow down) the processes
>we are timing?  Also this approach is rather unfortunate in that we
>require all other users to log off which in effect means that we have to
>make our timings during the night.

If you are hell-bent on timing *only* your application, you have little
choice but to dedicate your machine to that task. That means kicking off
all the users and booting the machine with a minimal number processes
active - essentially in single user mode. You wouldn't want the results
to be affected by a tty interrupt or a packet arriving from the ethernet
or whatever. This will give you accurate results but is somewhat
extreme.

Note that there will always be some kernel latency. [This is because of
the way the UNIX kernel works.] Your application process may have to
switch into kernel mode to do some interrupt handling, so unless you can
disable the interrupts, your results will be affected by the demands of
interrupt servicing.

Do you *really* need that accuracy? Most people treat benchmarks with
deserved scepticism so your super-accurate results are only likely to be
interpreted as a rough rule of thumb. If that's all your looking for,
you might as well run the timings while the machine is in use.
Personally speaking, I'd be happier if I knew that timings included the
noise of other system activity. I don't run applications on an empty
machine, so why should I run benchmarks in that way. To me, the absolute
numbers are not important - it's more useful to know what to expect when
the system's doing real work...

		Jim
Re: timing parallel programs
#898
Author: Luis Barriga
Date: Thu, 15 Feb 1990 09:44
21 lines
1674 bytes
>We want to get accurate timings of the run-times of Prolog programs when we
>use 1, 2, ... 11 processors in order to accurately measure the speed-ups.
I may thinks of two ways more of solving this problem.

1) You can use the "at" facility to schedule a job at any tile of any
day, while hopefully nobody is logged into your sequent (maybe Friday
or Saturday night). This works if your application does not take days
to finish and there is no interaction with the user. If the input is
the same you can prepare it in a file and redirect it from standart
input.

2) I have read about a system call "getrusage" that gives info about
resource utilization: system, user time consumed, and other stuff. Is
there any problem using it?
--
________________________________________________________________________|
   Luis Barriga			     The Royal Institute of Technology	|
				     Dep. Computer systems (TDS)	|
   e-address: luis@tds.kth.se	     S-100 44 Stockholm			|
				       SWEDEN     			|
________________________________________________________________________|
Re: timing parallel programs
#901
Author: Jim Reid
Date: Thu, 15 Feb 1990 14:20
15 lines
1368 bytes
In article <LUIS.90Feb15104438@molly.octopus.tds.kth.se> luis@octopus.tds.kth.se (Luis Barriga) writes:
>2) I have read about a system call "getrusage" that gives info about
>resource utilization: system, user time consumed, and other stuff. Is
>there any problem using it?

No, but the numbers it gives may not be reproducible. Paging statistics
may be influenced by the amount of free memory when the process is run.
The system time will probably include time spent processing interrupts
*on behalf of other processes*. Likewise the I/O statistics may include
counts for I/O for another process (i.e. starting the next disk transfer
request in the queue after servicing an interrupt from the controller).
If you plan on using getrusage for real, run your program several times
to average out these potential inconsistencies.

		Jim
Re: timing parallel programs
#899
Author: Rick Peralta
Date: Thu, 15 Feb 1990 20:18
17 lines
1358 bytes
In article luis@octopus.tds.kth.se (Luis Barriga) writes:
>
>2) I have read about a system call "getrusage" that gives info about
>resource utilization: system, user time consumed, and other stuff. Is
>there any problem using it?

It should be fine, just as long as you peek at it at the beginning and
end of your timing runs.  Otherwise you will get a little startup cost
into the overall measurements.  BTW: you'll need to sync the starts.

If you are interested in just general trends, just use the wall clock
time and test 0, 1 and many iterations of the code path.  That way you
can estimate fairly accurately how long things take, without going to
tremendous effort coding out the startup costs.


 - Rick
Re: timing parallel programs
#900
Author: David Haynes
Date: Fri, 16 Feb 1990 02:25
23 lines
1517 bytes
peralta@pinocchio.Encore.COM (Rick Peralta) writes:

>In article luis@octopus.tds.kth.se (Luis Barriga) writes:
>>
>>2) I have read about a system call "getrusage" that gives info about
>>resource utilization: system, user time consumed, and other stuff. Is
>>there any problem using it?

>It should be fine, just as long as you peek at it at the beginning and
>end of your timing runs.  Otherwise you will get a little startup cost
>into the overall measurements.  BTW: you'll need to sync the starts.

There was some work done at the University of Western Ontario utilizing
a program called "gun" which provided synchronized starts. The basic
strategy, as it was explained to me, involved having the processes watch
a memory location to see a change of state. 

-david-
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
David Haynes			Sequent Computer Systems (Canada) Ltd.
"...and this is true, which is unusual for marketing." -- RG May 1989
...!{utgpu, yunexus, utai}!torsqnt!david -or- david@torsqnt.UUCP
Re: timing parallel programs
#902
Author: Eugene Miya
Date: Fri, 16 Feb 1990 10:11
7 lines
755 bytes
In article <11171@encore.Encore.COM> peralta@multimax.encore.com (Rick Peralta) writes:
>BTW: you'll need to sync the starts.

Very much so.  I wrote a paper on this in the 88 Usenix Supercomputing
Workshop.

--eugene
Re: timing parallel programs
#909
Author: Carl Kesselman
Date: Sat, 24 Feb 1990 07:31
18 lines
1509 bytes
No, no no. The responses being sent are wrong.  How about RTFM.  There
is a facility called tmp_affinity.  You can use this to ensure that a
process runs on a specific processor.  If you have the appropiate
kernel configuration, this can be done without root permission.  You
might also want to dissable swapping and pff reduction of the working
set using the vm_ctl system call.  This does not completly free you
from interaction with other programs, but it is pretty good.  In
particular, you still must share the system bus and disk controllers
with other processes.  In addition, you should always leave a
processor or two free to handle interupts, network traffic and the
like.  NOTE: there is about a 20 microsecond overhead if you use the
function call interface described in the manual page.  There is also a
set of macros defined that can allow you to access the clock in about
6 usecs.


Carl
Re: timing parallel programs
#910
Author: Jim Reid
Date: Mon, 26 Feb 1990 13:19
19 lines
1583 bytes
In article <67411@aerospace.AERO.ORG> carl@altair.UUCP (Carl Kesselman) writes:
>No, no no. The responses being sent are wrong.  How about RTFM.  There
>is a facility called tmp_affinity.  You can use this to ensure that a
>process runs on a specific processor.

Yes, but that is not much help to the person who posed the initial
question. They were looking for a way to *exclusively* dedicate a
processor (or bunch of processors) to a particular process. The
tmp_affinity() system call does not provide this facility. It can bind
a process to a particular processor, but does not prevent another
process from also being bound to that processor or for the processor to
be given over to interrupt servicing and related kernel processing. If
the processor had to switch from the process that was being timed, the
benchmark results would be inconsistent and possibly non-reproducible.

I understand that Encore provide this capability on their boxes, so maybe
DYNIX will get it some day.

		Jim
Re: timing parallel programs
#911
Author: Dave Bakken
Date: Mon, 26 Feb 1990 22:32
30 lines
2419 bytes
In article <2151@baird.cs.strath.ac.uk> jim@cs.strath.ac.uk writes:
>Yes, but that is not much help to the person who posed the initial
>question. They were looking for a way to *exclusively* dedicate a
>processor (or bunch of processors) to a particular process. The
>tmp_affinity() system call does not provide this facility. It can bind
>a process to a particular processor, but does not prevent another
>process from also being bound to that processor or for the processor to
>be given over to interrupt servicing and related kernel processing. If
>the processor had to switch from the process that was being timed, the
>benchmark results would be inconsistent and possibly non-reproducible.
 
>I understand that Encore provide this capability on their boxes, so maybe
>DYNIX will get it some day.

I hope so, but I won't hold my breath, since Sequent seems to be about
2-3 years behind every other multiprocessor vendor in terms of their
OS.  I think that, in general, it would be nice to have a (privileged)
system call that allowed you to dedicate a certain number of processors
to a certain job without rebooting or anything.  Even more generally, I
think it would be useful to a lot of people of you could create separate
pools of processors, where processors in the same pool pulled processes off
of the same ready queue, and where you can configure which jobs go to
which pool in a flexible way, maybe based on some sort of grouping (e.g., 
faculty, grad_student, undergrad).  This grouping could probably be both
static and dynamic.
-- 
Dave Bakken				Internet:  bakken@cs.arizona.edu
721 Gould-Simpson Bldg			UUCP:	   uunet!arizona!bakken
Dept of Computer Science; U of Arizona 	Phone:	   +1 602 621 8372 (w)
Tucson, AZ 85721   USA			FAX:	   +1 602 621 4246 
Re: timing parallel programs
#912
Author: Carl Howe
Date: Tue, 27 Feb 1990 16:27
48 lines
3164 bytes
In article <2151@baird.cs.strath.ac.uk> jim@cs.strath.ac.uk writes:
>In article <67411@aerospace.AERO.ORG> carl@altair.UUCP (Carl Kesselman) writes:
>>No, no no. The responses being sent are wrong.  How about RTFM.  There
>>is a facility called tmp_affinity.  You can use this to ensure that a
>>process runs on a specific processor.
>
>Yes, but that is not much help to the person who posed the initial
>question. They were looking for a way to *exclusively* dedicate a
>processor (or bunch of processors) to a particular process. The
>tmp_affinity() system call does not provide this facility. It can bind
>a process to a particular processor, but does not prevent another
>process from also being bound to that processor or for the processor to
>be given over to interrupt servicing and related kernel processing. If
>the processor had to switch from the process that was being timed, the
>benchmark results would be inconsistent and possibly non-reproducible.
>
>I understand that Encore provide this capability on their boxes, so maybe
>DYNIX will get it some day.
>

I apologize in advance if this is too far off the topic of Sequent
computers, but since you already brought up one other vendor,
I thought I'd just mention an implementation of both capabilities.
The facility that you both are describing exists in
nX, the UNIX OS for the BBN Advanced Computers' multiprocessors.
Affiliating a process with a processor
is done via a "fork_and_bind" system call.  Dedication of processors
to processes is done via a facility called "clusters", which are dynamically
created and destroyed.  When user's originally log in, they work in a
public cluster of processors, but if they want a dedicated set of processors
to run a program, they can use the command,

	cluster <#processors> <command> <args>

to get such a cluster.  The processors for this cluster are allocated out
of a free pool and will be returned to the pool after the execution of
the command.  We use this type of facility all the time for
benchmarking and characterizing multiprocessor programs without disrupting
the work of other users.  No special privileges are required.

There are a few descriptions of this facility in the literature if
you are interested in more details.  I apologize in advance that I can't
quote them here because my office is currently packed in boxes.  Email me
if you would like them when I get unpacked.  If people would like to discuss
or post regarding this further, we should probably move to comp.parallel.

Carl
chowe@bbn.com.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads