Viscosity connection speed

Got a problem with Viscosity or need help? Ask here!

praseodym

Posts: 2
Joined: Mon Mar 16, 2015 2:52 am

Post by praseodym » Mon Mar 16, 2015 2:56 am
Using Viscosity 1.5.4 it takes about 6-7 seconds to connect to my OpenVPN server after clicking it in the Viscosity menu. On my iPhone I'm using the OpenVPN Connect app, which can connect to the same server in less than a second.

What causes this difference in connection speed?

James

User avatar
Posts: 2317
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Mon Mar 16, 2015 9:44 am
Hi praseodym,

You can view the times of entries in the OpenVPN log to see where/why there are delays for your connection:
http://www.sparklabs.com/support/viewin ... envpn_log/

Generally though, the desktop/full version of OpenVPN is going to be a little slower at initialising because it does much more than the custom stripped-down version of OpenVPN that's part of OpenVPN Connect. Libraries like OpenSSL are much larger than PolarSSL (which is designed for mobile use).

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

praseodym

Posts: 2
Joined: Mon Mar 16, 2015 2:52 am

Post by praseodym » Mon Mar 16, 2015 10:29 am
Thanks for the reply!

From the log, I'm not completely sure where the actual delays are, i.e. I'm not sure what OpenVPN is doing between the log lines that have several seconds between them. For reference, here is my log:
Code: Select all
Mar 16 00:25:03: Viscosity Mac 1.5.4 (1272)
Mar 16 00:25:03: Viscosity OpenVPN Engine Started
Mar 16 00:25:03: Running on Mac OS X 10.10.3
Mar 16 00:25:03: ---------
Mar 16 00:25:03: Checking reachability status of connection...
Mar 16 00:25:03: Connection is reachable. Starting connection attempt.
Mar 16 00:25:04: OpenVPN 2.3.6 x86_64-apple-darwin [SSL (OpenSSL)] [LZO] [PKCS11] [MH] [IPv6] built on Mar  6 2015
Mar 16 00:25:04: library versions: OpenSSL 1.0.2 22 Jan 2015, LZO 2.09
Mar 16 00:25:07: Control Channel Authentication: using '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/connection.WxGQCD/ta.key' as a OpenVPN static key file
Mar 16 00:25:07: UDPv4 link local (bound): [undef]
Mar 16 00:25:07: UDPv4 link remote: [AF_INET]xxx.xxx.xxx.xxx:1194
Mar 16 00:25:07: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mar 16 00:25:07: [XXXXX] Peer Connection Initiated with [AF_INET]xxx.xxx.xxx.xxx:1194
Mar 16 00:25:09: TUN/TAP device /dev/tun0 opened
Mar 16 00:25:09: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Mar 16 00:25:09: /sbin/ifconfig tun0 delete
Mar 16 00:25:09: NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure
Mar 16 00:25:09: /sbin/ifconfig tun0 xx.xx.xx.x xx.xx.xx.x mtu 1500 netmask 255.255.255.255 up
Mar 16 00:25:09: Initialization Sequence Completed

Gobo

User avatar
Posts: 4
Joined: Fri May 15, 2015 1:30 am

Post by Gobo » Fri May 29, 2015 8:36 pm
praseodym wrote:
Thanks for the reply!

From the log, I'm not completely sure where the actual delays are, i.e. I'm not sure what OpenVPN is doing between the log lines that have several seconds between them. For reference, here is my log:
Code: Select all
Mar 16 00:25:03: Viscosity Mac 1.5.4 (1272)
Mar 16 00:25:03: Viscosity OpenVPN Engine Started
Mar 16 00:25:03: Running on Mac OS X 10.10.3
Mar 16 00:25:03: ---------
Mar 16 00:25:03: Checking reachability status of connection...
Mar 16 00:25:03: Connection is reachable. Starting connection attempt.
Mar 16 00:25:04: OpenVPN 2.3.6 x86_64-apple-darwin [SSL (OpenSSL)] [LZO] [PKCS11] [MH] [IPv6] built on Mar  6 2015
Mar 16 00:25:04: library versions: OpenSSL 1.0.2 22 Jan 2015, LZO 2.09
Mar 16 00:25:07: Control Channel Authentication: using '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/connection.WxGQCD/ta.key' as a OpenVPN static key file
Mar 16 00:25:07: UDPv4 link local (bound): [undef]
Mar 16 00:25:07: UDPv4 link remote: [AF_INET]xxx.xxx.xxx.xxx:1194
Mar 16 00:25:07: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mar 16 00:25:07: [XXXXX] Peer Connection Initiated with [AF_INET]xxx.xxx.xxx.xxx:1194
Mar 16 00:25:09: TUN/TAP device /dev/tun0 opened
Mar 16 00:25:09: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Mar 16 00:25:09: /sbin/ifconfig tun0 delete
Mar 16 00:25:09: NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure
Mar 16 00:25:09: /sbin/ifconfig tun0 xx.xx.xx.x xx.xx.xx.x mtu 1500 netmask 255.255.255.255 up
Mar 16 00:25:09: Initialization Sequence Completed
My log (I'm on 1.5.6) looks pretty much identical, I don't think there is a problem at all.

Frankly speaking, I don't think it's an issue if the connection on OS X takes 3 seconds or 6 seconds, as long as the connection stays stable once established.

As James pointed out, it is probably due to the larger overhead of OpenSSL compared to the mobile port.
4 posts Page 1 of 1