From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) From: arisawa In-Reply-To: Date: Sat, 14 May 2016 22:30:17 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4D68DE52-7413-4B52-8BBF-35EFCE609CB6@gmail.com> <2202C006-B0C9-40AE-B6FC-CA415D41A66A@ar.aichi-u.ac.jp> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] cpu command latency Topicbox-Message-UUID: 8f17034c-ead9-11e9-9d60-3106f5b1d025 Hello this is a partial report of cpu command latency. we have code below in rexcall() of cpu.c=20 na =3D netmkaddr(host, 0, service); //na =3D netmkaddr(host, =E2=80=9Ctcp=E2=80=9D, service);//DBG syslog(0,"cpu","rexcall:netmkaddr %lld =CE=BCsec; = %s",(nsec()-t0)/1000,na);//DBG procsetname("dialing %s", na); syslog(0,"cpu","rexcall:dialing %lld =CE=BCsec; = %s",(nsec()-t0)/1000,na);//DBG if((*fd =3D dial(na, 0, devdir, 0)) < 0) return "can't dial"; syslog(0,"cpu","rexcall:dial %lld =CE=BCsec",(nsec()-t0)/1000);//D= BG lines with =E2=80=9CDBG=E2=80=9D are code added for measurement. looking the result I found dial() takes as much as on second in my home = network! vbt May 14 21:27:52 rexcall:netmkaddr 122 =CE=BCsec; net!io!ncpu vbt May 14 21:27:52 rexcall:dialing 592 =CE=BCsec; net!io!ncpu vbt May 14 21:27:53 rexcall:dial 1161556 =CE=BCsec vbt May 14 21:27:57 rexcall:netmkaddr 677 =CE=BCsec; net!io!ncpu vbt May 14 21:27:57 rexcall:dialing 1082 =CE=BCsec; net!io!ncpu vbt May 14 21:27:58 rexcall:dial 1109949 =CE=BCsec replacing na =3D netmkaddr(host, 0, service); by na =3D netmkaddr(host, =E2=80=9Ctcp=E2=80=9D, service); we get much better performance as shown below. vbt May 14 22:21:18 rexcall:netmkaddr 489 =CE=BCsec; tcp!io!ncpu vbt May 14 22:21:18 rexcall:dialing 861 =CE=BCsec; tcp!io!ncpu vbt May 14 22:21:18 rexcall:dial 3099 =CE=BCsec vbt May 14 22:21:22 rexcall:netmkaddr 565 =CE=BCsec; tcp!io!ncpu vbt May 14 22:21:22 rexcall:dialing 977 =CE=BCsec; tcp!io!ncpu vbt May 14 22:21:22 rexcall:dial 7287 =CE=BCsec isn=E2=80=99t it better the default net be =E2=80=9Ctcp=E2=80=9D? even if you do want =E2=80=9Cnet=E2=80=9D, you can do cpu -h net!host=20 Kenji Arisawa > 2016/05/13 0:40=E3=80=81Skip Tavakkolian = =E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=EF=BC=9A >=20 > it might be worth instrumenting the cpu command to time the = authenticaiton step. i think that's where the problem is. >=20 > On Wed, May 11, 2016 at 3:39 PM Skip Tavakkolian = wrote: > what's the latency caused by the auth step? > FYI, from Seattle I see about 8 seconds to establish but as Charles = noted, it's reasonably fast after that. >=20 >=20 > On Wed, May 11, 2016 at 2:05 PM arisawa = wrote: > Hello, >=20 > we can measure the latency that comes from network connection > by executing simple program such as telnet or something others > to the port 8006 of grid.nyx.link. the content is: > #!/bin/rc > cat $net/local > cat $net/remote >=20 > yes the DNS may make a problem in IPv4/IPv6 mixed environment. > my server supports both IPs. > the cpu command will select IPv4. the command does not have =E2=80=9C-6=E2= =80=9D option. > If we want to connect by IPv6, literal IP address is required in the = argument of the command. >=20 > Kenji Arisawa >=20 > > In my experience, it's almost unfailingly the DNS that slows down > > establishing an Internet session of any type. > > > > Lucio. >=20 > > 2016/05/12 0:23=E3=80=81Kenny Lasse Hoff Levinsen = =E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=EF=BC=9A > > > > Well, based on the 9fs test that was posted, I'd think dial is being = awfully slow. > > > > Maybe try something simpler? aux/listen1 echo hello and a simple = network connection? > > > > Best regards, > > Kenny Levinsen > > > > On 11. maj 2016, at 16.13, Charles Forsyth = wrote: > > > >> > >> On 11 May 2016 at 14:44, Kenny Lasse Hoff Levinsen = wrote: > >> Delete the channel from /srv in the loop to test a full remote = mount dance, including the initial dial. It shouldn't take 3s to dial, = though. > >> > >> There's something initially slow in connecting to grid.nyx.link = with cpu, and setting up, but once there it's fine. >=20 >=20