Quantcast

SPARC64 context switching oddities

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

SPARC64 context switching oddities

Peter Jeremy-7
I have a tool that measures the rate at which a single-byte token can
be passed between two processes via a socketpair and have been running
multiple copies of it on an otherwise idle V890 (16-CPU, 64GB RAM
running -current from about a week ago), capturing 'vmstat -s' output.
In the process, I have found several oddities:

1) The number of context switches doesn't match my expectations.
See http://i.imgur.com/TyU3j.jpg
It starts out unexpectedly high (~184k switches/sec) and then drops to
an unrealistically low value as the number of processes increases from
1 to about 20 pairs.  It then very slowly increases.  Based on one
process writing a token to a second process requiring one context
switch, I would expect the number of context switches to roughly match
the green (based on token passing rate) or blue (based on syscall
rate) lines.

2) The transfer rate dips initially then rises to a peak before tailing off.
See http://i.imgur.com/zVcfu.jpg and http://i.imgur.com/DhMmV.jpg
The red line shows the rate reported by the program and the green line
shows the rate estimated from the syscall rate.  I would expect a fairly
flat peak from 1 to about 16 pairs (since there are 16 execution threads
available) that then tailed off as scheduler overheads increased

Can anyone offer an explanation for this behaviour?

--
Peter Jeremy

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: SPARC64 context switching oddities

Marius Strobl
On Thu, Jun 23, 2011 at 03:30:51PM +1000, Peter Jeremy wrote:

> I have a tool that measures the rate at which a single-byte token can
> be passed between two processes via a socketpair and have been running
> multiple copies of it on an otherwise idle V890 (16-CPU, 64GB RAM
> running -current from about a week ago), capturing 'vmstat -s' output.
> In the process, I have found several oddities:
>
> 1) The number of context switches doesn't match my expectations.
> See http://i.imgur.com/TyU3j.jpg
> It starts out unexpectedly high (~184k switches/sec) and then drops to
> an unrealistically low value as the number of processes increases from
> 1 to about 20 pairs.  It then very slowly increases.  Based on one
> process writing a token to a second process requiring one context
> switch, I would expect the number of context switches to roughly match
> the green (based on token passing rate) or blue (based on syscall
> rate) lines.
>
> 2) The transfer rate dips initially then rises to a peak before tailing off.
> See http://i.imgur.com/zVcfu.jpg and http://i.imgur.com/DhMmV.jpg
> The red line shows the rate reported by the program and the green line
> shows the rate estimated from the syscall rate.  I would expect a fairly
> flat peak from 1 to about 16 pairs (since there are 16 execution threads
> available) that then tailed off as scheduler overheads increased
>
> Can anyone offer an explanation for this behaviour?
>

I guess you're better off trying to find someone who knows about the
schedulers on arch@.

Marius

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-sparc64
To unsubscribe, send any mail to "[hidden email]"
Loading...