--Apple-Mail=_EE4A018F-4654-41DF-99B3-24D3C578D2BF
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_9F4EBB30-37AE-4558-956B-4E466A9D8072"


--Apple-Mail=_9F4EBB30-37AE-4558-956B-4E466A9D8072
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252

Hello!

On Sep 13, 2014, at 21:10, Robert Klemme <shortcutter / googlemail.com> =
wrote:

> On Fri, Sep 12, 2014 at 5:52 PM, Panagiotis Atmatzidis
> <atma / convalesco.org> wrote:
>=20
>> Run a =91dtruss=92. I didn=92t look at it carefully yet. I=92m not =
familiar with
>> this kind of things, it will probably take me some time to figure out =
what=92s
>> happening. Please take a look and let me know if there=92s anything =
that jumps
>> out directly. What I found odd are the path errors are every call. I =
don=92t
>> see those on my MacOSX system. NOTE: that=92s a 'dtruss -a=92 output.
>>=20
>> https://gist.github.com/atmosx/93e7f202539d8d8a0d47
>=20
> Some preliminary analysis:
>=20
> $ awk 'NR<=3D3 || ($3 ~ /^[0-9]*$/ && $3>1000) {print}' =
gistfile1.pytb.txt
> $ sudo dtruss -a ./test.rb
> dtrace: 3387 dynamic variable drops with non-empty dirty list
> PID/LWP    RELATIVE  ELAPSD    CPU SYSCALL(args) =3D return
> 91089/100320:   1980466 1019754     11 kevent(0xD, 0x7FFFFFFFB6A8, =
0x1) =3D 0 0
> 91089/100320:   1980595  369752     15 kevent(0xD, 0x7FFFFFFFB6A8, =
0x1) =3D 1 0
> 91089/100320:   1980764 1609894     12 kevent(0xD, 0x7FFFFFFFB6A8, =
0x1) =3D 1 0
> 91089/100320:   1980894 1019483     12 kevent(0xD, 0x7FFFFFFFB6A8, =
0x1) =3D 0 0
> 91089/100320:   1981020   53532     16 kevent(0xD, 0x7FFFFFFFB6A8, =
0x1) =3D 1 0
> 91089/100320:   1981447   53020     65 connect(0xD, 0x804B01FB0, 0x10) =
=3D 0 0
> 91089/100320:   1997891   57567     12 select(0xE, 0x805E4BB00, 0x0) =3D=
 1 0
> 91089/100320:   1999566   53752      7 select(0xE, 0x805E8E100, 0x0) =3D=
 1 0
> 91089/100320:   2000819   59065     12 select(0xE, 0x805F2DB80, 0x0) =3D=
 1 0
> 91089/100320:   2003865 2992714     21 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 1 0
> 91089/100320:   2003989 1019412      8 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 0 0
> 91089/100320:   2004089   53489     14 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 1 0
> 91089/100320:   2004251 1926141     12 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 1 0
> 91089/100320:   2004372 1019526      8 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 0 0
> 91089/100320:   2004674 15598747     31 connect(0xD, 0x8055EC3B0,
> 0x1C) =3D -1 Err#64
> 91089/100320:   2004812   49906     65 connect(0xD, 0x805D5F9F0, 0x10) =
=3D 0 0
> 91089/100320:   2023067   50707     13 select(0xE, 0x807A12B00, 0x0) =3D=
 1 0
> 91089/100320:   2024124  142633     15 select(0xE, 0x807A95400, 0x0) =3D=
 1 0
> 91089/100320:   2031193 1009502     11 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 0 0
> 91089/100320:   2031321   78420     19 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 1 0
> 91089/100320:   2031505 1911222     17 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 1 0
> 91089/100320:   2031684 1019338     12 kevent(0xD, 0x7FFFFFFFB778, =
0x1) =3D 0 0
> 91089/100320:   2032104   50128     82 connect(0xD, 0x808E30570, 0x10) =
=3D 0 0
> 91089/100320:   2032683  389215     13 select(0xE, 0x807A95F80, 0x0) =3D=
 1 0
>=20
> There are quite a few kevent calls that take more than one second =
(unit is us).
>=20
> Then I did
>=20
> ruby -nae 'printf("%d;%d;%s\n", Integer($F[1]), Integer($F[2]),
> $F[4][/^\w+/]) rescue 1' gistfile1.pytb.txt
>=20
> and imported the data into a spreadsheet. You can find it here:
>=20
> =
https://drive.google.com/file/d/0B7Q7WZzdIMlIUzhnUGxyWXY1WlU/edit?usp=3Dsh=
aring
>=20
> The two entries which account for almost all the time:
>=20
> kevent Sum - ELAPSED 15.102.889
> Average - ELAPSED 943.931
> Count - ELAPSED 16
>=20
> connect Sum - ELAPSED 15.752.179
> Average - ELAPSED 656.341
> Count - ELAPSED 24
>=20
> Total Sum - ELAPSED 31.673.152
> Total Average - ELAPSED 5.364
> Total Count - ELAPSED 5905
>=20
> Kind regards
>=20
> robert
>=20
> --=20
> [guy, jim].each {|him| remember.him do |as, often| as.you_can - =
without end}
> http://blog.rubybestpractices.com/


Thanks for taking the time to help out with this Robert! I really =
appreciate it!

Panagiotis (atmosx) Atmatzidis

email:	atma / convalesco.org
URL:	http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

"As you set out for Ithaca, hope the voyage is a long one, full of =
adventure, full of discovery [...]" - C. P. Cavafy





--Apple-Mail=_9F4EBB30-37AE-4558-956B-4E466A9D8072
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=windows-1252

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;">Hello!<div><br><div><div>On Sep 13, 2014, at 21:10, =
Robert Klemme &lt;<a =
href=3D"mailto:shortcutter / googlemail.com">shortcutter / googlemail.com</a>&=
gt; wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite">On Fri, Sep 12, 2014 at 5:52 PM, Panagiotis =
Atmatzidis<br>&lt;<a =
href=3D"mailto:atma / convalesco.org">atma / convalesco.org</a>&gt; =
wrote:<br><br><blockquote type=3D"cite">Run a =91dtruss=92. I didn=92t =
look at it carefully yet. I=92m not familiar with<br>this kind of =
things, it will probably take me some time to figure out =
what=92s<br>happening. Please take a look and let me know if there=92s =
anything that jumps<br>out directly. What I found odd are the path =
errors are every call. I don=92t<br>see those on my MacOSX system. NOTE: =
that=92s a 'dtruss -a=92 output.<br><br><a =
href=3D"https://gist.github.com/atmosx/93e7f202539d8d8a0d47">https://gist.=
github.com/atmosx/93e7f202539d8d8a0d47</a><br></blockquote><br>Some =
preliminary analysis:<br><br>$ awk 'NR&lt;=3D3 || ($3 ~ /^[0-9]*$/ =
&amp;&amp; $3&gt;1000) {print}' gistfile1.pytb.txt<br>$ sudo dtruss -a =
./test.rb<br>dtrace: 3387 dynamic variable drops with non-empty dirty =
list<br>PID/LWP &nbsp;&nbsp;&nbsp;RELATIVE &nbsp;ELAPSD =
&nbsp;&nbsp;&nbsp;CPU SYSCALL(args) =3D return<br> 91089/100320: =
&nbsp;&nbsp;1980466 1019754 &nbsp;&nbsp;&nbsp;&nbsp;11 kevent(0xD, =
0x7FFFFFFFB6A8, 0x1) =3D 0 0<br> 91089/100320: &nbsp;&nbsp;1980595 =
&nbsp;369752 &nbsp;&nbsp;&nbsp;&nbsp;15 kevent(0xD, 0x7FFFFFFFB6A8, 0x1) =
=3D 1 0<br> 91089/100320: &nbsp;&nbsp;1980764 1609894 =
&nbsp;&nbsp;&nbsp;&nbsp;12 kevent(0xD, 0x7FFFFFFFB6A8, 0x1) =3D 1 0<br> =
91089/100320: &nbsp;&nbsp;1980894 1019483 &nbsp;&nbsp;&nbsp;&nbsp;12 =
kevent(0xD, 0x7FFFFFFFB6A8, 0x1) =3D 0 0<br> 91089/100320: =
&nbsp;&nbsp;1981020 &nbsp;&nbsp;53532 &nbsp;&nbsp;&nbsp;&nbsp;16 =
kevent(0xD, 0x7FFFFFFFB6A8, 0x1) =3D 1 0<br> 91089/100320: =
&nbsp;&nbsp;1981447 &nbsp;&nbsp;53020 &nbsp;&nbsp;&nbsp;&nbsp;65 =
connect(0xD, 0x804B01FB0, 0x10) =3D 0 0<br> 91089/100320: =
&nbsp;&nbsp;1997891 &nbsp;&nbsp;57567 &nbsp;&nbsp;&nbsp;&nbsp;12 =
select(0xE, 0x805E4BB00, 0x0) =3D 1 0<br> 91089/100320: =
&nbsp;&nbsp;1999566 &nbsp;&nbsp;53752 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7 =
select(0xE, 0x805E8E100, 0x0) =3D 1 0<br> 91089/100320: =
&nbsp;&nbsp;2000819 &nbsp;&nbsp;59065 &nbsp;&nbsp;&nbsp;&nbsp;12 =
select(0xE, 0x805F2DB80, 0x0) =3D 1 0<br> 91089/100320: =
&nbsp;&nbsp;2003865 2992714 &nbsp;&nbsp;&nbsp;&nbsp;21 kevent(0xD, =
0x7FFFFFFFB778, 0x1) =3D 1 0<br> 91089/100320: &nbsp;&nbsp;2003989 =
1019412 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8 kevent(0xD, 0x7FFFFFFFB778, 0x1) =
=3D 0 0<br> 91089/100320: &nbsp;&nbsp;2004089 &nbsp;&nbsp;53489 =
&nbsp;&nbsp;&nbsp;&nbsp;14 kevent(0xD, 0x7FFFFFFFB778, 0x1) =3D 1 0<br> =
91089/100320: &nbsp;&nbsp;2004251 1926141 &nbsp;&nbsp;&nbsp;&nbsp;12 =
kevent(0xD, 0x7FFFFFFFB778, 0x1) =3D 1 0<br> 91089/100320: =
&nbsp;&nbsp;2004372 1019526 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8 kevent(0xD, =
0x7FFFFFFFB778, 0x1) =3D 0 0<br> 91089/100320: &nbsp;&nbsp;2004674 =
15598747 &nbsp;&nbsp;&nbsp;&nbsp;31 connect(0xD, 0x8055EC3B0,<br>0x1C) =3D=
 -1 Err#64<br> 91089/100320: &nbsp;&nbsp;2004812 &nbsp;&nbsp;49906 =
&nbsp;&nbsp;&nbsp;&nbsp;65 connect(0xD, 0x805D5F9F0, 0x10) =3D 0 0<br> =
91089/100320: &nbsp;&nbsp;2023067 &nbsp;&nbsp;50707 =
&nbsp;&nbsp;&nbsp;&nbsp;13 select(0xE, 0x807A12B00, 0x0) =3D 1 0<br> =
91089/100320: &nbsp;&nbsp;2024124 &nbsp;142633 =
&nbsp;&nbsp;&nbsp;&nbsp;15 select(0xE, 0x807A95400, 0x0) =3D 1 0<br> =
91089/100320: &nbsp;&nbsp;2031193 1009502 &nbsp;&nbsp;&nbsp;&nbsp;11 =
kevent(0xD, 0x7FFFFFFFB778, 0x1) =3D 0 0<br> 91089/100320: =
&nbsp;&nbsp;2031321 &nbsp;&nbsp;78420 &nbsp;&nbsp;&nbsp;&nbsp;19 =
kevent(0xD, 0x7FFFFFFFB778, 0x1) =3D 1 0<br> 91089/100320: =
&nbsp;&nbsp;2031505 1911222 &nbsp;&nbsp;&nbsp;&nbsp;17 kevent(0xD, =
0x7FFFFFFFB778, 0x1) =3D 1 0<br> 91089/100320: &nbsp;&nbsp;2031684 =
1019338 &nbsp;&nbsp;&nbsp;&nbsp;12 kevent(0xD, 0x7FFFFFFFB778, 0x1) =3D =
0 0<br> 91089/100320: &nbsp;&nbsp;2032104 &nbsp;&nbsp;50128 =
&nbsp;&nbsp;&nbsp;&nbsp;82 connect(0xD, 0x808E30570, 0x10) =3D 0 0<br> =
91089/100320: &nbsp;&nbsp;2032683 &nbsp;389215 =
&nbsp;&nbsp;&nbsp;&nbsp;13 select(0xE, 0x807A95F80, 0x0) =3D 1 =
0<br><br>There are quite a few kevent calls that take more than one =
second (unit is us).<br><br>Then I did<br><br>ruby -nae =
'printf("%d;%d;%s\n", Integer($F[1]), Integer($F[2]),<br>$F[4][/^\w+/]) =
rescue 1' gistfile1.pytb.txt<br><br>and imported the data into a =
spreadsheet. You can find it here:<br><br><a =
href=3D"https://drive.google.com/file/d/0B7Q7WZzdIMlIUzhnUGxyWXY1WlU/edit?=
usp=3Dsharing">https://drive.google.com/file/d/0B7Q7WZzdIMlIUzhnUGxyWXY1Wl=
U/edit?usp=3Dsharing</a><br><br>The two entries which account for almost =
all the time:<br><br>kevent Sum - ELAPSED 15.102.889<br>Average - =
ELAPSED 943.931<br>Count - ELAPSED 16<br><br>connect Sum - ELAPSED =
15.752.179<br>Average - ELAPSED 656.341<br>Count - ELAPSED =
24<br><br>Total Sum - ELAPSED 31.673.152<br>Total Average - ELAPSED =
5.364<br>Total Count - ELAPSED 5905<br><br>Kind =
regards<br><br>robert<br><br>-- <br>[guy, jim].each {|him| remember.him =
do |as, often| as.you_can - without =
end}<br>http://blog.rubybestpractices.com/<br></blockquote></div><br><div>=
<br class=3D"webkit-block-placeholder"></div><div =
apple-content-edited=3D"true">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; orphans: =
auto; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; widows: auto; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div =
style=3D"color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;"><div style=3D"color: rgb(0, 0, 0); letter-spacing: =
normal; orphans: auto; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; widows: auto; word-spacing: =
0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div =
style=3D"color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;"><div style=3D"color: rgb(0, 0, 0); font-family: =
Helvetica; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; orphans: 2; =
text-align: -webkit-auto; text-indent: 0px; text-transform: none; =
white-space: normal; widows: 2; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div =
style=3D"color: rgb(0, 0, 0); font-family: Helvetica; font-style: =
normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; orphans: 2; text-align: -webkit-auto; =
text-indent: 0px; text-transform: none; white-space: normal; widows: 2; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;"></div>Thanks for taking the time to help out with =
this Robert! I really appreciate it!<br><br>Panagiotis (atmosx) =
Atmatzidis<br><br>email:<span class=3D"Apple-tab-span" =
style=3D"white-space: pre;">	</span><a =
href=3D"mailto:atma / convalesco.org">atma / convalesco.org</a><br>URL:<span =
class=3D"Apple-tab-span" style=3D"white-space: pre;">	=
</span>http://www.convalesco.org<br>GnuPG ID: 0x1A7BFEC5<br>gpg =
--keyserver pgp.mit.edu --recv-keys&nbsp;1A7BFEC5<br><br>"<span =
style=3D"orphans: auto; widows: auto;">As you set out for =
Ithaca,&nbsp;</span><span style=3D"orphans: auto; widows: auto;">hope =
the voyage is a long one,&nbsp;</span><span style=3D"text-align: =
-webkit-auto; orphans: auto; widows: auto;">full of adventure, full of =
discovery [...]</span><span style=3D"text-align: -webkit-auto;">" =
-&nbsp;C. P. Cavafy</span></div><div style=3D"color: rgb(0, 0, 0); =
font-family: Helvetica; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: =
none; white-space: normal; widows: 2; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;"><br></div><div style=3D"color: rgb(0, 0, 0); =
font-family: Helvetica; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: =
none; white-space: normal; widows: 2; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;"><br></div></div></div></div></div><br =
class=3D"Apple-interchange-newline">
</div>
<br></div></body></html>=

--Apple-Mail=_9F4EBB30-37AE-4558-956B-4E466A9D8072--

--Apple-Mail=_EE4A018F-4654-41DF-99B3-24D3C578D2BF
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: Public Key Encryption

iQIcBAEBAgAGBQJUFMMTAAoJEPy01a8ae/7FhaQP/AwxN8oEORjLvAyOJ9jYEm14
Y5Ce9rV3I+xH/9A0EsuOTpIxa6MQMC7rxGzZ8dg9V+uxY4gt2pRXFzXXjXVjfurc
Filj4vE+y/xtiqkG0bESu6LJPkemmnnFaUu67aB67sTm9mbdkFv4qhGI/VaWWS/r
1YzxVdVECxNWx1lpM3HI8kFwZcLUihDBlHBgVb7VxDIVy1AfX6hH8LNI9VRei8jH
s8aiqOBIeWk1nUs+NMQ0VcbLWxjviYsyC1ckZelbfi14XxFN7aK7P5VVjg/eX/qc
ZKIiGhG0XmfCkweuPtMvq8OQptXlIu722MkGtX+kqZEkFkI7z1P2eLSqRCLm2BCH
bv9GJUvg6RM9zY7uXXjSUGTSOfrdLEOEyVN77x/uJqWUOjcZJbYORSQJlYFVLfBc
SLOvBWAmMfJtodWSgDVq7mHYXBhWLMKLLcj2FvHwm3hCN/SLicXrpmiNHuzzUtMi
XYR3LoHXmCHv5YFzRhvYAGalL79L8D3ZxAb36IEq/0ChYGfGFazmnuYvVoNcuv9R
AdbQ25mzQhB1jwOjit38v8KHAYShuIgJd+CwQqhWYtKa1vCZir5uDSZt5kriDaG+
9Mr/m/ZmYRWHrhFoP5jVKP1aVgFf1hlNGD0vqn4/0JCq3bsuVrZ/uZKRHfbXcD73
wbG9ZCLrvVDBqJlY7Qxq
=TKfW
-----END PGP SIGNATURE-----

--Apple-Mail=_EE4A018F-4654-41DF-99B3-24D3C578D2BF--