Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jun 2011 15:30:51 +1000
From:      Peter Jeremy <peter.jeremy@alcatel-lucent.com>
To:        freebsd-sparc64@freebsd.org
Subject:   SPARC64 context switching oddities
Message-ID:  <20110623053051.GL65891@pjdesk.au.alcatel-lucent.com>

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

--R+My9LyyhiUvIEro
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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?

--=20
Peter Jeremy

--R+My9LyyhiUvIEro
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)

iEYEARECAAYFAk4Cz4sACgkQ/opHv/APuIcdmQCgvUihaH9+kUezHeXFUE8FNLGW
21IAn1CIaVtvRNR/S5qsnCmpM5KxABgd
=IkZT
-----END PGP SIGNATURE-----

--R+My9LyyhiUvIEro--



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