--===============0181188760==
Content-Type: multipart/signed; boundary="=-=-=";
micalg=pgp-sha1; protocol="application/pgp-signature"

--=-=-=
Content-Transfer-Encoding: quoted-printable

On Fri 2008-01-11 14:55:52 -0500, Ben Lindstrom wrote:

> In both cases I believe the test was pretty much a "dd if=3D/dev/urandom =

...=20
> | ssh '| cat /dev/null'" style testing or transferring of real data.=20
> Timing the time it takes to move XX amount of data then doing the math.


Be aware that if you're concerned about a CPU bottleneck for openssh,
dd'ing from /dev/urandom is going to confound your results. Pulling
only 5MB of data from /dev/urandom chews up over 2.5 seconds of CPU
time (inside the kernel, no less!) on a 1.2GHz P3 running Linux
2.6.22. here's two different ways of looking at it:

[0 dkg@squeak ~]$ time dd if=3D/dev/urandom bs=3D1K count=3D5K > /dev/null=
=20
5120+0 records in
5120+0 records out
5242880 bytes (5.2 MB) copied, 2.69792 seconds, 1.9 MB/s

real 0m2.723s
user 0m0.016s
sys 0m2.696s
[0 dkg@squeak ~]$ (sleep 2 && dd if=3D/dev/urandom bs=3D1K count=3D5K > /de=
v/null 2>/dev/null) & vmstat 1 10
[1] 14475
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu--=
--
r b swpd free buff cache si so bi bo in cs us sy id =
wa
2 0 420188 6352 4776 76720 3 2 52 32 5 2 7 1 90 =
2
0 0 420188 6364 4776 76720 0 0 0 0 75 206 0 0 100=
0
1 0 420188 6364 4776 76720 0 0 0 0 75 117 0 2 98 =
0
1 0 420188 6364 4776 76720 0 0 0 0 255 83 0 100 0=
0
1 0 420188 6364 4776 76720 0 0 0 0 266 111 0 100 0=
0
0 0 420188 6432 4776 76720 0 0 0 0 278 143 0 67 33 =
0
0 0 420188 6452 4776 76720 0 0 0 0 109 131 0 0 100=
0
0 0 420188 6452 4776 76720 0 0 0 0 87 119 0 0 100=
0
0 0 420188 6452 4776 76720 0 0 0 0 212 213 0 1 99 =
0
1 0 420188 6452 4776 76720 0 0 0 0 132 152 0 0 100=
0
[1]+ Done ( sleep 2 && dd if=3D/dev/urandom bs=3D1K cou=
nt=3D5K >/dev/null 2>/dev/null )
[0 dkg@squeak ~]$=20

So if ssh is contending with the kernel's PRNG and the CPU is pegged
at 100%, you'll see a throughput performance degradation as a result.

It's probably better to dd from /dev/urandom to a large (RAM-backed)
file and feed a continuous loop from the file for throughput tests to
avoid this problem.

--dkg

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQIVAwUBR4fRsczS7ZTSFznpAQL+ehAAqPpiVFoX6qJEKcsdqY tz9fgd1jWtX7HH
3XVSg2liV/mpc4CWPVUu8S43jJcnUkna3ji6t3Q17iaeBw9XQgL91gA1NATM 2HV9
CQ051EdNFYbsB5nBuic7pHM5+eqlNfRnjy0bPZdXnKnTVxekTA 0dKxpc7GYKGsZr
YFkV7mCR1dhm/gu7Y+f8N38hRIF3hLaYpzWJ2ss7HKaNsOLSeGhqoWNwNLF/XNZC
1HxjmallDHHfz0GCFmY924DP5qXvgPJr5xC1YReaOhFq1ybqtG P4lIPkmtnPEicp
jFseL64Yv2Yb2OKfEfFK58zspFJdjVGHwX5NPpqYOx2jozPhQ4 5LWKuzNY0f9pdB
RlD0kFZ/T+2C6D3teEKdvHU77HIu3T79Q3Bm8RagKKgWFs0OO6xxBl+dqk HrgwwU
jd8BmKLTDPS7ys6nP2EeT4xJjR/hIVJVLI6qoqALRTS7gY+uSxE9TV57E8veYPqS
I8txXg1YYgkI/Um8RKzxo9560DjN102qOINGNqrZseDAmepc/+sBUIEqJ37x79d+
euKSuSRoNej22a6tUEy/FLZcXmIYODyM6wVANKRuSRcBGRkQsAnLoQctqezNWXCd
RGqsEJF8AB53T4NfeCic5TpGhAGL6+4q28sNU4uS6QUayxMg4e GDevwXSAOL/ABN
VXUwDqtTpLY=
=yPsF
-----END PGP SIGNATURE-----
--=-=-=--

--===============0181188760==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/li...enssh-unix-dev

--===============0181188760==--