--Apple-Mail=_C7569AD0-E1F2-47D7-8BB7-C2AFFEAE75F0
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_A4CF52FB-A497-4EF0-B484-212CA3862E7A"


--Apple-Mail=_A4CF52FB-A497-4EF0-B484-212CA3862E7A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252

Hello,

On Sep 12, 2014, at 10:31, Eric Wong <normalperson / yhbt.net> wrote:

> Panagiotis Atmatzidis <atma / convalesco.org> wrote:
>> Generally speaking there is some latency in the server but doesn't
>> justify almost 60+ seconds of difference :-/
>=20
> I'd take a look at truss/ktruss/dtruss or whatever system call tracer
> which gives timings on FreeBSD and see what syscalls take long.
> Because based on the system+user times, it is waiting *something*
> external.

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.

https://gist.github.com/atmosx/93e7f202539d8d8a0d47

>=20
> I would also take a look at the Faraday gem + dependencies which it
> seems to use for HTTP access.  It could be misconfigured TCP knobs
> (TCP_NODELAY may be needed, or forgot to uncork the socket on
> TCP_NOPUSH).
>=20
> I suppose you can also try doing the equivalent with the excellent
> Net::HTTP::Persistent gem  .

I tried using =91open-uri=92 to do download a file of 1024kb side. =
Net:Http made about 12s while OpenURI about 22s not that system.

>=20
> (sorry I don't have any experience with Faraday, but it looks like
> you can get it to use different backends...)


I will install FreeBSD on virtual box this weekend see if I am able to =
reproduce the results I=92m getting on my VPS and see from there.

Thanks for your time!

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=_A4CF52FB-A497-4EF0-B484-212CA3862E7A
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,<br><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;"><span =
style=3D"text-align: -webkit-auto;"><br></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;"><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><span style=3D"text-align: -webkit-auto;">On =
Sep 12, 2014, at 10:31, Eric Wong &lt;<a =
href=3D"mailto:normalperson / yhbt.net">normalperson / yhbt.net</a>&gt; =
wrote:</span></div></div></div></div></div></div><div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite">Panagiotis =
Atmatzidis &lt;<a =
href=3D"mailto:atma / convalesco.org">atma / convalesco.org</a>&gt; =
wrote:<br><blockquote type=3D"cite">Generally speaking there is some =
latency in the server but doesn't<br>justify almost 60+ seconds of =
difference :-/<br></blockquote><br>I'd take a look at =
truss/ktruss/dtruss or whatever system call tracer<br>which gives =
timings on FreeBSD and see what syscalls take long.<br>Because based on =
the system+user times, it is waiting =
*something*<br>external.<br></blockquote><div><br></div><div>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.</div><div><br></div><div><a =
href=3D"https://gist.github.com/atmosx/93e7f202539d8d8a0d47">https://gist.=
github.com/atmosx/93e7f202539d8d8a0d47</a></div><br><blockquote =
type=3D"cite"><br>I would also take a look at the Faraday gem + =
dependencies which it<br>seems to use for HTTP access. &nbsp;It could be =
misconfigured TCP knobs<br>(TCP_NODELAY may be needed, or forgot to =
uncork the socket on<br>TCP_NOPUSH).<br><br>I suppose you can also try =
doing the equivalent with the excellent<br>Net::HTTP::Persistent gem =
&nbsp;.<br></blockquote><div><br></div><div>I tried using =91open-uri=92 =
to do download a file of 1024kb side. Net:Http made about 12s while =
OpenURI about 22s not that system.</div><br><blockquote =
type=3D"cite"><br>(sorry I don't have any experience with Faraday, but =
it looks like<br>you can get it to use different =
backends...)<br></blockquote></div><div><br></div>I will install FreeBSD =
on virtual box this weekend see if I am able to reproduce the results =
I=92m getting on my VPS and see from there.<div><br></div><div>Thanks =
for your time!<br><div><br></div><div><div style=3D"text-align: =
-webkit-auto; orphans: 2; widows: 2; word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space;">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><div><span style=3D"text-align: =
-webkit-auto;"><br></span></div></div></body></html>=

--Apple-Mail=_A4CF52FB-A497-4EF0-B484-212CA3862E7A--

--Apple-Mail=_C7569AD0-E1F2-47D7-8BB7-C2AFFEAE75F0
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

iQIcBAEBAgAGBQJUExbFAAoJEPy01a8ae/7FwIAP/i8J5csjhmHrRppRLz9BrcDk
kNfZ0AnzPcuNAvzT4jNBuE+MNIz0Q/N7j07uS6CknwhLg4jALzupwE5qxe2+i812
Am3VmRIPqtbFhwJGtSeTcXMU62SS86bTNS0R/mrGgiuP3cC5PGKjIenH8bCZaleL
hDPGqHm2V7LGFBk1FoD5NIUDN5PAA+ZF4dzXh1D5zZc5bm8YjsZ2DpeBCxOeRW30
8ajRJzJldEc3PlN+gQX1O+fam0Vsh00WQIdqXicBXadrPjHJuoIBEswsmxb8+MkH
Kyhe5ed8iSJNpx6TFYu8ZQ3hNTnlMrxw6xYT3K+BRF1strSbhd7E3N0s2CSoMg4w
KHjRhcdKeNk5YqUfrj/zOOAhoeMvrEiYoHANAu3jiDaPaEpLloiJhIUq/2TVpkGn
bEKcbs/xp31GXDxVF+L/rKix6nwxJFv/7Ebyu9TB/2bAAYPO9B2a8irZnv50RcgJ
V/mBftKl+AeDRUL9FUIW4f1wlzPz3zJGtcqnkT6OHrRfC/bfXFckJNw1sg+OXopE
5tAbcOie773is9ZjhB6LLycQ8eb1FK/Q6MOx4Zx+zLqSKvdWdDYb/3IaoMzzKp8q
Ze+Mtt45r5OezccJHT0jaPJGysytnuLDcDaQJF6VMw3U90Lnva1VOdFaY+uxMJ0s
5duZrr1VMRCRbfOQJn+y
=CCD9
-----END PGP SIGNATURE-----

--Apple-Mail=_C7569AD0-E1F2-47D7-8BB7-C2AFFEAE75F0--